#
# Table structure for table 'pt_core_groups'
#

DROP TABLE IF EXISTS pt_core_groups;
CREATE TABLE pt_core_groups (
  group_id int(11) DEFAULT '0' NOT NULL auto_increment,
  group_name varchar(25) DEFAULT '' NOT NULL,
  PRIMARY KEY (group_id)
);

#
# Table structure for table 'pt_core_media'
#

DROP TABLE IF EXISTS pt_core_media;
CREATE TABLE pt_core_media (
  media_id int(11) DEFAULT '0' NOT NULL auto_increment,
  name varchar(128) DEFAULT '' NOT NULL,
  description varchar(255),
  tstamp timestamp(14),
  username varchar(25) DEFAULT '' NOT NULL,
  groups varchar(200) DEFAULT ':admin:' NOT NULL,
  PRIMARY KEY (media_id),
  UNIQUE (name)
);

#
# Table structure for table 'pt_core_news'
#

DROP TABLE IF EXISTS pt_core_news;
CREATE TABLE pt_core_news (
  news_id int(11) DEFAULT '0' NOT NULL auto_increment,
  headline varchar(128) DEFAULT '' NOT NULL,
  link varchar(255),
  summary varchar(255) DEFAULT '' NOT NULL,
  article text,
  tstamp timestamp(14),
  groups varchar(200) DEFAULT ':admin:' NOT NULL,
  status enum('c','a') DEFAULT 'c' NOT NULL,
  PRIMARY KEY (news_id),
  INDEX (headline)
);

#
# Table structure for table 'pt_core_plugins'
#

DROP TABLE IF EXISTS pt_core_plugins;
CREATE TABLE pt_core_plugins (
  plugin_id int(11) DEFAULT '0' NOT NULL auto_increment,
  name varchar(30) DEFAULT '' NOT NULL,
  type enum('app','help','template'),
  PRIMARY KEY (plugin_id),
  UNIQUE (name)
);

#
# Table structure for table 'pt_core_profiles'
#

DROP TABLE IF EXISTS pt_core_profiles;
CREATE TABLE pt_core_profiles (
  profile_id int(11) DEFAULT '0' NOT NULL auto_increment,
  homepage varchar(60) DEFAULT '' NOT NULL,
  profile_name varchar(60) DEFAULT '' NOT NULL,
  default_title varchar(80),
  table_tag varchar(200) DEFAULT '' NOT NULL,
  sidebar_td varchar(200) DEFAULT '' NOT NULL,
  body_td varchar(200) DEFAULT '' NOT NULL,
  news_td varchar(200) DEFAULT '' NOT NULL,
  header_td varchar(200) DEFAULT '' NOT NULL,
  footer_td varchar(200) DEFAULT '' NOT NULL,
  date_format enum('mm-dd-yy','dd-mm-yy','yyyy-mm-dd') DEFAULT 'yyyy-mm-dd' NOT NULL,
  max_news int(11) DEFAULT '4' NOT NULL,
  body_tag text,
  head_code text,
  header varchar(60) DEFAULT 'none' NOT NULL,
  sidebar varchar(60) DEFAULT 'none' NOT NULL,
  footer varchar(60) DEFAULT 'none' NOT NULL,
  news_on_hp enum('Y','N') DEFAULT 'Y' NOT NULL,
  last_modified enum('Y','N') DEFAULT 'Y' NOT NULL,
  PRIMARY KEY (profile_id)
);

#
# Table structure for table 'pt_core_users'
#

DROP TABLE IF EXISTS pt_core_users;
CREATE TABLE pt_core_users (
  user_id int(11) DEFAULT '0' NOT NULL auto_increment,
  username varchar(25) DEFAULT '' NOT NULL,
  passwd varchar(25) DEFAULT '' NOT NULL,
  groups varchar(200) DEFAULT '' NOT NULL,
  active enum('Y','N') DEFAULT 'Y' NOT NULL,
  allow_www enum('Y','N') DEFAULT 'Y' NOT NULL,
  allow_media enum('Y','N') DEFAULT 'Y' NOT NULL,
  allow_news enum('Y','N') DEFAULT 'Y' NOT NULL,
  allow_user enum('Y','N') DEFAULT 'N' NOT NULL,
  allow_profile enum('Y','N') DEFAULT 'N' NOT NULL,
  PRIMARY KEY (user_id),
  UNIQUE (username)
);

#
# Table structure for table 'pt_core_wwwbackup'
#

DROP TABLE IF EXISTS pt_core_wwwbackup;
CREATE TABLE pt_core_wwwbackup (
  www_id int(11) DEFAULT '0' NOT NULL auto_increment,
  version decimal(3,1) DEFAULT '0.0' NOT NULL,
  name varchar(60) DEFAULT '' NOT NULL,
  title varchar(128),
  keywords varchar(255),
  category varchar(128),
  html text,
  changelog varchar(255),
  tstamp timestamp(14),
  username varchar(25) DEFAULT '' NOT NULL,
  page_header varchar(60) DEFAULT 'none' NOT NULL,
  page_sidebar varchar(60) DEFAULT 'none' NOT NULL,
  page_footer varchar(60) DEFAULT 'none' NOT NULL,
  code_type enum('php','html') DEFAULT 'html' NOT NULL,
  security enum('private','public') DEFAULT 'public' NOT NULL,
  auto_html enum('Y','N') DEFAULT 'Y' NOT NULL,
  PRIMARY KEY (www_id)
);

#
# Table structure for table 'pt_core_wwwpages'
#

DROP TABLE IF EXISTS pt_core_wwwpages;
CREATE TABLE pt_core_wwwpages (
  www_id int(11) DEFAULT '0' NOT NULL auto_increment,
  version decimal(3,1) DEFAULT '0.0' NOT NULL,
  name varchar(60) DEFAULT '' NOT NULL,
  title varchar(128),
  keywords varchar(255),
  category varchar(128) DEFAULT '' NOT NULL,
  html text,
  changelog varchar(255),
  tstamp timestamp(14),
  username varchar(25) DEFAULT '' NOT NULL,
  groups varchar(200) DEFAULT ':admin:' NOT NULL,
  page_header varchar(60) DEFAULT 'none' NOT NULL,
  page_sidebar varchar(60) DEFAULT 'none' NOT NULL,
  page_footer varchar(60) DEFAULT 'none' NOT NULL,
  code_type enum('php','html') DEFAULT 'html' NOT NULL,
  security enum('private','public') DEFAULT 'public' NOT NULL,
  auto_html enum('Y','N') DEFAULT 'Y' NOT NULL,
  PRIMARY KEY (www_id),
  UNIQUE (name),
  INDEX (category)
);