This repository has been archived on 2025-02-20. You can view files and clone it, but cannot push or open issues or pull requests.
Files
cavecomm/setupdb.sh
Tina_Azure 04e41c2dce Freelancer Profile Listing
-Template, Database access, Handler
-Freelancer Database Table
2023-04-02 23:56:50 +02:00

33 lines
1.0 KiB
Bash

#!/bin/sh
sudo -u postgres createuser -P -e cavecomm
sudo -u postgres createdb --owner=cavecomm cavecomm 'contains all the information for the cavecomm instance on this device'
sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE cavecomm TO cavecomm;"
sudo -u postgres psql -c "CREATE TABLE requests(
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
customerEmailAddress text,
freelancer text,
templateName text,
currencyPreference varchar(6),
priceUpFront decimal,
priceOnDeliver decimal,
requestDescription text,
accepted boolean,
upFrontInvoiceID text,
onDeliverInvoiceID text,
upFrontPaid boolean,
onDeliverPaid boolean
);
" cavecomm
sudo -u postgres psql -c "CREATE TABLE freelancers(
id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
emailAddress text,
name text UNIQUE,
generalInformation text,
basicInformation text,
stripeAccountInformation text,
cryptoWalletAddresses text[][],
commissionLimit int,
templates text[][]
);
" cavecomm