fixed naming of tables to be plural and fixed order of migration execution
Build and Push Image / build-and-push (push) Successful in 1m32s

This commit is contained in:
2026-05-13 22:59:55 -07:00
parent e12bb7834d
commit 2c8baa339a
7 changed files with 21 additions and 21 deletions
+20
View File
@@ -0,0 +1,20 @@
export const up = (pgm) => {
pgm.sql(`
CREATE TABLE users (
id UUID PRIMARY KEY,
username TEXT UNIQUE NOT NULL,
password TEXT NOT NULL,
role_id UUID,
email TEXT UNIQUE NOT NULL,
created_at TIMESTAMP DEFAULT NOW(),
updated_at TIMESTAMP DEFAULT NOW(),
FOREIGN KEY (role_id) REFERENCES roles(id)
);
`)
}
export const down = (pgm) => {
pgm.sql(`
DROP TABLE users;
`)
}