21 lines
454 B
JavaScript
21 lines
454 B
JavaScript
export default {
|
|
name: 'create_collection_table',
|
|
up: async () => {
|
|
const sql = `
|
|
CREATE TABLE collection (
|
|
id UUID PRIMARY KEY,
|
|
name TEXT
|
|
);
|
|
`
|
|
await migrate.run([sql], pool)
|
|
console.log('Collection table created successfully!')
|
|
},
|
|
down: async () => {
|
|
const sql = `
|
|
DROP TABLE collection;
|
|
`
|
|
await migrate.run([sql], pool)
|
|
console.log('Collection table dropped successfully.')
|
|
},
|
|
}
|