updated migrations
Build and Push Image / build-and-push (push) Successful in 1m43s

This commit is contained in:
2026-05-12 22:28:51 -07:00
parent b33ae3d9a7
commit 0601c41f46
5 changed files with 68 additions and 6 deletions
+34
View File
@@ -0,0 +1,34 @@
export default {
up: async (pool) => {
try {
await pool.query(
`
CREATE TABLE set (
id UUID PRIMARY KEY,
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,
FOREIGN KEY (collection_id) REFERENCES collection(id),
FOREIGN KEY (location_id) REFERENCES location(id)
);
`
)
} catch (error) {
console.error('Error creating set table:', error)
throw error
}
},
down: async (pool) => {
try {
await pool.query(`
DROP TABLE set;
`)
} catch (error) {
console.error('Error dropping set table:', error)
throw error
}
},
}