Use NULL DEFAULT NULL instead of NULL for timestamps

Signed-off-by: Ying Li <ying.li@docker.com>
This commit is contained in:
Ying Li 2015-10-12 16:03:56 -07:00
parent e8528ec391
commit 87ec8a25bf
1 changed files with 6 additions and 8 deletions

View File

@ -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`);