Skip to content

Commit c3c1964

Browse files
committed
fix mysql5.7 default setting
1 parent 17f76c8 commit c3c1964

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

sql/codepush.sql

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CREATE TABLE `apps` (
2727
`name` varchar(50) NOT NULL DEFAULT '',
2828
`uid` bigint(20) unsigned NOT NULL DEFAULT '0',
2929
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
30-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
30+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
3131
`deleted_at` timestamp NULL DEFAULT NULL,
3232
PRIMARY KEY (`id`),
3333
KEY `idx_name` (`name`(12))
@@ -56,7 +56,7 @@ CREATE TABLE `collaborators` (
5656
`uid` bigint(20) unsigned NOT NULL DEFAULT '0',
5757
`roles` varchar(20) NOT NULL DEFAULT '',
5858
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
59-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
59+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
6060
`deleted_at` timestamp NULL DEFAULT NULL,
6161
PRIMARY KEY (`id`),
6262
KEY `idx_appid` (`appid`),
@@ -89,7 +89,7 @@ CREATE TABLE `deployments` (
8989
`last_deployment_version_id` int(10) unsigned NOT NULL DEFAULT '0',
9090
`label_id` int(11) unsigned NOT NULL DEFAULT '0',
9191
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
92-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
92+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
9393
`deleted_at` timestamp NULL DEFAULT NULL,
9494
PRIMARY KEY (`id`),
9595
KEY `idx_appid` (`appid`),
@@ -120,7 +120,7 @@ CREATE TABLE `deployments_versions` (
120120
`is_mandatory` tinyint(4) NOT NULL DEFAULT '0',
121121
`current_package_id` int(10) unsigned NOT NULL DEFAULT '0',
122122
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
123-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
123+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
124124
PRIMARY KEY (`id`),
125125
UNIQUE KEY `idx_did_appversion` (`deployment_id`,`app_version`)
126126
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -155,7 +155,7 @@ CREATE TABLE `packages` (
155155
`original_label` varchar(20) NOT NULL DEFAULT '',
156156
`original_deployment` varchar(20) NOT NULL DEFAULT '',
157157
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
158-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
158+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
159159
`released_by` bigint(20) unsigned NOT NULL,
160160
PRIMARY KEY (`id`),
161161
KEY `idx_deploymentid_label` (`deployment_id`,`label`(8))
@@ -185,7 +185,7 @@ CREATE TABLE `packages_diff` (
185185
`diff_blob_url` varchar(255) NOT NULL DEFAULT '',
186186
`diff_size` int(11) unsigned NOT NULL DEFAULT '0',
187187
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
188-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
188+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
189189
PRIMARY KEY (`id`),
190190
KEY `idx_packageid_hash` (`package_id`,`diff_against_package_hash`(40))
191191
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -215,7 +215,7 @@ CREATE TABLE `packages_metrics` (
215215
`failed` int(10) unsigned NOT NULL DEFAULT '0',
216216
`installed` int(10) unsigned NOT NULL DEFAULT '0',
217217
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
218-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
218+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
219219
PRIMARY KEY (`id`),
220220
UNIQUE KEY `udx_packageid` (`package_id`)
221221
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -243,7 +243,7 @@ CREATE TABLE `user_tokens` (
243243
`tokens` varchar(64) NOT NULL DEFAULT '',
244244
`created_by` varchar(64) NOT NULL DEFAULT '',
245245
`description` varchar(64) NOT NULL DEFAULT '',
246-
`expires_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
246+
`expires_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
247247
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
248248
`deleted_at` timestamp NULL DEFAULT NULL,
249249
PRIMARY KEY (`id`),
@@ -275,7 +275,7 @@ CREATE TABLE `users` (
275275
`email` varchar(100) NOT NULL DEFAULT '',
276276
`identical` varchar(10) NOT NULL DEFAULT '',
277277
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
278-
`created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
278+
`created_at` timestamp NOT NULL DEFAULT '1970-01-01 00:00:01',
279279
PRIMARY KEY (`id`),
280280
UNIQUE KEY `udx_identical` (`identical`),
281281
KEY `udx_username` (`username`),

0 commit comments

Comments
 (0)