Skip to content

Commit

Permalink
fix mysql timestamp precision
Browse files Browse the repository at this point in the history
  • Loading branch information
pxp9 committed Apr 17, 2024
1 parent c611d60 commit 45d896a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ CREATE TABLE fang_tasks (
task_type VARCHAR(255) NOT NULL DEFAULT 'common', -- TEXT type can not have default value, stupid MySQL policy
uniq_hash VARCHAR(64),
retries INTEGER NOT NULL DEFAULT 0,
scheduled_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
scheduled_at DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
created_at DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
updated_at DATETIME(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)
);

CREATE INDEX fang_tasks_state_index ON fang_tasks(state);
Expand Down

0 comments on commit 45d896a

Please sign in to comment.