Skip to content

Commit

Permalink
Added basic user table with test user.
Browse files Browse the repository at this point in the history
  • Loading branch information
ansengarvin committed Jan 17, 2024
1 parent f938fbd commit 21e54e9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion backend/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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');

0 comments on commit 21e54e9

Please sign in to comment.