nidus-sync/db/migrations/00121_note_image_id.sql

8 lines
214 B
MySQL
Raw Normal View History

2026-03-19 21:25:24 +00:00
-- +goose Up
ALTER TABLE note_image
ADD COLUMN id INTEGER GENERATED ALWAYS AS IDENTITY;
ALTER TABLE note_image
ADD CONSTRAINT note_image_id_unique UNIQUE (id);
-- +goose Down
ALTER TABLE note_image DROP COLUMN id;