· 8 years ago · Jul 08, 2018, 02:00 PM
1CREATE TABLE IF NOT EXISTS `posts` (
2 `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary identification number for the post.',
3 `user_id` int(11) unsigned NOT NULL COMMENT 'The user ID of the person who wrote the post.',
4 `passage_id` smallint(5) unsigned NOT NULL COMMENT 'The ID of the passage that this post is based on.',
5 `title` varchar(255) DEFAULT NULL COMMENT 'The optional title of the post.',
6 `slug` varchar(255) NOT NULL COMMENT 'The slug url for human readable url titles',
7 `observation` text COMMENT 'The HTML-formatted text of the Observation section of the journal post.',
8 `application` text COMMENT 'The HTML-formatted text of the Application section of the journal post.',
9 `prayer` text COMMENT 'The HTML-formatted text of the Prayer section of the journal post.',
10 `privacy` enum('public','friends','private') NOT NULL DEFAULT 'public' COMMENT 'Determines who has access to see the journal post.',
11 `hits` mediumint(5) unsigned NOT NULL COMMENT 'The total number of hits from visitors to this journal entry.',
12 `created` datetime NOT NULL COMMENT 'The date and time that the post was created.',
13 `modified` datetime NOT NULL COMMENT 'The date and time that the post was last edited. If the post has never been edited before, this will equal created.',
14 PRIMARY KEY (`id`),
15 KEY `fk_user_id` (`user_id`),
16 KEY `fk_passage_id` (`passage_id`)
17) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Life Journal posts' AUTO_INCREMENT=8 ;