diff --git a/migrations/000004_create_user_table.down.sql b/migrations/000004_create_user_table.down.sql new file mode 100644 index 0000000..365a210 --- /dev/null +++ b/migrations/000004_create_user_table.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS users; \ No newline at end of file diff --git a/migrations/000004_create_user_table.up.sql b/migrations/000004_create_user_table.up.sql new file mode 100644 index 0000000..4e8ac5e --- /dev/null +++ b/migrations/000004_create_user_table.up.sql @@ -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 +); \ No newline at end of file