From ead347b49e727c534f03105b9fda57cfbe0c4457 Mon Sep 17 00:00:00 2001 From: Greg Benison Date: Tue, 7 Feb 2012 09:53:20 -0800 Subject: [PATCH] added unique ID to posts table 'posts' table now has a simple auto_increment primary key, so that individual posts can be linked-to for purposes of editing, permalinking, deleting, etc. --- database-setup.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/database-setup.sql b/database-setup.sql index 368d238..8d697fe 100644 --- a/database-setup.sql +++ b/database-setup.sql @@ -4,6 +4,10 @@ CREATE DATABASE IF NOT EXISTS schwordpress; USE schwordpress; CREATE TABLE IF NOT EXISTS `posts` ( + `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) DEFAULT NULL, `timestamp` datetime DEFAULT NULL, - `content` text); + `content` text, + PRIMARY KEY (`id`)); + +