Add User route and Refactor code
This commit is contained in:
parent
519749fd3a
commit
b311a41dc7
24 changed files with 902 additions and 489 deletions
|
|
@ -0,0 +1 @@
|
|||
DROP TABLE IF EXISTS users;
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
-- slqlite3
|
||||
-- create users table
|
||||
CREATE TABLE users (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
|
||||
CREATE TABLE IF NOT EXISTS users (
|
||||
id TEXT PRIMARY KEY NOT NULL,
|
||||
name TEXT NOT NULL,
|
||||
email TEXT NOT NULL,
|
||||
password TEXT NOT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
email TEXT UNIQUE NOT NULL,
|
||||
permissions INT DEFAULT 0,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
);
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE users DROP COLUMN picture;
|
||||
|
|
@ -0,0 +1 @@
|
|||
ALTER TABLE users ADD COLUMN picture TEXT;
|
||||
Loading…
Add table
Add a link
Reference in a new issue