Follow up for #1498674: Refactor node properties to multilingual
Problem/Motivation
Simplify code
In 1498674 was the @todo
- // @todo: Make the {node_revision}.log column nullable so that we can
On the line in the patch in comment #303:
503
The line of the final patch might change but that info might help to find them.
For example,
+ // must be set because {node_field_revision}.log is a text column and
+ // therefore cannot have a default value. However, it might not be set at
+ // this point (for example, if the user submitting a node form does not
+ // have permission to create revisions), so we ensure that it is at least
+ // an empty string in that case.
+ // @todo Make the {node_field_revision}.log column nullable so that we
+ // can remove this check.
if (!isset($record->log)) {
$record->log = '';
}
}
Proposed resolution
Make the {node_field_revision}.log column nullable so that we can remove this check.
User interface changes
No.
API changes
No.
Comment | File | Size | Author |
---|---|---|---|
#13 | make-column-nullable-2004366-13.patch | 1.28 KB | InternetDevels |
Comments
Comment #1
kalabro#CodeSprintUA 2013 Online team will work on it today.
Comment #2
kalabro1. Db column
{node_field_revision}.log
already nullable('not null' => FALSE)
via #1498674: Refactor node properties to multilingual2. $record->log is always set, because we call mapToRevisionStorageRecord() before preSaveRevision().
Just removed conditional statement.
Comment #3
podarok#2 looks good
RTBC
Comment #4
alexpottThe two ifs can be collasped to one...
Comment #5
kalabroDone!
Comment #7
kalabroHmm.. Only config storage exceptions.
Comment #8
kalabroHmm.. Only config storage exceptions.
Comment #9
kalabro#5: 2004366-make_the_node_field_revision_log_nullable-4.patch queued for re-testing.
Comment #10
jair CreditAttribution: jair commentedComment #11
Albert Volkman CreditAttribution: Albert Volkman commentedRe-roll.
Comment #13
InternetDevels CreditAttribution: InternetDevels commentedThe file was changed and we can not apply old patch, so we did not create interdiff
Comment #14
star-szrRemoving reroll tag. Thanks!
Comment #15
jhedstromNeeds a reroll.
Comment #16
Albert Volkman CreditAttribution: Albert Volkman commentedIs this still relevant?
http://cgit.drupalcode.org/drupal/tree/core/modules/node/src/Entity/Node...
Comment #17
jhedstromLooks like that code has been removed already per #16.