diff --git a/setupdb.sh b/setupdb.sh index 38b242c..095f665 100644 --- a/setupdb.sh +++ b/setupdb.sh @@ -78,6 +78,18 @@ sudo -u postgres psql -c "CREATE TABLE aliasRoutes( routeParameter text ); " cavecomm + +sudo -u postgres psql -c "CREATE TABLE freelancerSubmissions( + freelancerID int NOT NULL, + fileName text NOT NULL, + fullPath text NOT NULL, + fileSize bigint NOT NULL, + uploadDate timestamp NOT NULL + ); +" cavecomm + +sudo -u postgres psql -c "ALTER TABLE freelancersubmissions ADD CONSTRAINT freelancersubmissions_pk PRIMARY KEY (freelancerid, filename);" cavecomm + sudo -u postgres psql cavecomm -c "GRANT ALL ON ALL FUNCTIONS IN SCHEMA public to cavecommadmin;" sudo -u postgres psql cavecomm -c "GRANT ALL ON ALL SEQUENCES IN SCHEMA public to cavecommadmin;" sudo -u postgres psql cavecomm -c "GRANT ALL ON ALL TABLES IN SCHEMA public to cavecommadmin;"