diff --git a/backend/src/main/resources/db/migration/V3__add_deleted_created_at_updated_at.sql b/backend/src/main/resources/db/migration/V3__add_deleted_created_at_updated_at.sql index 9e7335a..355d3cb 100644 --- a/backend/src/main/resources/db/migration/V3__add_deleted_created_at_updated_at.sql +++ b/backend/src/main/resources/db/migration/V3__add_deleted_created_at_updated_at.sql @@ -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;