working on first setup of pg migrations

This commit is contained in:
2026-05-10 19:51:13 -07:00
parent 3cdec698ef
commit 5318a1eb4a
5 changed files with 121 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
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.')
},
}