Advertisement
Guest User

Untitled

a guest
May 7th, 2012
817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.15 KB | None | 0 0
  1. [code]--
  2. -- Structure for table `tbl_comment`
  3. --
  4.  
  5. DROP TABLE IF EXISTS `tbl_comment`;
  6. CREATE TABLE IF NOT EXISTS `tbl_comment` (
  7.   `id` int(11) NOT NULL AUTO_INCREMENT,
  8.   `content` text COLLATE utf8_unicode_ci NOT NULL,
  9.   `status` int(11) NOT NULL,
  10.   `create_time` int(11) DEFAULT NULL,
  11.   `author` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  12.   `email` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  13.   `url` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  14.   `post_id` int(11) NOT NULL,
  15.   PRIMARY KEY (`id`),
  16.   KEY `FK_comment_post` (`post_id`),
  17.   CONSTRAINT `FK_comment_post` FOREIGN KEY (`post_id`) REFERENCES `tbl_post` (`id`) ON DELETE CASCADE
  18. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  19.  
  20. --
  21. -- Data for table `tbl_comment`
  22. --
  23.  
  24. INSERT INTO `tbl_comment` (`id`, `content`, `status`, `create_time`, `author`, `email`, `url`, `post_id`) VALUES
  25.   ('2', 'Sample comment', '2', '1336347248', 'Daniel', 'idrini@gmail.com', '', '12');
  26.  
  27. --
  28. -- Structure for table `tbl_lookup`
  29. --
  30.  
  31. DROP TABLE IF EXISTS `tbl_lookup`;
  32. CREATE TABLE IF NOT EXISTS `tbl_lookup` (
  33.   `id` int(11) NOT NULL AUTO_INCREMENT,
  34.   `name` varchar(128) NOT NULL,
  35.   `code` int(11) NOT NULL,
  36.   `type` varchar(128) NOT NULL,
  37.   `position` int(11) NOT NULL,
  38.   PRIMARY KEY (`id`)
  39. ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
  40.  
  41. --
  42. -- Data for table `tbl_lookup`
  43. --
  44.  
  45. INSERT INTO `tbl_lookup` (`id`, `name`, `code`, `type`, `position`) VALUES
  46.   ('11', 'Draft', '1', 'PostStatus', '1'),
  47.   ('12', 'Published', '2', 'PostStatus', '2'),
  48.   ('13', 'Archived', '3', 'PostStatus', '3'),
  49.   ('14', 'Pending Approval', '1', 'CommentStatus', '1'),
  50.   ('15', 'Approved', '2', 'CommentStatus', '2');
  51.  
  52. --
  53. -- Structure for table `tbl_messages`
  54. --
  55.  
  56. DROP TABLE IF EXISTS `tbl_messages`;
  57. CREATE TABLE IF NOT EXISTS `tbl_messages` (
  58.   `id` int(11) NOT NULL AUTO_INCREMENT,
  59.   `sender_id` int(11) NOT NULL,
  60.   `receiver_id` int(11) NOT NULL,
  61.   `subject` varchar(256) NOT NULL DEFAULT '',
  62.   `body` text,
  63.   `is_read` enum('0','1') NOT NULL DEFAULT '0',
  64.   `deleted_by` enum('sender','receiver') DEFAULT NULL,
  65.   `created_at` datetime NOT NULL,
  66.   PRIMARY KEY (`id`),
  67.   KEY `sender` (`sender_id`),
  68.   KEY `reciever` (`receiver_id`)
  69. ) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
  70.  
  71. --
  72. -- Data for table `tbl_messages`
  73. --
  74.  
  75. INSERT INTO `tbl_messages` (`id`, `sender_id`, `receiver_id`, `subject`, `body`, `is_read`, `deleted_by`, `created_at`) VALUES
  76.   ('8', '1', '1', 'ei', 'aei', '1', NULL, '2012-03-20 12:02:33'),
  77.   ('9', '1', '1', 'hej', 'hej', '1', NULL, '2012-03-23 08:29:17'),
  78.   ('10', '1', '1', 'Re: hej', '', '0', NULL, '2012-05-07 00:23:57'),
  79.   ('11', '1', '1', 'Re: hej', '', '0', NULL, '2012-05-07 00:24:01');
  80.  
  81. --
  82. -- Structure for table `tbl_post`
  83. --
  84.  
  85. DROP TABLE IF EXISTS `tbl_post`;
  86. CREATE TABLE IF NOT EXISTS `tbl_post` (
  87.   `id` int(11) NOT NULL AUTO_INCREMENT,
  88.   `title` varchar(128) NOT NULL,
  89.   `content` text NOT NULL,
  90.   `tags` text,
  91.   `status` int(11) NOT NULL,
  92.   `create_time` int(11) DEFAULT NULL,
  93.   `update_time` int(11) DEFAULT NULL,
  94.   `author_id` int(11) NOT NULL,
  95.   PRIMARY KEY (`id`),
  96.   KEY `FK_post_author` (`author_id`)
  97. ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;
  98.  
  99. --
  100. -- Data for table `tbl_post`
  101. --
  102.  
  103. INSERT INTO `tbl_post` (`id`, `title`, `content`, `tags`, `status`, `create_time`, `update_time`, `author_id`) VALUES
  104.   ('12', 'Welcome!', 'This blog system is developed using Yii. It is meant to demonstrate how to use Yii to build a complete real-world application. Complete source code may be found in the Yii releases.\n\nFeel free to try this system by writing new posts and posting comments.', 'yii, blog', '2', '1230952187', '1230952187', '1'),
  105.   ('13', 'A Test Post', 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.', 'test', '2', '1230952187', '1230952187', '1');
  106.  
  107. --
  108. -- Structure for table `tbl_tag`
  109. --
  110.  
  111. DROP TABLE IF EXISTS `tbl_tag`;
  112. CREATE TABLE IF NOT EXISTS `tbl_tag` (
  113.   `id` int(11) NOT NULL AUTO_INCREMENT,
  114.   `name` varchar(128) NOT NULL,
  115.   `frequency` int(11) DEFAULT '1',
  116.   PRIMARY KEY (`id`)
  117. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
  118.  
  119. --
  120. -- Data for table `tbl_tag`
  121. --
  122.  
  123. INSERT INTO `tbl_tag` (`id`, `name`, `frequency`) VALUES
  124.   ('1', 'yii', '2'),
  125.   ('2', 'blog', '2'),
  126.   ('3', 'test', '1'),
  127.   ('4', 'ia', '1'),
  128.   ('5', 'eaia', '1'),
  129.   ('6', 'aei', '1'),
  130.   ('7', 'yii', '2'),
  131.   ('8', 'blog', '2'),
  132.   ('9', 'test', '1'),
  133.   ('10', 'demo', '1');
  134.  
  135. --
  136. -- Structure for table `tbl_user`
  137. --
  138.  
  139. DROP TABLE IF EXISTS `tbl_user`;
  140. CREATE TABLE IF NOT EXISTS `tbl_user` (
  141.   `id` int(11) NOT NULL AUTO_INCREMENT,
  142.   `username` varchar(128) NOT NULL,
  143.   `password` varchar(128) NOT NULL,
  144.   `email` varchar(128) NOT NULL,
  145.   `created` datetime NOT NULL,
  146.   `last_activity` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  147.   `avatar` varchar(255) DEFAULT NULL,
  148.   `presentation` mediumtext NOT NULL,
  149.   `public_library` tinyint(1) NOT NULL DEFAULT '0',
  150.   `facebook` varchar(50) NOT NULL,
  151.   `reputation` int(10) NOT NULL DEFAULT '0',
  152.   `persona` varchar(255) NOT NULL,
  153.   PRIMARY KEY (`id`)
  154. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
  155.  
  156. --
  157. -- Data for table `tbl_user`
  158. --
  159.  
  160. INSERT INTO `tbl_user` (`id`, `username`, `password`, `email`, `created`, `last_activity`, `avatar`, `presentation`, `public_library`, `facebook`, `reputation`, `persona`) VALUES
  161.   ('1', 'Admin', '$2a$10$rA7CrKSDG0vfJH0NikgdhOg0QFdH0o3iCJH8r2WDmY/uE3kO7SyrS', 'webmaster@prototyp.com', '2012-03-09 12:03:16', '2012-05-07 10:05:11', 'bourne.jpg', '<a href=\"/files/users/1/Admin_19375414.jpg\">Admin_19375414.jpg</a><span style=\"font-size:x-large;font-family:comic sans ms,cursive;color:#ffffff;background-color:#000000\"></span><span style=\"font-size:x-large\"><img alt=\"evilgrin\" title=\"evilgrin\" src=\"http://blog/assets/7952073/images/smileys/evilgrin.png\" /> lorum ipsumlorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  lorum ipsum  <br /><br /><br /></span>', '0', '', '17', ''),
  162.   ('2', 'demo', '$2a$10$PaydiNueMCVikCS2sR5eNuQxlmFmqUY6TLQWGnW6aDtbIRJE/qwbm', 'demo@demo.com', '2012-03-11 12:03:51', '0000-00-00 00:00:00', '', '', '0', '', '0', '');
  163.  
  164. [/code]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement