diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-04-29 18:04:56 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-04-29 18:04:56 +0300 |
commit | 4cee97e695c889445c3146bc8169a89b132855ea (patch) | |
tree | 693489f2f89f86e277255dfe0f9d5482ecad0359 /etc | |
parent | Add nginx and php-fpm config files (diff) | |
download | bugtracker-4cee97e695c889445c3146bc8169a89b132855ea.tar.xz |
Finish user management
Diffstat (limited to 'etc')
-rw-r--r-- | etc/setup.sql | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/etc/setup.sql b/etc/setup.sql new file mode 100644 index 0000000..35ddea4 --- /dev/null +++ b/etc/setup.sql @@ -0,0 +1,28 @@ +-- users table +CREATE TABLE users ( +id SERIAL PRIMARY KEY, +username varchar(50) NOT NULL, +password varchar(255) NOT NULL, +email varchar(50) NOT NULL, +can_edit_bugs boolean DEFAULT true, +can_edit_reports boolean DEFAULT true +); + +-- bugs table +CREATE TABLE bugs ( +id SERIAL PRIMARY KEY, +title varchar(50) NOT NULL, +description text NOT NULL, +author integer NOT NULL REFERENCES users(id), +assignee integer REFERENCES users(id) +); + +-- reports table +CREATE TABLE reports ( +id SERIAL PRIMARY KEY, +bug integer REFERENCES bugs(id), +author integer NOT NULL REFERENCES users(id), +title varchar(50) NOT NULL, +description text NOT NULL +); + |