Skip to content

Commit

Permalink
fix: 修复低版本mysql无法使用CURRENT_TIMESTAMP
Browse files Browse the repository at this point in the history
  • Loading branch information
pplulee committed Apr 3, 2023
1 parent ed6176c commit de7f6d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion db/db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ CREATE TABLE `unlock_record` (
`type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`status` tinyint(1) NOT NULL,
`message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`time` datetime NOT NULL DEFAULT NOW(),
`ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
Expand Down
2 changes: 1 addition & 1 deletion db/update/v2.0.sql
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ CREATE TABLE `unlock_record` (
`type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`status` tinyint(1) NOT NULL,
`message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`time` datetime NOT NULL DEFAULT NOW(),
`ip` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

0 comments on commit de7f6d1

Please sign in to comment.