fixed things to be more inline with how migrations work
Build and Push Image / build-and-push (push) Failing after 24s
Build and Push Image / build-and-push (push) Failing after 24s
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
export default {
|
||||
up: async (pool) => {
|
||||
try {
|
||||
await pool.query(
|
||||
`
|
||||
export const up = (pgm) => {
|
||||
pgm.sql(`
|
||||
CREATE TABLE user (
|
||||
id UUID PRIMARY KEY,
|
||||
username TEXT UNIQUE NOT NULL,
|
||||
@@ -13,21 +10,11 @@ export default {
|
||||
updatedAt TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (role_id) REFERENCES role(id)
|
||||
);
|
||||
`
|
||||
)
|
||||
} catch (error) {
|
||||
console.error('Error creating user table:', error)
|
||||
throw error
|
||||
}
|
||||
},
|
||||
down: async (pool) => {
|
||||
try {
|
||||
await pool.query(`
|
||||
`)
|
||||
}
|
||||
|
||||
export const down = (pgm) => {
|
||||
pgm.sql(`
|
||||
DROP TABLE user;
|
||||
`)
|
||||
} catch (error) {
|
||||
console.error('Error dropping user table:', error)
|
||||
throw error
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user