Guest User

Untitled

a guest
Apr 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. CREATE TABLE `documents` (
  2. `document_id` int(11) NOT NULL,
  3. `merchant_id` int(11) NOT NULL,
  4. `document_type` smallint(6) default NULL,
  5. `id` int(11) NOT NULL auto_increment,
  6. `location` varchar(100) default NULL,
  7. `processing_state_id` int(11) default NULL,
  8. PRIMARY KEY (`id`),
  9. KEY `i_processing_state_id` (`processing_state_id`),
  10. CONSTRAINT `FK_processing_state_id` FOREIGN KEY (`processing_state_id`) REFERENCES `processing_states` (`processing_state_id`)
  11. )
  12.  
  13. CREATE TABLE `processing_states` (
  14. `id` int(11) NOT NULL auto_increment,
  15. `processing_state_id` int(11) NOT NULL,
  16. `description` varchar(50) default NULL,
  17. PRIMARY KEY (`id`),
  18. UNIQUE KEY `i_processing_state_id` (`processing_state_id`)
  19. )
Add Comment
Please, Sign In to add comment