Rewrite of Database to make it ID based to eliviate coherence issues that stem from naming and to avoid extrenous processing of critical data
This commit is contained in:
27
setupdb.sh
27
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
|
||||
|
Reference in New Issue
Block a user