-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathschema.sql
More file actions
21 lines (18 loc) · 781 Bytes
/
schema.sql
File metadata and controls
21 lines (18 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
CREATE DATABASE `codeigniter_testing`;
USE `codeigniter_testing`;
CREATE TABLE IF NOT EXISTS `posts` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(250) NOT NULL,
`body` TEXT NOT NULL,
`published` TINYINT(1) NOT NULL DEFAULT 0,
`created` DATETIME,
`modified` DATETIME,
`status` TINYINT(1) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`)
);
INSERT INTO `posts` (`id`, `title`, `body`, `published`, `created`) VALUES
(1, 'Test Post 1', 'This is the body of a test post.', 1, NOW());
INSERT INTO `posts` (`id`, `title`, `body`, `published`, `created`) VALUES
(1, 'Test Post 2', 'This is the body of a test post.', 1, NOW());
INSERT INTO `posts` (`id`, `title`, `body`, `published`, `created`) VALUES
(1, 'Test Post 3', 'This is the body of a test post.', 1, NOW());