10:34:02 [ERR][ grt]: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') VISIBLE) ENGINE = InnoDB' at line 15
Posted by: Haywood Parker
Date: October 04, 2023 08:05PM
Date: October 04, 2023 08:05PM
Please Help, I'm so frustrated.
I created the EER Diagram with MySql Workbench.
I made sure that I was attached to the AWS RDS Database Instance
Then I Forward Engineered the EER Diagram from MySql Workbench
This is the Code it generated.
It gets a 1064 Error no matter what I seem to do.
I'm so confused.
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- -----------------------------------------------------
-- Schema BTCBBFDB7
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema BTCBBFDB7
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `BTCBBFDB7` DEFAULT CHARACTER SET utf8 ;
USE `BTCBBFDB7` ;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Finance`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Finance` (
`Tran_Id` INT(9) UNSIGNED NOT NULL AUTO_INCREMENT,
`Location_Num` INT(3) NOT NULL,
`Subject` VARCHAR(90) NOT NULL,
`Amount` DECIMAL(6,2) UNSIGNED NOT NULL,
`CashOnHand` DECIMAL(6,2) NOT NULL,
`MonthlyBudgetAmount` DECIMAL(6,2) NOT NULL,
`LocationPayroll` DECIMAL(6,2) UNSIGNED NOT NULL,
`MonthlyTaxesPaid` DECIMAL(6,2) NOT NULL,
`Tran_Date` DATETIME NOT NULL,
PRIMARY KEY (`Tran_Id`),
UNIQUE INDEX `Tran_Id_UNIQUE` (`Tran_Id` ASC) VISIBLE,
UNIQUE INDEX `Location_Num_UNIQUE` (`Location_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Location`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Location` (
`Location_Num` INT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
`Location_Name` VARCHAR(45) NOT NULL,
`Location_City` VARCHAR(45) NOT NULL,
`Location_State` VARCHAR(4) NOT NULL,
`Location_Zip` VARCHAR(5) NOT NULL,
`Location_Home_Phone` VARCHAR(10) NOT NULL,
`Location_Rent` DECIMAL(7,2) NOT NULL,
`Location_Water` DECIMAL(7,2) NOT NULL,
`Location_Lights` DECIMAL(7,2) NOT NULL,
`Location_Gas` DECIMAL(7,2) NOT NULL,
`Location_Internet` DECIMAL(7,2) NOT NULL,
`Location_Manager` DECIMAL(7,2) NOT NULL,
`Location_Insurance` DECIMAL(7,2) NOT NULL,
`Location_County_Taxes` DECIMAL(7,2) NOT NULL,
PRIMARY KEY (`Location_Num`),
UNIQUE INDEX `Location_Num_UNIQUE` (`Location_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Staff`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Staff` (
`Staff_ID_Num` INT(4) UNSIGNED NOT NULL AUTO_INCREMENT,
`First_Name` VARCHAR(45) NULL,
`Last_Name` VARCHAR(45) NULL,
`Staff_Position` VARCHAR(45) NULL,
`Department_ID` INT(3) NULL,
PRIMARY KEY (`Staff_ID_Num`),
UNIQUE INDEX `Staff_ID_Num_UNIQUE` (`Staff_ID_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Services`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Services` (
`Client_Engagement_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Client_Num` INT(6) UNSIGNED NOT NULL,
`Client_Needs_Job` TINYINT(1) NULL,
`Client_Needs_Training` TINYINT(1) NULL,
`Client_Needs_Resume` TINYINT(1) NULL,
`Client_Needs_US_VISA` TINYINT(1) NULL,
`Client_Needs_Community_Hours` TINYINT(1) NULL,
`Client_Needs_Record_Expunged` TINYINT(1) NULL,
`Client_Needs_Food` TINYINT(1) NULL,
`Client_Needs_Clothing` TINYINT(1) NULL,
`Client_Needs_Haircut` TINYINT(1) NULL,
`Client_Needs_Housing` TINYINT(1) NULL,
`Client_Needs_Spiritual_Guidance` TINYINT(1) NULL,
`Client_Needs_Medical_Care` TINYINT(1) NULL,
`Client_IS_A_VET` TINYINT(1) NULL,
`Client_Needs_Caregiver` TINYINT(1) NULL,
`Client_Assessment_Date` DATETIME NULL,
`Staff_ID_Num` INT(4) NULL,
PRIMARY KEY (`Client_Engagement_Num`),
UNIQUE INDEX `Client_Engagement_Num_UNIQUE` (`Client_Engagement_Num` ASC) VISIBLE,
UNIQUE INDEX `Client_Num_UNIQUE` (`Client_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Renters`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Renters` (
`Renters_ID_Num` INT(6) UNSIGNED NOT NULL,
`Client_Num` INT(6) NOT NULL,
`Client_Rental_Date` DATETIME NOT NULL,
`Client_Two_Forms_Of_ID` TINYINT(1) NOT NULL,
`Property_ID_Num` INT(6) NOT NULL,
`Monthly_Rent_Amount` DECIMAL(7,2) NOT NULL,
`Date_Client_Rented` DATETIME NOT NULL,
`Client_Preferred_Area` VARCHAR(45) NOT NULL,
`Client_Max_Rental_Amount` DECIMAL(7,2) NOT NULL,
`Client_Rental_Size_Needed` VARCHAR(45) NOT NULL,
`Client_8AVoucher_Approved` TINYINT(1) NOT NULL,
`Rental_Deposit_Amount_Required` DECIMAL(7,2) NOT NULL,
`Clients_Proof_Of_Income_Verified` TINYINT(1) NOT NULL,
`Picture_Of_Client_Employee_Check` BLOB NOT NULL,
`Picture_Of_Clients_Rental_Check` BLOB NOT NULL,
`Picture_Of_Clients_Deposit_Check` BLOB NOT NULL,
`Client_Rental_Background_Check_Completed` TINYINT(1) NOT NULL,
PRIMARY KEY (`Renters_ID_Num`),
UNIQUE INDEX `Renters_ID_Num_UNIQUE` (`Renters_ID_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`table1`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`table1` (
)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Properties_Being_Rehabbed`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Properties_Being_Rehabbed` (
`Property_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Client_Num` INT(6) NOT NULL,
`Renters_Id_Num` INT(6) NULL,
`Property_Inspection_Date` DATETIME NOT NULL,
`Property_Inspection_Assigned_To` VARCHAR(45) NOT NULL,
`Property_Sourced_From` VARCHAR(45) NOT NULL,
`Property_Statement_Of_Work` BLOB NOT NULL,
`Property_Total_Rehab_Estimate` DECIMAL(7,2) NOT NULL,
`Property_Construction_Permits_Pulled` TINYINT(1) NULL,
`Pictures_Of_Construction_Permits` BLOB NULL,
`Property_Monthly_Water_Bill` DECIMAL(7,2) NULL,
`Property_Water_Provider` VARCHAR(45) NULL,
`Property_Monthly_Gas_Bill` DECIMAL(7,2) NULL,
`Property_Gas_Provider` VARCHAR(45) NULL,
`Property_Monthly_Electric_Bill` DECIMAL(7,2) NULL,
`Property_Electric_Provider` VARCHAR(45) NULL,
`Property_Monthly_Internet_Bill` DECIMAL(7,2) NULL,
`Property_Yearly_Real_Estate_Taxes` DECIMAL(7,2) NULL,
`Property_Monthly_HomeOwners_Insurance_Bill` DECIMAL(7,2) NULL,
PRIMARY KEY (`Property_Id_Num`),
UNIQUE INDEX `Property_Id_Num_UNIQUE` (`Property_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Real_Estate_Source`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Real_Estate_Source` (
`Property_Id_Num` INT(6) NOT NULL,
`Renters_Id_Num` INT(6) NULL,
`Client_Id_Num` INT(6) NULL,
`Property_Street_Address` VARCHAR(45) NULL,
`Property_City` VARCHAR(45) NULL,
`Property_State` VARCHAR(4) NULL,
`Property_Zip` VARCHAR(5) NULL,
`Is_Property_A_Foreclosure` TINYINT(1) NULL,
`Property_Title_Company` VARCHAR(45) NULL,
`Property_Title_Company_Phone_Number` INT(10) NULL,
`Property_Title_Company_Contact` VARCHAR(45) NULL,
`Bank_Who_Holds_Title` VARCHAR(45) NULL,
`Property_Possession_Amount` DECIMAL(7,2) NULL,
PRIMARY KEY (`Property_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`DWS_Employees`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`DWS_Employees` (
`Employee_Id_Num` INT(6) NOT NULL,
`Employee_Contract_Assigned_Number` INT(6) NOT NULL,
`Employee_First_Name` VARCHAR(45) NOT NULL,
`Employee_Last_Name` VARCHAR(45) NOT NULL,
`Employee_Start_Date` DATETIME NOT NULL,
`Employee_Part_Time` TINYINT(1) NOT NULL,
`Employee_Full_Time` INT(1) NOT NULL,
`Employee_Job_Title` VARCHAR(45) NOT NULL,
`Employee_Job_Description` VARCHAR(45) NOT NULL,
`Employee_Supervisor` VARCHAR(45) NOT NULL,
`Employee_Supervisor_Phone_Number` INT(10) NOT NULL,
`Employee_Hourly_Pay` DECIMAL(7,2) UNSIGNED NOT NULL,
PRIMARY KEY (`Employee_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`DWS_Staffing_Contracts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`DWS_Staffing_Contracts` (
`Staff_Contract_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Staff_Contract_Name` VARCHAR(45) NOT NULL,
`Staff_Contract_Address` VARCHAR(45) NOT NULL,
`Staff_Contract_City` VARCHAR(45) NOT NULL,
`Staff_Contract_State` VARCHAR(4) NOT NULL,
`Staff_Contract_Zip` VARCHAR(5) NOT NULL,
`Staff_Contract_Phone_Number` INT(10) NOT NULL,
`Staff_Contract_Contact_Name` VARCHAR(45) NOT NULL,
`Staff_Contract_Total_Hours` INT(7) NOT NULL,
`Staff_Contract_Hourly_Contract_Wage` DECIMAL(7,2) NOT NULL,
`Staff_Contract_Employee_Wage` DECIMAL(7,2) NOT NULL,
PRIMARY KEY (`Staff_Contract_Id_Num`),
UNIQUE INDEX `Staff_Contract_Id_Num_UNIQUE` (`Staff_Contract_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`BTCBBF_Core_Business`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`BTCBBF_Core_Business` (
`Engagement_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Job Services` VARCHAR(45) NULL,
`Housing Services` VARCHAR(45) NULL,
`Food Services` VARCHAR(45) NULL,
`Immigration Services` VARCHAR(45) NULL,
`Mental Health Services` VARCHAR(45) NULL,
`Veteran Services` VARCHAR(45) NULL,
`Community Hour Services` VARCHAR(45) NULL,
`Legal Services` VARCHAR(45) NULL,
PRIMARY KEY (`Engagement_Id_Num`),
UNIQUE INDEX `Engagement_Id_Num_UNIQUE` (`Engagement_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Departments`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Departments` (
`Department_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`BTCBBF_Core_Business` VARCHAR(45) NULL,
`DWS Staffing` VARCHAR(45) NULL,
`WPTC_Training` VARCHAR(45) NULL,
`BTCBBF Housing` VARCHAR(45) NULL,
PRIMARY KEY (`Department_Id_Num`),
UNIQUE INDEX `Department_Id_Num_UNIQUE` (`Department_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`WPTC_Training`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`WPTC_Training` (
`Student_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Department_Id_Num` INT(6) NOT NULL,
`Client_Num` INT(6) NOT NULL,
`Student_First_Name` VARCHAR(45) NULL,
`Student-Last_Name` VARCHAR(45) NULL,
`Student_Entered_Into_Populi` VARCHAR(45) NULL,
PRIMARY KEY (`Student_Id_Num`),
UNIQUE INDEX `Student_Id_Num_UNIQUE` (`Student_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Contacts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Contacts` (
`Contact_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Client_Num` INT(6) NOT NULL,
`Contact_First_Name` VARCHAR(45) NOT NULL,
`Contact_Last_Name` VARCHAR(45) NOT NULL,
`Contact_Middle_Iniitial` VARCHAR(2) NOT NULL,
`Contact_Email_Address` VARCHAR(255) NOT NULL,
`Contact_City` VARCHAR(45) NOT NULL,
`Contact_State` VARCHAR(4) NOT NULL,
`Contact_Zip` VARCHAR(5) NOT NULL,
`Contact_Home_Phone` INT(10) NOT NULL,
`Contact_Cell_Phone` INT(10) NOT NULL,
`Contact_Date` DATETIME NOT NULL,
PRIMARY KEY (`Contact_Num`),
UNIQUE INDEX `Contact_Num_UNIQUE` (`Contact_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Clients`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Clients` (
`Clients_Num` INT(6) NOT NULL,
`Contact_Num` INT(6) NOT NULL,
`Clients_Photo` BLOB NULL,
`Location_Num` INT(3) NOT NULL,
`Clients_Driver_License` VARCHAR(45) NULL,
`Photo_Of_Clients_Drivers_License` BLOB NULL,
`Clients_SSN` VARCHAR(45) NULL,
`Client_Is_A_US_Citizen` TINYINT(1) NULL,
`Client_Is_An_Ex_Offender` TINYINT(1) NULL,
`Client-Is_Homeless` TINYINT(1) NULL,
`Client_Is_Victim_Of_Domestic_Violence` TINYINT(1) NULL,
`Client_Is_A_Veteran` TINYINT(1) NULL,
`Photo_Of_Clients_DD214` BLOB NULL,
`Client_Is_An_Immigrant` TINYINT(1) NULL,
PRIMARY KEY (`Clients_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Contractors`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Contractors` (
`Contrators_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Property_Id_Num` INT(6) NOT NULL,
`Contractors_First_Name` VARCHAR(45) NOT NULL,
`Contractors_Last_Name` VARCHAR(45) NOT NULL,
`Contractors_Email_Address` VARCHAR(45) NOT NULL,
`Contractors_Phone_Number` INT(10) NOT NULL,
`Contractors_Street_Address` VARCHAR(255) NOT NULL,
`Contractors_City` VARCHAR(45) NOT NULL,
`Contractors_State` VARCHAR(4) NOT NULL,
`Contractors_Zip` VARCHAR(5) NOT NULL,
`Contractors_Business_Name` VARCHAR(45) NOT NULL,
`Contractors_EIN_Number` VARCHAR(45) NOT NULL,
`Contractors_Licensed` TINYINT(1) NULL,
`Contractor_Insured` TINYINT(1) NULL,
`Contractor_Bonded` TINYINT(1) NULL,
`Contractors_Trade` VARCHAR(45) NOT NULL,
PRIMARY KEY (`Contrators_Id_Num`),
UNIQUE INDEX `Contrators_Id_Num_UNIQUE` (`Contrators_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Materials`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Materials` (
`Item_Id_Num` INT(6) NOT NULL,
`Task_Id_Num` INT(6) NOT NULL,
`Purchase_Date` VARCHAR(45) NOT NULL,
`Store_Bought_From` VARCHAR(45) NOT NULL,
`Item_Name` VARCHAR(90) NOT NULL,
`Item_Quantity` INT(5) NOT NULL,
`Item_Description` VARCHAR(255) NOT NULL,
`Item_Price` DECIMAL(7,2) NOT NULL,
`Photo_Of_Receipt` BLOB NOT NULL,
`Approved_Bye` VARCHAR(45) NOT NULL,
PRIMARY KEY (`Item_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Tasks`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Tasks` (
`Task_Id_Num` INT(6) NOT NULL,
`Property_Id_Num` INT(6) NULL,
`Item_Id_Num` INT(6) NULL,
`Task_Creation_Date` DATETIME NULL,
`Task_Description` VARCHAR(255) NULL,
`What_PreRequisite_Is_Required` VARCHAR(45) NULL,
`Task_Trade_Assigned` VARCHAR(45) NULL,
`Task_Contractor_Assigned` VARCHAR(45) NULL,
`Task_Status` VARCHAR(45) NULL,
`Taks_Completed_Contractor_Signature` VARCHAR(45) NULL,
`Task_Prior_Approval-Required` TINYINT(1) NULL,
`Task_Approved_By` VARCHAR(45) NULL,
`Task_Materials_Required` VARCHAR(45) NULL,
PRIMARY KEY (`Task_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Inspections`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Inspections` (
`Inspection_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Property_Id_Num` INT(6) NOT NULL,
`Inspector_Assigned` VARCHAR(45) NULL,
`Inspection_Date` DATETIME NULL,
`Issue_Description` VARCHAR(45) NULL,
`Photo_Of_Issue` BLOB NULL,
`Photo_Of_North_Property` BLOB NULL,
`Photo_Of_South_Property` BLOB NULL,
`Photo_Of_East_Property` BLOB NULL,
`Photo_Of_West_Property` BLOB NULL,
`Scope_Of_Work_Document` BLOB NULL,
`Total_Remediation_Estimate` DECIMAL(7,2) NULL,
PRIMARY KEY (`Inspection_Id_Num`),
UNIQUE INDEX `Inspection_Id_Num_UNIQUE` (`Inspection_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
I created the EER Diagram with MySql Workbench.
I made sure that I was attached to the AWS RDS Database Instance
Then I Forward Engineered the EER Diagram from MySql Workbench
This is the Code it generated.
It gets a 1064 Error no matter what I seem to do.
I'm so confused.
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- -----------------------------------------------------
-- Schema BTCBBFDB7
-- -----------------------------------------------------
-- -----------------------------------------------------
-- Schema BTCBBFDB7
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `BTCBBFDB7` DEFAULT CHARACTER SET utf8 ;
USE `BTCBBFDB7` ;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Finance`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Finance` (
`Tran_Id` INT(9) UNSIGNED NOT NULL AUTO_INCREMENT,
`Location_Num` INT(3) NOT NULL,
`Subject` VARCHAR(90) NOT NULL,
`Amount` DECIMAL(6,2) UNSIGNED NOT NULL,
`CashOnHand` DECIMAL(6,2) NOT NULL,
`MonthlyBudgetAmount` DECIMAL(6,2) NOT NULL,
`LocationPayroll` DECIMAL(6,2) UNSIGNED NOT NULL,
`MonthlyTaxesPaid` DECIMAL(6,2) NOT NULL,
`Tran_Date` DATETIME NOT NULL,
PRIMARY KEY (`Tran_Id`),
UNIQUE INDEX `Tran_Id_UNIQUE` (`Tran_Id` ASC) VISIBLE,
UNIQUE INDEX `Location_Num_UNIQUE` (`Location_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Location`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Location` (
`Location_Num` INT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
`Location_Name` VARCHAR(45) NOT NULL,
`Location_City` VARCHAR(45) NOT NULL,
`Location_State` VARCHAR(4) NOT NULL,
`Location_Zip` VARCHAR(5) NOT NULL,
`Location_Home_Phone` VARCHAR(10) NOT NULL,
`Location_Rent` DECIMAL(7,2) NOT NULL,
`Location_Water` DECIMAL(7,2) NOT NULL,
`Location_Lights` DECIMAL(7,2) NOT NULL,
`Location_Gas` DECIMAL(7,2) NOT NULL,
`Location_Internet` DECIMAL(7,2) NOT NULL,
`Location_Manager` DECIMAL(7,2) NOT NULL,
`Location_Insurance` DECIMAL(7,2) NOT NULL,
`Location_County_Taxes` DECIMAL(7,2) NOT NULL,
PRIMARY KEY (`Location_Num`),
UNIQUE INDEX `Location_Num_UNIQUE` (`Location_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Staff`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Staff` (
`Staff_ID_Num` INT(4) UNSIGNED NOT NULL AUTO_INCREMENT,
`First_Name` VARCHAR(45) NULL,
`Last_Name` VARCHAR(45) NULL,
`Staff_Position` VARCHAR(45) NULL,
`Department_ID` INT(3) NULL,
PRIMARY KEY (`Staff_ID_Num`),
UNIQUE INDEX `Staff_ID_Num_UNIQUE` (`Staff_ID_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Services`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Services` (
`Client_Engagement_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Client_Num` INT(6) UNSIGNED NOT NULL,
`Client_Needs_Job` TINYINT(1) NULL,
`Client_Needs_Training` TINYINT(1) NULL,
`Client_Needs_Resume` TINYINT(1) NULL,
`Client_Needs_US_VISA` TINYINT(1) NULL,
`Client_Needs_Community_Hours` TINYINT(1) NULL,
`Client_Needs_Record_Expunged` TINYINT(1) NULL,
`Client_Needs_Food` TINYINT(1) NULL,
`Client_Needs_Clothing` TINYINT(1) NULL,
`Client_Needs_Haircut` TINYINT(1) NULL,
`Client_Needs_Housing` TINYINT(1) NULL,
`Client_Needs_Spiritual_Guidance` TINYINT(1) NULL,
`Client_Needs_Medical_Care` TINYINT(1) NULL,
`Client_IS_A_VET` TINYINT(1) NULL,
`Client_Needs_Caregiver` TINYINT(1) NULL,
`Client_Assessment_Date` DATETIME NULL,
`Staff_ID_Num` INT(4) NULL,
PRIMARY KEY (`Client_Engagement_Num`),
UNIQUE INDEX `Client_Engagement_Num_UNIQUE` (`Client_Engagement_Num` ASC) VISIBLE,
UNIQUE INDEX `Client_Num_UNIQUE` (`Client_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Renters`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Renters` (
`Renters_ID_Num` INT(6) UNSIGNED NOT NULL,
`Client_Num` INT(6) NOT NULL,
`Client_Rental_Date` DATETIME NOT NULL,
`Client_Two_Forms_Of_ID` TINYINT(1) NOT NULL,
`Property_ID_Num` INT(6) NOT NULL,
`Monthly_Rent_Amount` DECIMAL(7,2) NOT NULL,
`Date_Client_Rented` DATETIME NOT NULL,
`Client_Preferred_Area` VARCHAR(45) NOT NULL,
`Client_Max_Rental_Amount` DECIMAL(7,2) NOT NULL,
`Client_Rental_Size_Needed` VARCHAR(45) NOT NULL,
`Client_8AVoucher_Approved` TINYINT(1) NOT NULL,
`Rental_Deposit_Amount_Required` DECIMAL(7,2) NOT NULL,
`Clients_Proof_Of_Income_Verified` TINYINT(1) NOT NULL,
`Picture_Of_Client_Employee_Check` BLOB NOT NULL,
`Picture_Of_Clients_Rental_Check` BLOB NOT NULL,
`Picture_Of_Clients_Deposit_Check` BLOB NOT NULL,
`Client_Rental_Background_Check_Completed` TINYINT(1) NOT NULL,
PRIMARY KEY (`Renters_ID_Num`),
UNIQUE INDEX `Renters_ID_Num_UNIQUE` (`Renters_ID_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`table1`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`table1` (
)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Properties_Being_Rehabbed`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Properties_Being_Rehabbed` (
`Property_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Client_Num` INT(6) NOT NULL,
`Renters_Id_Num` INT(6) NULL,
`Property_Inspection_Date` DATETIME NOT NULL,
`Property_Inspection_Assigned_To` VARCHAR(45) NOT NULL,
`Property_Sourced_From` VARCHAR(45) NOT NULL,
`Property_Statement_Of_Work` BLOB NOT NULL,
`Property_Total_Rehab_Estimate` DECIMAL(7,2) NOT NULL,
`Property_Construction_Permits_Pulled` TINYINT(1) NULL,
`Pictures_Of_Construction_Permits` BLOB NULL,
`Property_Monthly_Water_Bill` DECIMAL(7,2) NULL,
`Property_Water_Provider` VARCHAR(45) NULL,
`Property_Monthly_Gas_Bill` DECIMAL(7,2) NULL,
`Property_Gas_Provider` VARCHAR(45) NULL,
`Property_Monthly_Electric_Bill` DECIMAL(7,2) NULL,
`Property_Electric_Provider` VARCHAR(45) NULL,
`Property_Monthly_Internet_Bill` DECIMAL(7,2) NULL,
`Property_Yearly_Real_Estate_Taxes` DECIMAL(7,2) NULL,
`Property_Monthly_HomeOwners_Insurance_Bill` DECIMAL(7,2) NULL,
PRIMARY KEY (`Property_Id_Num`),
UNIQUE INDEX `Property_Id_Num_UNIQUE` (`Property_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Real_Estate_Source`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Real_Estate_Source` (
`Property_Id_Num` INT(6) NOT NULL,
`Renters_Id_Num` INT(6) NULL,
`Client_Id_Num` INT(6) NULL,
`Property_Street_Address` VARCHAR(45) NULL,
`Property_City` VARCHAR(45) NULL,
`Property_State` VARCHAR(4) NULL,
`Property_Zip` VARCHAR(5) NULL,
`Is_Property_A_Foreclosure` TINYINT(1) NULL,
`Property_Title_Company` VARCHAR(45) NULL,
`Property_Title_Company_Phone_Number` INT(10) NULL,
`Property_Title_Company_Contact` VARCHAR(45) NULL,
`Bank_Who_Holds_Title` VARCHAR(45) NULL,
`Property_Possession_Amount` DECIMAL(7,2) NULL,
PRIMARY KEY (`Property_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`DWS_Employees`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`DWS_Employees` (
`Employee_Id_Num` INT(6) NOT NULL,
`Employee_Contract_Assigned_Number` INT(6) NOT NULL,
`Employee_First_Name` VARCHAR(45) NOT NULL,
`Employee_Last_Name` VARCHAR(45) NOT NULL,
`Employee_Start_Date` DATETIME NOT NULL,
`Employee_Part_Time` TINYINT(1) NOT NULL,
`Employee_Full_Time` INT(1) NOT NULL,
`Employee_Job_Title` VARCHAR(45) NOT NULL,
`Employee_Job_Description` VARCHAR(45) NOT NULL,
`Employee_Supervisor` VARCHAR(45) NOT NULL,
`Employee_Supervisor_Phone_Number` INT(10) NOT NULL,
`Employee_Hourly_Pay` DECIMAL(7,2) UNSIGNED NOT NULL,
PRIMARY KEY (`Employee_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`DWS_Staffing_Contracts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`DWS_Staffing_Contracts` (
`Staff_Contract_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Staff_Contract_Name` VARCHAR(45) NOT NULL,
`Staff_Contract_Address` VARCHAR(45) NOT NULL,
`Staff_Contract_City` VARCHAR(45) NOT NULL,
`Staff_Contract_State` VARCHAR(4) NOT NULL,
`Staff_Contract_Zip` VARCHAR(5) NOT NULL,
`Staff_Contract_Phone_Number` INT(10) NOT NULL,
`Staff_Contract_Contact_Name` VARCHAR(45) NOT NULL,
`Staff_Contract_Total_Hours` INT(7) NOT NULL,
`Staff_Contract_Hourly_Contract_Wage` DECIMAL(7,2) NOT NULL,
`Staff_Contract_Employee_Wage` DECIMAL(7,2) NOT NULL,
PRIMARY KEY (`Staff_Contract_Id_Num`),
UNIQUE INDEX `Staff_Contract_Id_Num_UNIQUE` (`Staff_Contract_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`BTCBBF_Core_Business`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`BTCBBF_Core_Business` (
`Engagement_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Job Services` VARCHAR(45) NULL,
`Housing Services` VARCHAR(45) NULL,
`Food Services` VARCHAR(45) NULL,
`Immigration Services` VARCHAR(45) NULL,
`Mental Health Services` VARCHAR(45) NULL,
`Veteran Services` VARCHAR(45) NULL,
`Community Hour Services` VARCHAR(45) NULL,
`Legal Services` VARCHAR(45) NULL,
PRIMARY KEY (`Engagement_Id_Num`),
UNIQUE INDEX `Engagement_Id_Num_UNIQUE` (`Engagement_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Departments`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Departments` (
`Department_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`BTCBBF_Core_Business` VARCHAR(45) NULL,
`DWS Staffing` VARCHAR(45) NULL,
`WPTC_Training` VARCHAR(45) NULL,
`BTCBBF Housing` VARCHAR(45) NULL,
PRIMARY KEY (`Department_Id_Num`),
UNIQUE INDEX `Department_Id_Num_UNIQUE` (`Department_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`WPTC_Training`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`WPTC_Training` (
`Student_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Department_Id_Num` INT(6) NOT NULL,
`Client_Num` INT(6) NOT NULL,
`Student_First_Name` VARCHAR(45) NULL,
`Student-Last_Name` VARCHAR(45) NULL,
`Student_Entered_Into_Populi` VARCHAR(45) NULL,
PRIMARY KEY (`Student_Id_Num`),
UNIQUE INDEX `Student_Id_Num_UNIQUE` (`Student_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Contacts`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Contacts` (
`Contact_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Client_Num` INT(6) NOT NULL,
`Contact_First_Name` VARCHAR(45) NOT NULL,
`Contact_Last_Name` VARCHAR(45) NOT NULL,
`Contact_Middle_Iniitial` VARCHAR(2) NOT NULL,
`Contact_Email_Address` VARCHAR(255) NOT NULL,
`Contact_City` VARCHAR(45) NOT NULL,
`Contact_State` VARCHAR(4) NOT NULL,
`Contact_Zip` VARCHAR(5) NOT NULL,
`Contact_Home_Phone` INT(10) NOT NULL,
`Contact_Cell_Phone` INT(10) NOT NULL,
`Contact_Date` DATETIME NOT NULL,
PRIMARY KEY (`Contact_Num`),
UNIQUE INDEX `Contact_Num_UNIQUE` (`Contact_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Clients`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Clients` (
`Clients_Num` INT(6) NOT NULL,
`Contact_Num` INT(6) NOT NULL,
`Clients_Photo` BLOB NULL,
`Location_Num` INT(3) NOT NULL,
`Clients_Driver_License` VARCHAR(45) NULL,
`Photo_Of_Clients_Drivers_License` BLOB NULL,
`Clients_SSN` VARCHAR(45) NULL,
`Client_Is_A_US_Citizen` TINYINT(1) NULL,
`Client_Is_An_Ex_Offender` TINYINT(1) NULL,
`Client-Is_Homeless` TINYINT(1) NULL,
`Client_Is_Victim_Of_Domestic_Violence` TINYINT(1) NULL,
`Client_Is_A_Veteran` TINYINT(1) NULL,
`Photo_Of_Clients_DD214` BLOB NULL,
`Client_Is_An_Immigrant` TINYINT(1) NULL,
PRIMARY KEY (`Clients_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Contractors`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Contractors` (
`Contrators_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Property_Id_Num` INT(6) NOT NULL,
`Contractors_First_Name` VARCHAR(45) NOT NULL,
`Contractors_Last_Name` VARCHAR(45) NOT NULL,
`Contractors_Email_Address` VARCHAR(45) NOT NULL,
`Contractors_Phone_Number` INT(10) NOT NULL,
`Contractors_Street_Address` VARCHAR(255) NOT NULL,
`Contractors_City` VARCHAR(45) NOT NULL,
`Contractors_State` VARCHAR(4) NOT NULL,
`Contractors_Zip` VARCHAR(5) NOT NULL,
`Contractors_Business_Name` VARCHAR(45) NOT NULL,
`Contractors_EIN_Number` VARCHAR(45) NOT NULL,
`Contractors_Licensed` TINYINT(1) NULL,
`Contractor_Insured` TINYINT(1) NULL,
`Contractor_Bonded` TINYINT(1) NULL,
`Contractors_Trade` VARCHAR(45) NOT NULL,
PRIMARY KEY (`Contrators_Id_Num`),
UNIQUE INDEX `Contrators_Id_Num_UNIQUE` (`Contrators_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Materials`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Materials` (
`Item_Id_Num` INT(6) NOT NULL,
`Task_Id_Num` INT(6) NOT NULL,
`Purchase_Date` VARCHAR(45) NOT NULL,
`Store_Bought_From` VARCHAR(45) NOT NULL,
`Item_Name` VARCHAR(90) NOT NULL,
`Item_Quantity` INT(5) NOT NULL,
`Item_Description` VARCHAR(255) NOT NULL,
`Item_Price` DECIMAL(7,2) NOT NULL,
`Photo_Of_Receipt` BLOB NOT NULL,
`Approved_Bye` VARCHAR(45) NOT NULL,
PRIMARY KEY (`Item_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Tasks`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Tasks` (
`Task_Id_Num` INT(6) NOT NULL,
`Property_Id_Num` INT(6) NULL,
`Item_Id_Num` INT(6) NULL,
`Task_Creation_Date` DATETIME NULL,
`Task_Description` VARCHAR(255) NULL,
`What_PreRequisite_Is_Required` VARCHAR(45) NULL,
`Task_Trade_Assigned` VARCHAR(45) NULL,
`Task_Contractor_Assigned` VARCHAR(45) NULL,
`Task_Status` VARCHAR(45) NULL,
`Taks_Completed_Contractor_Signature` VARCHAR(45) NULL,
`Task_Prior_Approval-Required` TINYINT(1) NULL,
`Task_Approved_By` VARCHAR(45) NULL,
`Task_Materials_Required` VARCHAR(45) NULL,
PRIMARY KEY (`Task_Id_Num`))
ENGINE = InnoDB;
-- -----------------------------------------------------
-- Table `BTCBBFDB7`.`Inspections`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `BTCBBFDB7`.`Inspections` (
`Inspection_Id_Num` INT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
`Property_Id_Num` INT(6) NOT NULL,
`Inspector_Assigned` VARCHAR(45) NULL,
`Inspection_Date` DATETIME NULL,
`Issue_Description` VARCHAR(45) NULL,
`Photo_Of_Issue` BLOB NULL,
`Photo_Of_North_Property` BLOB NULL,
`Photo_Of_South_Property` BLOB NULL,
`Photo_Of_East_Property` BLOB NULL,
`Photo_Of_West_Property` BLOB NULL,
`Scope_Of_Work_Document` BLOB NULL,
`Total_Remediation_Estimate` DECIMAL(7,2) NULL,
PRIMARY KEY (`Inspection_Id_Num`),
UNIQUE INDEX `Inspection_Id_Num_UNIQUE` (`Inspection_Id_Num` ASC) VISIBLE)
ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
Subject
Written By
Posted
10:34:02 [ERR][ grt]: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') VISIBLE) ENGINE = InnoDB' at line 15
October 04, 2023 08:05PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.