diff --git a/backend/init.sql b/backend/init.sql index 7c57ba46..ae26fadf 100644 --- a/backend/init.sql +++ b/backend/init.sql @@ -46,6 +46,17 @@ CREATE TABLE species ( PRIMARY KEY (species_id, protein_id) ); +/* +* Users Table +*/ +CREATE TABLE users ( + id serial PRIMARY KEY, + username text NOT NULL UNIQUE, + email text NOT NULL UNIQUE, + pword text NOT NULL, + admin boolean NOT NULL +); + /* * Inserts example species into species table */ @@ -54,4 +65,7 @@ INSERT INTO species(name) VALUES ('leptopilina boulardi'); INSERT INTO species(name) VALUES ('leptopilina heterotoma'); INSERT INTO species(name) VALUES ('unknown'); - +/* + * Inserts test user into user table + */ +INSERT INTO users(username, email, pword, admin) VALUES ('test', 'garvina@oregonstate.edu', 'password', '1'); \ No newline at end of file