text: CREATE TABLE account (account_id  SERIAL NOT NULL, ACCOUNTNAME VARCHAR(255) NOT NULL, ACCOUNTNUMBER VARCHAR(255) NOT NULL, CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, PRIMARY KEY (account_id))
  CREATE TABLE dataset (dataset_id  SERIAL NOT NULL, DATASETLOCATION VARCHAR(255) NOT NULL, DATASETNAME VARCHAR(255) NOT NULL, CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, PRIMARY KEY (dataset_id))
  CREATE TABLE defect (defect_id  SERIAL NOT NULL, ACTUALFIXTIME VARCHAR(255), ASSIGNEDTO VARCHAR(255), CLOSEDINVERSION VARCHAR(255), CLOSINGDATE VARCHAR(255), DEFECTDESCRIPTION VARCHAR(255), DESCRIPTION VARCHAR(10000), DETECTEDBY VARCHAR(255), DETECTEDINCYCLE VARCHAR(255), DETECTEDINRELEASE VARCHAR(255), DETECTEDINVERSION VARCHAR(255), DETECTEDONDATE VARCHAR(255), ESTIMATEDFIXTIME VARCHAR(255), FUNCTIONALITY VARCHAR(255), HPQCDEFECTID VARCHAR(255) NOT NULL, MODIFIED VARCHAR(255), PLANNEDCLOSINGVERSION VARCHAR(255), PRIORITY VARCHAR(255), PROJECT VARCHAR(255), REPRODUCIBLE VARCHAR(255), REVIEWSTATUS VARCHAR(255), ROOTCAUSE VARCHAR(255), ROUTE VARCHAR(255), SEVERITY VARCHAR(255), STATUS VARCHAR(255), STATUSCHANGECOMMENTS VARCHAR(10000), SUBJECT VARCHAR(255), SUMMARY VARCHAR(4000), TARGETCYCLE VARCHAR(255), TARGETRELEASE VARCHAR(255), TESTDAY VARCHAR(255), TRANSACTIONWEEK VARCHAR(255), CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, testExecutionID INTEGER, PRIMARY KEY (defect_id))
  CREATE TABLE feature (feature_id  SERIAL NOT NULL, BA VARCHAR(255), FEATUREDATASETCATAGOERY VARCHAR(255), FEATUREGROUPING VARCHAR(255), FEATURENAME VARCHAR(255), FEATURENUMBER VARCHAR(255) NOT NULL, FEATUREOWNER VARCHAR(255), FEATUREROLLOUT VARCHAR(1), FEATURESTATUS VARCHAR(255), FEATURETESTEXECUTION VARCHAR(255), FEATURETESTEXECUTIONPHASE VARCHAR(255), FEATURETESTSCRIPTCOMMENTS VARCHAR(4000), FEATURETESTSCRIPTNAME VARCHAR(4000), OWNER VARCHAR(255), RECORDSTATUS INTEGER, CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, PRIMARY KEY (feature_id))
  CREATE TABLE masterdata (ID  SERIAL NOT NULL, CATAGORY VARCHAR(255), FEATURECYCLE VARCHAR(255), FEATUREGROUP VARCHAR(255), FEATURERELEASE VARCHAR(255), FEATURETESTRESULT VARCHAR(255), ROLLOUT VARCHAR(255), SITCYCLE VARCHAR(255), TESTPHASE VARCHAR(255), TESTGROUP VARCHAR(255), CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, PRIMARY KEY (ID))
  CREATE TABLE route (route_id  SERIAL NOT NULL, ROUTENAME VARCHAR(255), CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, PRIMARY KEY (route_id))
  CREATE TABLE sites (sites_id  SERIAL NOT NULL, SITENAME VARCHAR(255), CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, PRIMARY KEY (sites_id))
  CREATE TABLE testExecution (TESTEXECUTIONID  SERIAL NOT NULL, ACCOUNTTESTRUN VARCHAR(255), CLARIFICATIONS VARCHAR(4000), FEATURETESTRUN VARCHAR(255), ROLLOUTSTATUS VARCHAR(255), TESTEXECUTIONPHASE VARCHAR(255), TESTEXECUTIONSTATUS VARCHAR(255), TESTGROUP VARCHAR(255), TESTOWNER VARCHAR(255), TESTSCENARIO VARCHAR(4000), TESTSCENARIODESCRIPTION VARCHAR(4000), TESTSCRIPTCOMMENTS VARCHAR(4000), TESTSCRIPTNAME VARCHAR(255), TESTSTATUS VARCHAR(255), TOTALTESTSCRIPTS INTEGER, CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, feature_id INTEGER, account_id INTEGER, dataset_id INTEGER, route_id INTEGER, sites_id INTEGER, PRIMARY KEY (TESTEXECUTIONID))
  CREATE TABLE userdetails (user_id  SERIAL NOT NULL, ACCESSLEVEL VARCHAR(255), EMPID VARCHAR(255), PASSWORD VARCHAR(255), USERNAME VARCHAR(255), CREATEDBY VARCHAR(255) NOT NULL, CREATIONDATE TIMESTAMP NOT NULL, UPDATEDBY VARCHAR(255) NOT NULL, UPDATIONDATE TIMESTAMP NOT NULL, PRIMARY KEY (user_id))
  CREATE TABLE account_defects (defect_id INTEGER NOT NULL, account_id INTEGER NOT NULL, PRIMARY KEY (defect_id, account_id))
  CREATE TABLE feature_accounts (feature_id INTEGER NOT NULL, account_id INTEGER NOT NULL, PRIMARY KEY (feature_id, account_id))
  CREATE TABLE feature_datasets (feature_id INTEGER NOT NULL, dataset_id INTEGER NOT NULL, PRIMARY KEY (feature_id, dataset_id))
  CREATE TABLE feature_defects (feature_id INTEGER NOT NULL, defect_id INTEGER NOT NULL, PRIMARY KEY (feature_id, defect_id))
  CREATE TABLE feature_sites (sites_id INTEGER NOT NULL, feature_id INTEGER NOT NULL, PRIMARY KEY (sites_id, feature_id))
  CREATE TABLE feature_routes (route_id INTEGER NOT NULL, feature_id INTEGER NOT NULL, PRIMARY KEY (route_id, feature_id))
  CREATE TABLE feature_testExecution (Feature_feature_id INTEGER NOT NULL, testExecution_TESTEXECUTIONID INTEGER NOT NULL, PRIMARY KEY (Feature_feature_id, testExecution_TESTEXECUTIONID))
  CREATE TABLE testExecution_defect (TestExecution_TESTEXECUTIONID INTEGER NOT NULL, defectslist_defect_id INTEGER NOT NULL, PRIMARY KEY (TestExecution_TESTEXECUTIONID, defectslist_defect_id))
  ALTER TABLE defect ADD CONSTRAINT FK_defect_testExecutionID FOREIGN KEY (testExecutionID) REFERENCES testExecution (TESTEXECUTIONID)
  ALTER TABLE testExecution ADD CONSTRAINT FK_testExecution_account_id FOREIGN KEY (account_id) REFERENCES account (account_id)
  ALTER TABLE testExecution ADD CONSTRAINT FK_testExecution_sites_id FOREIGN KEY (sites_id) REFERENCES sites (sites_id)
  ALTER TABLE testExecution ADD CONSTRAINT FK_testExecution_dataset_id FOREIGN KEY (dataset_id) REFERENCES dataset (dataset_id)
  ALTER TABLE testExecution ADD CONSTRAINT FK_testExecution_route_id FOREIGN KEY (route_id) REFERENCES route (route_id)
  ALTER TABLE testExecution ADD CONSTRAINT FK_testExecution_feature_id FOREIGN KEY (feature_id) REFERENCES feature (feature_id)
  ALTER TABLE account_defects ADD CONSTRAINT FK_account_defects_defect_id FOREIGN KEY (defect_id) REFERENCES account (account_id)
  ALTER TABLE account_defects ADD CONSTRAINT FK_account_defects_account_id FOREIGN KEY (account_id) REFERENCES defect (defect_id)
  ALTER TABLE feature_accounts ADD CONSTRAINT FK_feature_accounts_account_id FOREIGN KEY (account_id) REFERENCES feature (feature_id)
  ALTER TABLE feature_accounts ADD CONSTRAINT FK_feature_accounts_feature_id FOREIGN KEY (feature_id) REFERENCES account (account_id)
  ALTER TABLE feature_datasets ADD CONSTRAINT FK_feature_datasets_dataset_id FOREIGN KEY (dataset_id) REFERENCES feature (feature_id)
  ALTER TABLE feature_datasets ADD CONSTRAINT FK_feature_datasets_feature_id FOREIGN KEY (feature_id) REFERENCES dataset (dataset_id)
  ALTER TABLE feature_defects ADD CONSTRAINT FK_feature_defects_feature_id FOREIGN KEY (feature_id) REFERENCES defect (defect_id)
  ALTER TABLE feature_defects ADD CONSTRAINT FK_feature_defects_defect_id FOREIGN KEY (defect_id) REFERENCES feature (feature_id)
  ALTER TABLE feature_sites ADD CONSTRAINT FK_feature_sites_sites_id FOREIGN KEY (sites_id) REFERENCES feature (feature_id)
  ALTER TABLE feature_sites ADD CONSTRAINT FK_feature_sites_feature_id FOREIGN KEY (feature_id) REFERENCES sites (sites_id)
  ALTER TABLE feature_routes ADD CONSTRAINT FK_feature_routes_route_id FOREIGN KEY (route_id) REFERENCES feature (feature_id)
  ALTER TABLE feature_routes ADD CONSTRAINT FK_feature_routes_feature_id FOREIGN KEY (feature_id) REFERENCES route (route_id)
  ALTER TABLE feature_testExecution ADD CONSTRAINT FK_feature_testExecution_Feature_feature_id FOREIGN KEY (Feature_feature_id) REFERENCES feature (feature_id)
  ALTER TABLE feature_testExecution ADD CONSTRAINT FK_feature_testExecution_testExecution_TESTEXECUTIONID FOREIGN KEY (testExecution_TESTEXECUTIONID) REFERENCES testExecution (TESTEXECUTIONID)
  ALTER TABLE testExecution_defect ADD CONSTRAINT FK_testExecution_defect_TestExecution_TESTEXECUTIONID FOREIGN KEY (TestExecution_TESTEXECUTIONID) REFERENCES testExecution (TESTEXECUTIONID)
  ALTER TABLE testExecution_defect ADD CONSTRAINT FK_testExecution_defect_defectslist_defect_id FOREIGN KEY (defectslist_defect_id) REFERENCES defect (defect_id)
  