Archive old migrations (#426)

* Archive old migrations

* Fix invalid placement of migrations
This commit is contained in:
Rikard Bartholf
2024-10-17 11:19:12 +02:00
committed by GitHub
parent 763262c108
commit ddcbd0afb0
500 changed files with 0 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
DROP TABLE IF EXISTS redirects;
CREATE TABLE redirects
(
id SERIAL PRIMARY KEY,
market_id INTEGER NOT NULL,
source_uri VARCHAR NOT NULL,
target_uri VARCHAR NOT NULL,
UNIQUE (market_id, source_uri)
);
GRANT ALL ON TABLE redirects TO root;
GRANT ALL ON TABLE redirects TO photowall_user;
GRANT ALL ON TABLE redirects TO public;
ALTER TABLE redirects
ADD CONSTRAINT market_fkey
FOREIGN KEY (market_id)
REFERENCES markets(id) MATCH SIMPLE;