-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop ON UPDATE CURRENT_TIMESTAMP(6) from non-null TIMESTAMP columns
Fixes #283
- Loading branch information
1 parent
2e08a7f
commit 7f2e963
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/main/resources/db/changelog/0003_orchestrator-mysql-timestamp-default-value-2101.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
databaseChangeLog: | ||
- changeSet: | ||
id: 0003_orchestrator-mysql-timestamp-default-value-2101 | ||
author: a.brigandi | ||
comment: > | ||
Set the default value as CURRENT_TIMESTAMP(6) for non-nullable TIMESTAMP columns in MySql. | ||
This is needed to fix the default behaviour of MySql of appending | ||
ON UPDATE CURRENT_TIMESTAMP(6) in the default value of non-nullable TIMESTAMP columns | ||
changes: | ||
- sql: | ||
dbms: mysql | ||
sql: > | ||
ALTER TABLE `deployment` | ||
CHANGE COLUMN `created_at` `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) | ||
- sql: | ||
dbms: mysql | ||
sql: > | ||
ALTER TABLE `resource` | ||
CHANGE COLUMN `created_at` `created_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) | ||
- sql: | ||
dbms: mysql | ||
sql: > | ||
ALTER TABLE `oidc_refresh_token` | ||
CHANGE COLUMN `issued_at` `issued_at` TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters