-- MySQL dump 9.09
--
-- Host:     Database: aloha
---------------------------------------------------------
-- Server version	4.0.20

--
-- Table structure for table `m_cm_blocks`
--

CREATE TABLE IF NOT EXISTS m_cm_blocks (
  block_key int(11) NOT NULL auto_increment,
  block_name varchar(32) NOT NULL default '',
  block_description varchar(255) NOT NULL default '',
  block_is_active tinyint(4) NOT NULL default '1',
  block_page_url varchar(255) NOT NULL default '',
  PRIMARY KEY  (block_key),
  KEY block_name_idx (block_name),
  KEY block_is_active_idx (block_is_active)
) TYPE=MyISAM;

--
-- Table structure for table `m_cm_pages`
--

CREATE TABLE IF NOT EXISTS m_cm_pages (
  page_key int(11) NOT NULL auto_increment,
  page_title varchar(255) NOT NULL default '',
  page_section_key int(11) NOT NULL default '0',
  PRIMARY KEY  (page_key)
) TYPE=MyISAM;

--
-- Table structure for table `m_cm_revisions`
--

CREATE TABLE IF NOT EXISTS m_cm_revisions (
  revision_key int(11) NOT NULL auto_increment,
  revision_user_key int(11) NOT NULL default '0',
  revision_dt datetime default NULL,
  revision_comment varchar(255) NOT NULL default '',
  revision_first_block_key int(11) NOT NULL default '0',
  revision_is_pending tinyint not null default 0,
  PRIMARY KEY  (revision_key)
) TYPE=MyISAM;

--
-- Table structure for table `m_cm_text`
--

CREATE TABLE IF NOT EXISTS m_cm_text (
  text_key int(11) NOT NULL auto_increment,
  text_value text,
  block_key int(11) NOT NULL default '0',
  revision_key int(11) NOT NULL default '0',
  is_current tinyint(4) NOT NULL default '1',
  PRIMARY KEY  (text_key),
  KEY bk (block_key),
  KEY ic (is_current)
) TYPE=MyISAM;

ALTER TABLE m_users ADD is_editor BIT NOT NULL DEFAULT 0;
