diff --git a/Chinook_Rev1.sql b/Chinook_Rev1.sql index dca0e77..6616209 100644 --- a/Chinook_Rev1.sql +++ b/Chinook_Rev1.sql @@ -221,6 +221,25 @@ ALTER TABLE `Invoice` ADD CONSTRAINT `FK_PayId` CREATE INDEX `IFK_PayId` ON `Invoice` (`PayId`); +/******************************************************************************* + Change a SQL variable and insert some 0 rows to the BLANK value +********************************************************************************/ +#this changes the default behavior on 0 being inserted +SET SESSION sql_mode='NO_AUTO_VALUE_ON_ZERO'; + +#make a 0th person +insert into person(PersonID,LastName,FirstName,Address,City,State,PostalCode,Country,Phone,Fax,Email) VALUES + (0,"BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK","BLANK"); + +#make a 0th employee +insert into employee(EmployeeId,Title,ReportsTo,BirthDate,HireDate,PersonID) VALUES + (0,"BLANK",NULL,NULL,NULL,0); + +#make a 0th Customer +insert into customer(CustomerID,Company,SupportRepId,PersonID) VALUES + (0,NULL,0,0); + + diff --git a/TeamDBAwesome/TeamDBAwesome/js/HolderService.js b/TeamDBAwesome/TeamDBAwesome/js/HolderService.js index 183bce0..eac5261 100644 --- a/TeamDBAwesome/TeamDBAwesome/js/HolderService.js +++ b/TeamDBAwesome/TeamDBAwesome/js/HolderService.js @@ -14,6 +14,7 @@ Fax: null, Email: null, Company: null, + //SUPPORT REP ID SHOULD BE 0 for NEW customer SupportRepID: null, PersonID: null, CustomerID: null