projects
/
dbsrgits/SQL-Translator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Make MySQL producer add NULL for every nullable field
[dbsrgits/SQL-Translator.git]
/
lib
/
SQL
/
Translator
/
Producer
/
MySQL.pm
diff --git
a/lib/SQL/Translator/Producer/MySQL.pm
b/lib/SQL/Translator/Producer/MySQL.pm
index
8ec6041
..
c0e7637
100644
(file)
--- a/
lib/SQL/Translator/Producer/MySQL.pm
+++ b/
lib/SQL/Translator/Producer/MySQL.pm
@@
-612,7
+612,12
@@
sub create_field
}
# Null?
- $field_def .= ' NOT NULL' unless $field->is_nullable;
+ if ( $field->is_nullable ) {
+ $field_def .= ' NULL';
+ }
+ else {
+ $field_def .= ' NOT NULL';
+ }
# Default?
SQL::Translator::Producer->_apply_default_value(