aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/post-deploy.sh
diff options
context:
space:
mode:
authorTeddy Wing2018-11-20 02:57:58 +0100
committerTeddy Wing2018-11-20 02:57:58 +0100
commit2068de68350c3dd3ac527a8eb2090d0a9f961866 (patch)
tree8a9791297bb198f7c977fea1570992153f301ba0 /scripts/post-deploy.sh
parent1e75c341d16bad57e1f881463798ce2b55d0184e (diff)
downloaddome-key-web-2068de68350c3dd3ac527a8eb2090d0a9f961866.tar.bz2
create_purchasers: Remove `DEFAULT UTC_TIMESTAMP()`
Ended up with this error when running my migrations against the production server: error: migration failed in line 0: BEGIN; CREATE TABLE purchasers ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, secret VARCHAR(255), created_at DATETIME NOT NULL DEFAULT UTC_TIMESTAMP(), updated_at DATETIME NOT NULL DEFAULT UTC_TIMESTAMP() ); CREATE TRIGGER purchasers_updated_at BEFORE UPDATE ON purchasers FOR EACH ROW SET NEW.updated_at = UTC_TIMESTAMP(); COMMIT; (details: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'UTC_TIMESTAMP(), updated_at DATETIME NOT NULL DEFAULT UTC_TIMESTAMP() ); CR' at line 6) Using MySQL 5.6.34 in production and MariaDB 10.3.10 locally. Guess you can't use `DEFAULT UTC_TIMESTAMP()` there. To use `UTC_TIMESTAMP()`, create a couple new triggers to set the timestamp in the `created_at` and `updated_at` columns.
Diffstat (limited to 'scripts/post-deploy.sh')
0 files changed, 0 insertions, 0 deletions