Files
tcg-collectors-server/migrations/003_create-item-table.js
T
joseph.nelson4456 4c2851cee5
Build and Push Image / build-and-push (push) Failing after 1m33s
fixed migration issues
2026-05-13 22:44:40 -07:00

26 lines
653 B
JavaScript

export const up = (pgm) => {
pgm.sql(`
CREATE TABLE item (
id UUID PRIMARY KEY,
collection_id UUID,
image_id UUID,
productId TEXT,
name TEXT,
cleanName TEXT,
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)
);
`)
}
export const down = (pgm) => {
pgm.sql(`
DROP TABLE item;
`)
}