Skip to content

Instantly share code, notes, and snippets.

@ezimuel
Created August 2, 2013 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ezimuel/6138279 to your computer and use it in GitHub Desktop.
Save ezimuel/6138279 to your computer and use it in GitHub Desktop.
ZF2 blog simple schema
CREATE TABLE post (
id int(11) NOT NULL auto_increment,
title varchar(100) NOT NULL,
content TEXT NOT NULL,
user_id int(11),
category_id int(11),
publish_date DATETIME,
PRIMARY KEY (id)
);
CREATE TABLE user (
id int(11) NOT NULL auto_increment,
username varchar(100) NOT NULL,
password varchar(60) NOT NULL,
role_id int(11),
PRIMARY KEY (id)
);
CREATE TABLE role (
id int(11) NOT NULL auto_increment,
role varchar(100) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE category (
id int(11) NOT NULL auto_increment,
category varchar(100) NOT NULL,
PRIMARY KEY (id)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment