The NULL issue

Profesize posted 30th of January 2010 in Community Voice. 2 comments.

The problem concerning NULL not being used in the database has been brought to our attention by some other members of Unity. In Caltrade's blog, he describes some of the issues surrounding the exclusion of NULL.

After I received a few emails from members wanting to know why their lifetime membership had suddenly disappeared, I obviously looked into this problem to see what had caused it. I noticed that Lifetime memberships in D6 were qualified by using NULL to represent the fact that a membership will never expire in the 'DateExpires' column in the ProfileMemLevels table.

The data migration script seems to convert NULL in the corresponding position in the D7 database to a '0000-00-00 00:00:00' which seems to translate as a 'Standard' membership. Once you manually change the membership back to a Lifetime membership via the Admin panel, a new row appears with matching data to the attempt made by the data migration script except that the value in the 'DateExpires' colums now says NULL instead of the '0000-00-00 00:00:00' value.

Please correct me if I am mistaken but this seems to be the opposite problem to what Caltrade has experienced where NULL is not used but actually needed.

In my case, the NULL is automatically inserted into the DateExpires column if you manually change the membership via the admin panel, but not via data migration.

All a bit confusing if you ask me. 

 
Comments
·Oldest
·Top
Please login to post a comment.
CALTRADE
I'm not sure if this is related or not, but I do know that having the ability to have a "null" (empty) field is a basic database function, and is even more important here. The bottom line: it means that neither the join form or search functions work properly on D7. It looks like Alex has come up with a workaround for the problems this creates on the join form, but if you use it your search functions won't work. I don't think this is an obscure "feature" or "enhancement" see more - I think it is a mission critical function, and as the communities getting build with D7 get more developed, I think that more and more members here will agree.
AlexT
http://www.boonex.com/trac/dolphin/ticket/1804
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.
PET:0.056339025497437