Advertisement
Guest User

Untitled

a guest
Feb 13th, 2015
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 4.69 KB | None | 0 0
  1. --
  2. -- Table structure for table `social_access`
  3. --
  4.  
  5. CREATE TABLE IF NOT EXISTS `social_access` (
  6.   `id` CHAR(36) NOT NULL,
  7.   `accessor_id` CHAR(36) NOT NULL,
  8.   `accessor_model` VARCHAR(128) NOT NULL,
  9.   `object_id` CHAR(36) NOT NULL,
  10.   `object_model` VARCHAR(128) NOT NULL,
  11.   `denied` tinyint(1) NOT NULL DEFAULT '0'
  12. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  13.  
  14. --
  15. -- Dumping data for table `social_access`
  16. --
  17.  
  18. INSERT INTO `social_access` (`id`, `accessor_id`, `accessor_model`, `object_id`, `object_model`, `denied`) VALUES
  19. ('golum-access-1', 'golum-list-1', 'SocialList', 'golum-object-1', 'SocialObject', 0),
  20. ('golum-access-2', 'burzum', 'User', 'golum-object-1', 'SocialObject', 0),
  21. ('bbe6d1be-b368-11e4-ba02-ac220bc9d83b', 'golum-list-4', 'SocialList', 'golum-object-1', 'SocialObject', 1),
  22. ('ed0266ba-b367-11e4-ba02-ac220bc9d83b', 'user3', 'User', 'golum-list-1', 'SocialObject', 1);
  23.  
  24. -- --------------------------------------------------------
  25.  
  26. --
  27. -- Table structure for table `social_lists`
  28. --
  29.  
  30. CREATE TABLE IF NOT EXISTS `social_lists` (
  31.   `id` CHAR(36) NOT NULL,
  32.   `user_id` CHAR(36) NOT NULL,
  33.   `name` VARCHAR(255) NOT NULL
  34. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  35.  
  36. --
  37. -- Dumping data for table `social_lists`
  38. --
  39.  
  40. INSERT INTO `social_lists` (`id`, `user_id`, `name`) VALUES
  41. ('golum-list-1', 'golum', 'golums list 1'),
  42. ('golum-list-2', 'golum', 'golums list 2'),
  43. ('burzum-list-1', 'burzum', 'burzums list 1');
  44.  
  45. -- --------------------------------------------------------
  46.  
  47. --
  48. -- Table structure for table `social_lists_users`
  49. --
  50.  
  51. CREATE TABLE IF NOT EXISTS `social_lists_users` (
  52.   `id` CHAR(36) NOT NULL,
  53.   `user_id` CHAR(36) NOT NULL,
  54.   `social_list_id` VARCHAR(36) NOT NULL
  55. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  56.  
  57. --
  58. -- Dumping data for table `social_lists_users`
  59. --
  60.  
  61. INSERT INTO `social_lists_users` (`id`, `user_id`, `social_list_id`) VALUES
  62. ('7f1af70e-b368-11e4-ba02-ac220bc9d83b', 'user4', 'golum-list-2'),
  63. ('ebb5095e-b255-11e4-ba02-ac220bc9d83b', 'burzum', 'golum-list-1'),
  64. ('ebb5165c-b255-11e4-ba02-ac220bc9d83b', 'golum', 'burzum-list-1');
  65.  
  66. -- --------------------------------------------------------
  67.  
  68. --
  69. -- Table structure for table `social_objects`
  70. --
  71.  
  72. CREATE TABLE IF NOT EXISTS `social_objects` (
  73.   `id` CHAR(36) NOT NULL,
  74.   `user_id` CHAR(36) NOT NULL,
  75.   `foreign_key` CHAR(36) NOT NULL,
  76.   `model` VARCHAR(128) NOT NULL
  77. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  78.  
  79. --
  80. -- Dumping data for table `social_objects`
  81. --
  82.  
  83. INSERT INTO `social_objects` (`id`, `user_id`, `foreign_key`, `model`) VALUES
  84. ('golum-object-1', 'golum', 'test', 'test'),
  85. ('burzum-object-1', 'burzum', 'test', 'test');
  86.  
  87. -- --------------------------------------------------------
  88.  
  89. --
  90. -- Table structure for table `users`
  91. --
  92.  
  93. CREATE TABLE IF NOT EXISTS `users` (
  94.   `id` CHAR(36) NOT NULL,
  95.   `username` VARCHAR(64) NOT NULL,
  96.   `email` VARCHAR(255) NOT NULL,
  97.   `email_token` VARCHAR(64) DEFAULT NULL,
  98.   `email_verified` tinyint(1) NOT NULL,
  99.   `email_token_expires` datetime DEFAULT NULL,
  100.   `active` tinyint(1) NOT NULL,
  101.   `password` VARCHAR(64) NOT NULL,
  102.   `password_token` VARCHAR(64) DEFAULT NULL,
  103.   `password_token_expires` datetime DEFAULT NULL,
  104.   `role` VARCHAR(32) DEFAULT NULL,
  105.   `last_login` datetime DEFAULT NULL,
  106.   `created` datetime DEFAULT NULL,
  107.   `modified` datetime DEFAULT NULL
  108. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  109.  
  110. --
  111. -- Dumping data for table `users`
  112. --
  113.  
  114. INSERT INTO `users` (`id`, `username`, `email`, `email_token`, `email_verified`, `email_token_expires`, `active`, `password`, `password_token`, `password_token_expires`, `role`, `last_login`, `created`, `modified`) VALUES
  115. ('golum', 'golum', 'golum@lotr.com', '', 1, '2014-11-02 23:20:03', 1, '', NULL, NULL, NULL, NULL, '2014-11-01 23:20:03', '2014-11-01 23:20:03'),
  116. ('burzum', 'burzum', 'burzum@lotr.com', '', 1, '2014-11-02 23:17:32', 1, '', NULL, NULL, NULL, NULL, '2014-11-01 23:17:32', '2014-11-01 23:17:32'),
  117. ('user3', 'user3', 'user3@user3.com', NULL, 1, NULL, 1, '', NULL, NULL, NULL, NULL, '2015-02-13 00:00:00', '2015-02-13 00:00:00'),
  118. ('user4', 'user4', 'user4@user4.com\r\n\r\n', NULL, 1, NULL, 1, '', NULL, NULL, NULL, NULL, NULL, NULL);
  119.  
  120. --
  121. -- Indexes for dumped tables
  122. --
  123.  
  124. --
  125. -- Indexes for table `social_access`
  126. --
  127. ALTER TABLE `social_access`
  128.  ADD PRIMARY KEY (`id`);
  129.  
  130. --
  131. -- Indexes for table `social_lists`
  132. --
  133. ALTER TABLE `social_lists`
  134.  ADD PRIMARY KEY (`id`);
  135.  
  136. --
  137. -- Indexes for table `social_lists_users`
  138. --
  139. ALTER TABLE `social_lists_users`
  140.  ADD PRIMARY KEY (`id`);
  141.  
  142. --
  143. -- Indexes for table `social_objects`
  144. --
  145. ALTER TABLE `social_objects`
  146.  ADD PRIMARY KEY (`id`);
  147.  
  148. --
  149. -- Indexes for table `users`
  150. --
  151. ALTER TABLE `users`
  152.  ADD PRIMARY KEY (`id`), ADD KEY `username` (`username`,`email`);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement