schema.sql
changeset 229 97ae8e9d5e29
parent 228 b0a4d179be85
child 240 f0149a27df5f
equal deleted inserted replaced
147:d8156d18ac58 229:97ae8e9d5e29
     1 -- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     1 -- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
     2 -- Version 1.0 (Banshee)
     2 -- Version 1.0.2 (Coblynau)
     3 -- Copyright (C) 2006-2007 Dan Fuhry
     3 -- Copyright (C) 2006-2007 Dan Fuhry
     4 
     4 
     5 -- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     5 -- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
     6 -- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
     6 -- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
     7 
     7 
   102   activation_key varchar(40) NOT NULL DEFAULT 0,
   102   activation_key varchar(40) NOT NULL DEFAULT 0,
   103   old_encryption tinyint(1) NOT NULL DEFAULT 0,
   103   old_encryption tinyint(1) NOT NULL DEFAULT 0,
   104   temp_password text,
   104   temp_password text,
   105   temp_password_time int(12) NOT NULL DEFAULT 0,
   105   temp_password_time int(12) NOT NULL DEFAULT 0,
   106   user_coppa tinyint(1) NOT NULL DEFAULT 0,
   106   user_coppa tinyint(1) NOT NULL DEFAULT 0,
       
   107   user_lang smallint(5) NOT NULL,
   107   PRIMARY KEY  (user_id)
   108   PRIMARY KEY  (user_id)
   108 ) CHARACTER SET `utf8`;
   109 ) CHARACTER SET `utf8`;
   109 
   110 
   110 CREATE TABLE {{TABLE_PREFIX}}users_extra(
   111 CREATE TABLE {{TABLE_PREFIX}}users_extra(
   111   user_id mediumint(8) NOT NULL,
   112   user_id mediumint(8) NOT NULL,
   251   page_id varchar(255) NOT NULL,
   252   page_id varchar(255) NOT NULL,
   252   namespace varchar(255) NOT NULL,
   253   namespace varchar(255) NOT NULL,
   253   user mediumint(8) NOT NULL DEFAULT 1,
   254   user mediumint(8) NOT NULL DEFAULT 1,
   254   PRIMARY KEY ( tag_id )
   255   PRIMARY KEY ( tag_id )
   255 ) CHARACTER SET `utf8`;
   256 ) CHARACTER SET `utf8`;
       
   257 
       
   258 -- Added in 1.1.1
       
   259 
       
   260 CREATE TABLE {{TABLE_PREFIX}}lockout(
       
   261   id int(12) NOT NULL auto_increment,
       
   262   ipaddr varchar(40) NOT NULL,
       
   263   action ENUM('credential', 'level') NOT NULL DEFAULT 'credential',
       
   264   timestamp int(12) NOT NULL DEFAULT 0,
       
   265   PRIMARY KEY ( id )
       
   266 ) CHARACTER SET `utf8`;
       
   267 
       
   268 -- Added in 1.1.1
       
   269 
       
   270 CREATE TABLE {{TABLE_PREFIX}}language(
       
   271   lang_id smallint(5) NOT NULL auto_increment,
       
   272   lang_code varchar(16) NOT NULL,
       
   273   lang_name_default varchar(64) NOT NULL,
       
   274   lang_name_native varchar(64) NOT NULL,
       
   275   last_changed int(12) NOT NULL DEFAULT 0,
       
   276   PRIMARY KEY ( lang_id )
       
   277 ) CHARACTER SET `utf8`;
       
   278 
       
   279 -- Added in 1.1.1
       
   280 
       
   281 CREATE TABLE {{TABLE_PREFIX}}language_strings(
       
   282   string_id bigint(15) NOT NULL auto_increment,
       
   283   lang_id smallint(5) NOT NULL,
       
   284   string_category varchar(32) NOT NULL,
       
   285   string_name varchar(64) NOT NULL,
       
   286   string_content longtext NOT NULL,
       
   287   PRIMARY KEY ( string_id )
       
   288 );
   256 
   289 
   257 INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES
   290 INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES
   258   ('site_name', '{{SITE_NAME}}'),
   291   ('site_name', '{{SITE_NAME}}'),
   259   ('main_page', 'Main_Page'),
   292   ('main_page', 'Main_Page'),
   260   ('site_desc', '{{SITE_DESC}}'),
   293   ('site_desc', '{{SITE_DESC}}'),
   276   ('plugin_SpecialUserFuncs.php', '1'),
   309   ('plugin_SpecialUserFuncs.php', '1'),
   277   ('plugin_SpecialCSS.php', '1'),
   310   ('plugin_SpecialCSS.php', '1'),
   278   ('copyright_notice', '{{COPYRIGHT}}'),
   311   ('copyright_notice', '{{COPYRIGHT}}'),
   279   ('wiki_edit_notice_text', '== Why can I edit this page? ==\n\nEveryone can edit almost any page in this website. This concept is called a wiki. It gives everyone the opportunity to make a change for the best. While some spam and vandalism may occur, it is believed that most contributions will be legitimate and helpful.\n\nFor security purposes, a history of all page edits is kept, and administrators are able to restore vandalized or spammed pages with just a few clicks.'),
   312   ('wiki_edit_notice_text', '== Why can I edit this page? ==\n\nEveryone can edit almost any page in this website. This concept is called a wiki. It gives everyone the opportunity to make a change for the best. While some spam and vandalism may occur, it is believed that most contributions will be legitimate and helpful.\n\nFor security purposes, a history of all page edits is kept, and administrators are able to restore vandalized or spammed pages with just a few clicks.'),
   280   ('cache_thumbs', '{{ENABLE_CACHE}}'),
   313   ('cache_thumbs', '{{ENABLE_CACHE}}'),
   281   ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),('enano_beta_version', '{{BETA_VERSION}}'),( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ),
   314   ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=168;crc=c3dcad3f;data=0[1],1[4],0[3],1[1],0[2],1[1],0[11],1[1],0[7],1[1],0[9],1[1],0[6],1[3],0[10],1[1],0[2],1[2],0[1],1[1],0[1],1[2],0[6],1[3],0[1],1[1],0[2],1[4],0[1],1[2],0[3],1[1],0[4],1[2],0[26],1[5],0[6],1[2],0[2],1[1],0[4],1[1],0[10],1[2],0[1],1[1],0[6]|end' ),
   282   ('contact_email', '{{ADMIN_EMAIL}}'),
   315   ('contact_email', '{{ADMIN_EMAIL}}'),
   283   ('powered_btn', '1');
   316   ('powered_btn', '1');
   284 
   317 
   285 INSERT INTO {{TABLE_PREFIX}}page_text(page_id, namespace, page_text, char_tag) VALUES
   318 INSERT INTO {{TABLE_PREFIX}}page_text(page_id, namespace, page_text, char_tag) VALUES
   286   ('Main_Page', 'Article', '=== Enano has been successfully installed! ===\n\nYou have finished installing Enano on this server. Congratulations!', '');
   319   ('Main_Page', 'Article', '=== Enano has been successfully installed! ===\n\nYou have finished installing Enano on this server. Congratulations!', '');