diff --git a/setupdb.sh b/setupdb.sh index a637570..3db8adb 100644 --- a/setupdb.sh +++ b/setupdb.sh @@ -5,8 +5,8 @@ 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, + freelancerID INT, + templateID INT, currencyPreference varchar(6), priceUpFront decimal, priceOnDeliver decimal, @@ -18,15 +18,30 @@ sudo -u postgres psql -c "CREATE TABLE requests( onDeliverPaid boolean ); " cavecomm + sudo -u postgres psql -c "CREATE TABLE freelancers( id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, emailAddress text, - name text UNIQUE, + name text, generalInformation text, basicInformation text, stripeAccountInformation text, - cryptoWalletAddresses text[][], - commissionLimit int, - templates text[][] + commissionLimit int + ); +" cavecomm + +sudo -u postgres psql -c "CREATE TABLE templates( + id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, + freelancerID int, + name text, + content text + ); +" cavecomm + +sudo -u postgres psql -c "CREATE TABLE cryptoWallets( + id INT PRIMARY KEY GENERATED ALWAYS AS IDENTITY, + freelancerID int, + name text, + walletAddress text ); " cavecomm