Not null constraint only applies when not in a Create Table statement

This commit is contained in:
david_wobrock committed 2017-06-22 16:59:58 +02:00
1 parent 63b564d47d
commit 8af5bdb252
1 file changed
+1 -1
+1 -1
View File
@@ -26,7 +26,7 @@ class MigrationLinter:
migration_tests = ( migration_tests = (
{ {
'fn': lambda sql: re.search('NOT NULL', sql), 'fn': lambda sql: re.search('NOT NULL', sql) and not re.search('CREATE TABLE', sql),
'err_msg': 'NOT NULL constraint on columns' 'err_msg': 'NOT NULL constraint on columns'
}, { }, {
'fn': lambda sql: re.search('DROP COLUMN', sql), 'fn': lambda sql: re.search('DROP COLUMN', sql),