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:
Tina_Azure
2023-07-18 13:48:31 +02:00
parent 909a19e9fb
commit 4fde3a96d5

View File

@ -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;"