Files
tcg-collectors-server/migrations/005_create-role-table.js
T

28 lines
489 B
JavaScript

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