This commit is contained in:
10
db/migrations/20250326021251_updatedat.sql
Normal file
10
db/migrations/20250326021251_updatedat.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
ALTER TABLE incidents ADD COLUMN updated_at DATETIME;
|
||||
UPDATE incidents SET updated_at = CURRENT_TIMESTAMP WHERE updated_at IS NULL;
|
||||
-- +goose StatementEnd
|
||||
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
ALTER TABLE incidents DROP COLUMN updated_at;
|
||||
-- +goose StatementEnd
|
Reference in New Issue
Block a user