fixed migration issues
Build and Push Image / build-and-push (push) Failing after 1m33s

This commit is contained in:
2026-05-13 22:44:40 -07:00
parent 7dc66697ea
commit 4c2851cee5
7 changed files with 23 additions and 9 deletions
@@ -3,7 +3,9 @@ export const up = (pgm) => {
CREATE TABLE image (
id UUID PRIMARY KEY,
file TEXT,
image BYTEA
image BYTEA,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW(),
);
`)
}
@@ -2,7 +2,11 @@ export const up = (pgm) => {
pgm.sql(`
CREATE TABLE collection (
id UUID PRIMARY KEY,
name TEXT
name TEXT,
image_id UUID,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW(),
FOREIGN KEY (image_id) REFERENCES image(id)
);
`)
}
+3 -1
View File
@@ -7,9 +7,11 @@ export const up = (pgm) => {
productId TEXT,
name TEXT,
cleanName TEXT,
extCardText TEXTAREA,
extCardText TEXT,
marketPrice TEXT,
extRarity TEXT,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW(),
FOREIGN KEY (collection_id) REFERENCES collection(id),
FOREIGN KEY (image_id) REFERENCES image(id)
);
+2
View File
@@ -3,6 +3,8 @@ export const up = (pgm) => {
CREATE TABLE location (
id UUID PRIMARY KEY,
name TEXT UNIQUE NOT NULL
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
`)
}
+5 -3
View File
@@ -5,10 +5,12 @@ export const up = (pgm) => {
collection_id UUID NOT NULL,
name TEXT NOT NULL,
location_id UUID,
createdAt TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
updatedAt TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
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 (location_id) REFERENCES location(id),
FOREIGN KEY (image_id) REFERENCES image(id)
);
`)
}
+2 -2
View File
@@ -6,8 +6,8 @@ export const up = (pgm) => {
password TEXT NOT NULL,
role_id UUID,
email TEXT UNIQUE NOT NULL,
createdAt TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
updatedAt TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW(),
FOREIGN KEY (role_id) REFERENCES role(id)
);
`)
+3 -1
View File
@@ -2,7 +2,9 @@ export const up = (pgm) => {
pgm.sql(`
CREATE TABLE role (
id UUID PRIMARY KEY,
name TEXT UNIQUE NOT NULL
name TEXT UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW()
);
`)
}