ch13.1
This commit is contained in:
1
migrations/000004_create_user_table.down.sql
Normal file
1
migrations/000004_create_user_table.down.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
DROP TABLE IF EXISTS users;
|
||||||
9
migrations/000004_create_user_table.up.sql
Normal file
9
migrations/000004_create_user_table.up.sql
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS users (
|
||||||
|
id bigserial PRIMARY KEY,
|
||||||
|
created_at timestamp(0) with time zone NOT NULL DEFAULT NOW(),
|
||||||
|
name text NOT NULL,
|
||||||
|
email citext UNIQUE NOT NULL,
|
||||||
|
password_hash bytea NOT NULL,
|
||||||
|
activated bool NOT NULL,
|
||||||
|
version integer NOT NULL DEFAULT 1
|
||||||
|
);
|
||||||
Reference in New Issue
Block a user