-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdump.sql
More file actions
22 lines (20 loc) · 779 Bytes
/
dump.sql
File metadata and controls
22 lines (20 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- User
-- int id, string name, string email, bool is_admin, string password
--
-- Task
-- int id, int user_id, text description, bool is_done, bool is_edits_by_admin
create table users (
id int primary key generated always as identity,
name varchar(255) not null,
email varchar(255) unique not null,
is_admin boolean default 0,
password varchar(255)
);
create table tasks (
id int primary key generated always as identity,
user_id int not null references users(id),
description text not null,
is_done boolean default 0,
is_edits_by_admin boolean default 0
);
insert into users (name, email, is_admin, password) values ('admin', 'admin@admin.com', true, '$2y$10$wVNJZle/uxGDfAOdS5aEOupPeOd0iTQlJdWuaYtfDjWAXZaCh95q6');