Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Companies { ID }
  2. Accounts { ID }
  3. Accounts_Companies { ID, Account_ID, Company_ID }
  4. Customers { ID, Account_ID }
  5. JobTypes { ID }
  6. Jobs { ID, Company_ID, Account_ID, Customer_ID, JobType_ID, OutOfRadius (BOOL) }
  7.  
  8. CREATE TABLE IF NOT EXISTS `configs` (
  9. `ID` int(11) NOT NULL AUTO_INCREMENT,
  10. `Company_ID` int(11) NOT NULL,
  11. `Account_ID` int(11) DEFAULT NULL,
  12. `Customer_ID` int(11) DEFAULT NULL,
  13. `JobType_ID` int(11) DEFAULT NULL,
  14. `OutOfRadius` tinyint(1) DEFAULT NULL,
  15. `ConfigKeyA` tinyint(1) DEFAULT NULL,
  16. `ConfigKeyB` int(5) DEFAULT NULL,
  17. `ConfigKeyC` tinyint(1) DEFAULT NULL,
  18. `ConfigKeyD` int(3) DEFAULT NULL,
  19. PRIMARY KEY (`ID`)
  20. );
  21.  
  22. INSERT INTO configs (Company_ID, Account_ID, ConfigKeyC) VALUES (?, ?, ?)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement