[thesite] LONG to CLOB

Dean Mah dmah at shaw.ca
Sun Dec 30 11:40:21 CST 2001


I've migrated the LONG 'body' field in the CONTENT table to a CLOB
last night.  I sumbitted a test article which seemed to work without
problem.  The article was inserted into the database without having to
change the CF code.

A few things happened during the conversion:

1) When doing an export, I ran into a problem with shared pool memory.
   I bounced the database and that resolved the problem.  This is only
   a temporary solution.  The memory on the test Oracle database needs
   to be tuned a little better.

2) When I first switched to the new table, teo started throwing
   errors. This was related to a faulty SQL query.  The 'datemod'
   field was being compared to an empty string.  The
   session.user.lastlogin variable was not being set.  I restarted the
   CF server and that seemed to fix it.

3) The content table has three fields that have a NOT NULL constraint
   on them: 'rating', 'ratings', and 'replies'.  The teo code did not
   supply default values for these fields and so the article
   submission failed.  I removed these constraints and then submission
   worked.  I don't know how the original table was created so I might
   have missed something when duplicating it.

I'll be out of town for the next couple of days and am not sure if I
will be able to check e-mail but everything should be working.  If it
does cause problems, the original table can be put back into place.
It's been renamed CONTENT_ORIG.

Dean




More information about the thesite mailing list