Implement migration for PostgreSQL

This commit is contained in:
Kitaiti Makoto 2023-01-09 16:13:12 +09:00
parent e3609f7863
commit 22b03710be
2 changed files with 6 additions and 2 deletions

View File

@ -1 +1,3 @@
-- This file should undo anything in `up.sql`
ALTER TABLE users DROP CONSTRAINT users_fqn;
ALTER TABLE blogs DROP CONSTRAINT blogs_actor_id;
ALTER TABLE blogs DROP CONSTRAINT blogs_fqn;

View File

@ -1 +1,3 @@
-- Your SQL goes here
ALTER TABLE users ADD CONSTRAINT users_fqn UNIQUE (fqn);
ALTER TABLE blogs ADD CONSTRAINT blogs_actor_id UNIQUE (actor_id);
ALTER TABLE blogs ADD CONSTRAINT blogs_fqn UNIQUE (fqn);