Files
tcg-collectors-server/migrations/004_create-location-table.js
T
joseph.nelson4456 0601c41f46
Build and Push Image / build-and-push (push) Successful in 1m43s
updated migrations
2026-05-12 22:28:51 -07:00

29 lines
506 B
JavaScript

export default {
up: async (pool) => {
try {
await pool.query(
`
CREATE TABLE location (
id UUID PRIMARY KEY,
name TEXT UNIQUE NOT NULL
);
`
)
} catch (error) {
console.error('Error creating location table:', error)
throw error
}
},
down: async (pool) => {
try {
await pool.query(`
DROP TABLE location;
`)
} catch (error) {
console.error('Error dropping location table:', error)
throw error
}
},
}