Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 2.01 KB | None | 0 0
  1. --
  2. -- Database: `notebooks`
  3. --
  4.  
  5. -- --------------------------------------------------------
  6.  
  7. --
  8. -- Table structure for table `notebooks`
  9. --
  10.  
  11. CREATE TABLE IF NOT EXISTS `notebooks` (
  12. `id` int(11) NOT NULL,
  13.   `name` varchar(255) DEFAULT NULL,
  14.   `parent` int(4) NOT NULL DEFAULT '0',
  15.   `active` int(1) NOT NULL DEFAULT '1'
  16. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
  17.  
  18. --
  19. -- Dumping data for table `notebooks`
  20. --
  21.  
  22. INSERT INTO `notebooks` (`id`, `name`, `parent`, `active`) VALUES
  23. (1, 'Parent Notebook 1', 0, 1),
  24. (2, 'Parent Notebook 2', 0, 1),
  25. (3, 'Parent Notebook 3', 0, 1),
  26. (4, 'Child Notebook 1', 1, 1),
  27. (5, 'Child Notebook 2', 1, 1),
  28. (6, 'Parent Notebook 4', 0, 1),
  29. (7, 'Child Notebook 3', 3, 1),
  30. (8, 'Child Notebook 4', 3, 1),
  31. (9, 'Child Notebook 5', 3, 1),
  32. (10, 'Child Notebook 6', 1, 1);
  33.  
  34. -- --------------------------------------------------------
  35.  
  36. --
  37. -- Table structure for table `notes`
  38. --
  39.  
  40. CREATE TABLE IF NOT EXISTS `notes` (
  41. `id` int(11) NOT NULL,
  42.   `name` varchar(255) DEFAULT NULL,
  43.   `parent` int(11) NOT NULL DEFAULT '0',
  44.   `active` int(11) NOT NULL DEFAULT '1'
  45. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
  46.  
  47. --
  48. -- Dumping data for table `notes`
  49. --
  50.  
  51. INSERT INTO `notes` (`id`, `name`, `parent`, `active`) VALUES
  52. (1, 'Note 1', 0, 1),
  53. (2, 'Note 2', 1, 1),
  54. (3, 'Note 3', 1, 1),
  55. (4, 'Note 4', 1, 1),
  56. (5, 'Note 5', 1, 1),
  57. (6, 'Note 6', 2, 1),
  58. (7, 'Note 7', 3, 1),
  59. (8, 'Note 8', 3, 1),
  60. (9, 'Note 9', 3, 1),
  61. (10, 'Note 10', 1, 1);
  62.  
  63. --
  64. -- Indexes for dumped tables
  65. --
  66.  
  67. --
  68. -- Indexes for table `notebooks`
  69. --
  70. ALTER TABLE `notebooks`
  71.  ADD PRIMARY KEY (`id`);
  72.  
  73. --
  74. -- Indexes for table `notes`
  75. --
  76. ALTER TABLE `notes`
  77.  ADD PRIMARY KEY (`id`);
  78.  
  79. --
  80. -- AUTO_INCREMENT for dumped tables
  81. --
  82.  
  83. --
  84. -- AUTO_INCREMENT for table `notebooks`
  85. --
  86. ALTER TABLE `notebooks`
  87. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
  88. --
  89. -- AUTO_INCREMENT for table `notes`
  90. --
  91. ALTER TABLE `notes`
  92. MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement