From 87ec8a25bfcc0989b8d2431e16b541a29fcf5512 Mon Sep 17 00:00:00 2001 From: Ying Li Date: Mon, 12 Oct 2015 16:03:56 -0700 Subject: [PATCH] Use NULL DEFAULT NULL instead of NULL for timestamps Signed-off-by: Ying Li --- notarymysql/migrate.sql | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/notarymysql/migrate.sql b/notarymysql/migrate.sql index 89f39e7eaa..bf10d390f9 100644 --- a/notarymysql/migrate.sql +++ b/notarymysql/migrate.sql @@ -1,18 +1,16 @@ -- This migrates initial.sql to tables that are needed for GORM ALTER TABLE `tuf_files` -ADD COLUMN `created_at` timestamp NULL AFTER `id`, -ADD COLUMN `updated_at` timestamp NULL AFTER `created_at`, -ADD COLUMN `deleted_at` timestamp NULL AFTER `updated_at`, +ADD COLUMN `created_at` timestamp NULL DEFAULT NULL AFTER `id`, +ADD COLUMN `updated_at` timestamp NULL DEFAULT NULL AFTER `created_at`, +ADD COLUMN `deleted_at` timestamp NULL DEFAULT NULL AFTER `updated_at`, MODIFY `id` int(10) unsigned AUTO_INCREMENT; ALTER TABLE `timestamp_keys` ADD COLUMN `id` int(10) unsigned AUTO_INCREMENT FIRST, -ADD COLUMN `created_at` timestamp NULL AFTER `id`, -ADD COLUMN `updated_at` timestamp NULL AFTER `created_at`, -ADD COLUMN `deleted_at` timestamp NULL AFTER `updated_at`, +ADD COLUMN `created_at` timestamp NULL DEFAULT NULL AFTER `id`, +ADD COLUMN `updated_at` timestamp NULL DEFAULT NULL AFTER `created_at`, +ADD COLUMN `deleted_at` timestamp NULL DEFAULT NULL AFTER `updated_at`, DROP PRIMARY KEY, ADD PRIMARY KEY (`id`), ADD UNIQUE (`gun`); - -