Files
tcg-collectors-server/migrations/002_create-image-table.js
T

22 lines
452 B
JavaScript

export default {
name: 'create_image_table',
up: async () => {
const sql = `
CREATE TABLE image (
id UUID PRIMARY KEY,
file TEXT,
image BYTEA
);
`
await migrate.run([sql], pool)
console.log('Image table created successfully!')
},
down: async () => {
const sql = `
DROP TABLE image;
`
await migrate.run([sql], pool)
console.log('Image table dropped successfully.')
},
}