From 544f324c8b77547775b54c6e20f68cb388e1a5fc Mon Sep 17 00:00:00 2001 From: def Date: Fri, 16 Sep 2022 10:01:48 +0200 Subject: [PATCH] add init_db --- db/init_db.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 db/init_db.py diff --git a/db/init_db.py b/db/init_db.py new file mode 100644 index 0000000..19581fd --- /dev/null +++ b/db/init_db.py @@ -0,0 +1,20 @@ +init_db_tables_sql = """ + + CREATE TABLE projects ( \ + id SERIAL PRIMARY KEY, \ + name varchar(50), \ + description varchar(1000), \ + creator varchar(30), \ + contributors smallint, \ + status bit(1) DEFAULT 1, \ + tags varchar(100), \ + category varchar(20), \ + creation_date date, \ + ); + + CREATE TABLE users ( \ + user_id bigint PRIMARY KEY, \ + is_admin boolean DEFAULT FALSE, \ + ); + +""" \ No newline at end of file