add init_db
This commit is contained in:
parent
151a4e0875
commit
544f324c8b
20
db/init_db.py
Normal file
20
db/init_db.py
Normal file
|
@ -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, \
|
||||
);
|
||||
|
||||
"""
|
Reference in a new issue