Files
mocksnow/db/migrations/20250326021251_updatedat.sql
Nathan Coad 6581164fc4
All checks were successful
continuous-integration/drone/push Build is passing
add SysUpdatedOn
2025-03-26 13:19:34 +11:00

11 lines
303 B
SQL

-- +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