Skip to content

Commit 4070a19

Browse files
committed
test: Fix timestamp tests failing on Travis CI
The CI MySQL server has NO_ZERO_DATE set to true so can't use ColTypes.timestamp().default(0)
1 parent 0a3fcaa commit 4070a19

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

test/integration/MySQLPlus.test.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -531,22 +531,18 @@ describe('MySQLPlus', function() {
531531
columns: {
532532
a: ColTypes.timestamp().notNull(),
533533
b: ColTypes.timestamp().notNull().defaultCurrentTimestamp(),
534-
c: ColTypes.timestamp().notNull().default(0),
535-
d: ColTypes.timestamp(),
536-
e: ColTypes.timestamp().default(null),
537-
f: ColTypes.timestamp().default(0),
538-
g: ColTypes.timestamp().default('2017-03-25 12:46:05'),
534+
c: ColTypes.timestamp(),
535+
d: ColTypes.timestamp().default(null),
536+
e: ColTypes.timestamp().default('2017-03-25 12:46:05'),
539537
},
540538
};
541539
const timestampTableExpectedSQL =
542540
'CREATE TABLE `timestamp_table` (\n' +
543541
' `a` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n' +
544542
' `b` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n' +
545-
" `c` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',\n" +
543+
' `c` timestamp NULL DEFAULT NULL,\n' +
546544
' `d` timestamp NULL DEFAULT NULL,\n' +
547-
' `e` timestamp NULL DEFAULT NULL,\n' +
548-
" `f` timestamp NULL DEFAULT '0000-00-00 00:00:00',\n" +
549-
" `g` timestamp NULL DEFAULT '2017-03-25 12:46:05'\n" +
545+
" `e` timestamp NULL DEFAULT '2017-03-25 12:46:05'\n" +
550546
') ENGINE=InnoDB DEFAULT CHARSET=utf8';
551547

552548

0 commit comments

Comments
 (0)