Skip to content

Commit

Permalink
fixes #146 Add ON UPDATE CURRENT_TIMESTAMP to update_time
Browse files Browse the repository at this point in the history
  • Loading branch information
Brutus5000 committed Dec 7, 2017
1 parent b432d15 commit 2762935
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migrations/V48__notes-per-user.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ CREATE TABLE user_notes
author MEDIUMINT(9) unsigned NOT NULL,
watched TINYINT(4) DEFAULT '0' NOT NULL COMMENT 'boolean that marks notes that should be reviewed at a later time (i.e. gather facts before applying a ban)',
note TEXT NOT NULL,
create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL,
create_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
update_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
CONSTRAINT user_notes_user_login_id_fk FOREIGN KEY (user_id) REFERENCES login (id),
CONSTRAINT user_notes_author_login_id_fk FOREIGN KEY (author) REFERENCES login (id)
);
Expand Down

0 comments on commit 2762935

Please sign in to comment.