diff --git a/migrations/2023-10-24-131607_proxy_links/down.sql b/migrations/2023-10-24-131607_proxy_links/down.sql index c1bf58bc0..66a961ed3 100644 --- a/migrations/2023-10-24-131607_proxy_links/down.sql +++ b/migrations/2023-10-24-131607_proxy_links/down.sql @@ -1,3 +1,4 @@ -drop table remote_image; +DROP TABLE remote_image; + +ALTER TABLE local_image RENAME TO image_upload; -alter table local_image rename to image_upload; \ No newline at end of file diff --git a/migrations/2023-10-24-131607_proxy_links/up.sql b/migrations/2023-10-24-131607_proxy_links/up.sql index 3d909c9d7..80e1822f3 100644 --- a/migrations/2023-10-24-131607_proxy_links/up.sql +++ b/migrations/2023-10-24-131607_proxy_links/up.sql @@ -1,7 +1,8 @@ CREATE TABLE remote_image ( id serial PRIMARY KEY, - link text not null unique, + link text NOT NULL UNIQUE, published timestamptz DEFAULT now() NOT NULL ); -alter table image_upload rename to local_image; +ALTER TABLE image_upload RENAME TO local_image; +