diff --git a/cmd/tradelogs/migrations/00007_update_column_expiration_date.up.sql b/cmd/tradelogs/migrations/00007_update_column_expiration_date.up.sql new file mode 100644 index 0000000..b35a601 --- /dev/null +++ b/cmd/tradelogs/migrations/00007_update_column_expiration_date.up.sql @@ -0,0 +1,3 @@ +UPDATE tradelogs SET expiration_date = 0 WHERE expiration_date IS NULL; +ALTER TABLE tradelogs ALTER COLUMN expiration_date SET DEFAULT 0; +ALTER TABLE tradelogs ALTER COLUMN expiration_date SET NOT NULL;