diff --git a/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/down.sql b/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/down.sql index 291a97c5..153f6530 100644 --- a/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/down.sql +++ b/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/down.sql @@ -1 +1,3 @@ --- This file should undo anything in `up.sql` \ No newline at end of file +ALTER TABLE users DROP CONSTRAINT users_fqn; +ALTER TABLE blogs DROP CONSTRAINT blogs_actor_id; +ALTER TABLE blogs DROP CONSTRAINT blogs_fqn; diff --git a/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/up.sql b/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/up.sql index 33cf74b5..6ee58e24 100644 --- a/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/up.sql +++ b/migrations/postgres/2023-01-09-070959_add_unique_constraint_to_activity_pub_related_fields/up.sql @@ -1 +1,3 @@ --- Your SQL goes here \ No newline at end of file +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);