-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83cf9a0
commit fbfd922
Showing
1 changed file
with
5 additions
and
6 deletions.
There are no files selected for viewing
11 changes: 5 additions & 6 deletions
11
backend/src/main/resources/db/migration/V3__add_deleted_created_at_updated_at.sql
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 |
---|---|---|
@@ -1,19 +1,18 @@ | ||
ALTER TABLE MEMBERS | ||
ALTER TABLE members | ||
ADD COLUMN created_at DATETIME(6); | ||
|
||
ALTER TABLE MEMBERS | ||
ALTER TABLE members | ||
ADD COLUMN updated_at DATETIME(6); | ||
|
||
UPDATE MEMBERS | ||
UPDATE members | ||
SET created_at = CURRENT_TIMESTAMP(6), | ||
updated_at = CURRENT_TIMESTAMP(6); | ||
|
||
ALTER TABLE MEMBERS | ||
ALTER TABLE members | ||
MODIFY COLUMN created_at DATETIME(6) NOT NULL; | ||
|
||
ALTER TABLE MEMBERS | ||
ALTER TABLE members | ||
MODIFY COLUMN updated_at DATETIME(6) NOT NULL; | ||
|
||
|
||
alter table members | ||
add column is_deleted boolean not null default false; |