Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
it is a critical problem for DB2: DB2 only allow "not null" field act as primary or unique key, and so it will cause at least 2 problems:
- we will not able to create such table, since it break the rule of primary key and unique key under DB2
- even i try to force all primary key or unique key field as "not null" during table creation, it will face query error as we are trying to insert a NULL into "noy null" field. information will not able to store within {node}
Comment | File | Size | Author |
---|---|---|---|
#4 | drupal-6.x-dev-node.schema-0.2.diff | 2.18 KB | hswong3i |
drupal-6.x-dev-node.schema-0.1.diff | 1.84 KB | hswong3i | |
Comments
Comment #1
Gábor HojtsyWhat could have been the function of the NULL vid insertion?
Comment #2
hswong3i CreditAttribution: hswong3i commentedi am also question about why we need to insert a NULL as vid, for a new node? for a new node, $update_node is TRUE, and so its vid will be updated before the end of node_save(). inserting a NULL as placeholder is the same meaning as inserting a default value (0).
Comment #3
Dries CreditAttribution: Dries commentedThis patch seems to make sense, but I'll let Gabor commit it -- I'm not 100% I understood what Gabor was asking for.
Comment #4
hswong3i CreditAttribution: hswong3i commentedminor version update: it is also a problem for create index with primary key field.
it is a duplicate handling, and not allow in Oracle and DB2: Oracle and DB2 will index primary key field as default.
Comment #5
Gábor HojtsyOK, the vid is later handled. Committed!
Comment #6
(not verified) CreditAttribution: commentedComment #7
bjaspan CreditAttribution: bjaspan commentedThis patch introduces a schema discrepancy.
node_schema() declares node.vid as 'not null' => TRUE but system_update_6023() sets it to 'not null' => FALSE (by not specifying 'not null' at all) and has a comment that "vid is NULL".
Comment #8
bjaspan CreditAttribution: bjaspan commentedThis is fixed by my patch in http://drupal.org/node/173982.
Comment #9
hswong3i CreditAttribution: hswong3i commented@bjaspan: sorry for introducing this inconsistence, and thank you for your kindly help :)
Comment #10
(not verified) CreditAttribution: commented