Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added column
  • Loading branch information
Jeremy Mill committed Oct 28, 2015
1 parent 418cee8 commit 798ecbb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Chinook_Rev1.sql
@@ -1,4 +1,4 @@
USE `Chinook`;
USE `chinook`;


/*******************************************************************************
Expand Down Expand Up @@ -88,6 +88,12 @@ CREATE TABLE `TrackURL`
);


/*******************************************************************************
ALTER TABLES
********************************************************************************/

ALTER TABLE customer ADD PersonID INT NOT NULL;
ALTER TABLE employee ADD PersonID INT NOT NULL;

/*******************************************************************************
Create Primary Key Unique Indexes
Expand All @@ -107,6 +113,9 @@ ALTER TABLE `CreditCard` ADD CONSTRAINT `FK_CreditCardPayId`

CREATE INDEX `IFK_CreditCardPayId` ON `CreditCard` (`PayId`);

ALTER TABLE `Customer` ADD CONSTRAINT `FK_CustomerPersonId`
FOREIGN KEY (`PersonId`) REFERENCES `Person` (`PersonId`) ON DELETE NO ACTION ON UPDATE NO ACTION;

CREATE INDEX `IFK_CustomerPersonId` ON `Customer` (`PersonId`);

ALTER TABLE `Employee` ADD CONSTRAINT `FK_EmployeePersonId`
Expand Down

0 comments on commit 798ecbb

Please sign in to comment.