Database Table for the freelancer submissions. bigint for filesize to store the filesize in bytes (performance loss when manually querrying the OS for filesizes especially when going for folder size is worth avoiding through this)
This commit is contained in:
12
setupdb.sh
12
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;"
|
||||
|
Reference in New Issue
Block a user