fixed naming of tables to be plural and fixed order of migration execution
Build and Push Image / build-and-push (push) Successful in 1m32s
Build and Push Image / build-and-push (push) Successful in 1m32s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
export const up = (pgm) => {
|
||||
pgm.sql(`
|
||||
CREATE TABLE set (
|
||||
CREATE TABLE sets (
|
||||
id UUID PRIMARY KEY,
|
||||
collection_id UUID NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
@@ -8,15 +8,15 @@ export const up = (pgm) => {
|
||||
image_id UUID,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
updated_at TIMESTAMP DEFAULT NOW(),
|
||||
FOREIGN KEY (collection_id) REFERENCES collection(id),
|
||||
FOREIGN KEY (location_id) REFERENCES location(id),
|
||||
FOREIGN KEY (image_id) REFERENCES image(id)
|
||||
FOREIGN KEY (collection_id) REFERENCES collections(id),
|
||||
FOREIGN KEY (location_id) REFERENCES locations(id),
|
||||
FOREIGN KEY (image_id) REFERENCES images(id)
|
||||
);
|
||||
`)
|
||||
}
|
||||
|
||||
export const down = (pgm) => {
|
||||
pgm.sql(`
|
||||
DROP TABLE set;
|
||||
DROP TABLE sets;
|
||||
`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user