GreyTeardrop
6/14/2011 - 4:41 AM

gistfile1.sql

CREATE TABLE IF NOT EXISTS notie_text (
  id int(11) NOT NULL AUTO_INCREMENT,
  text text NOT NULL,
  create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (id)
);
CREATE TABLE IF NOT EXISTS notie_tag (
  notie_id int(11) NOT NULL,
  tag varchar(255) NOT NULL,
  PRIMARY KEY (note_id, tag),
);
CREATE INDEX IF NOT EXISTS notie_tag_note_id ON notie_tag (notie_id);
CREATE INDEX IF NOT EXISTS notie_tag_tag ON notie_tag (tag);