install/schemas/postgresql_stage2.sql
changeset 359 e0787bb6285b
parent 353 2398420f48e7
child 371 dc6026376919
equal deleted inserted replaced
358:b25d34fbc7ab 359:e0787bb6285b
     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.2 (Coblynau)
     2 -- Version 1.1.1
     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 
     8 -- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
     8 -- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
     9 -- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
     9 -- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
    10 
    10 
    11 -- mysql_stage2.sql - MySQL installation schema, main payload
    11 -- postgresql_stage2.sql - PostgreSQL installation schema, main payload
    12 
    12 
    13 CREATE TABLE {{TABLE_PREFIX}}categories(
    13 CREATE TABLE {{TABLE_PREFIX}}categories(
    14   page_id varchar(64),
    14   page_id varchar(64),
    15   namespace varchar(64),
    15   namespace varchar(64),
    16   category_id varchar(64)
    16   category_id varchar(64)
    24   comment_data text,
    24   comment_data text,
    25   name text,
    25   name text,
    26   approved smallint default 1,
    26   approved smallint default 1,
    27   user_id int NOT NULL DEFAULT -1,
    27   user_id int NOT NULL DEFAULT -1,
    28   time int NOT NULL DEFAULT 0,
    28   time int NOT NULL DEFAULT 0,
       
    29   ip_address varchar(39),
    29   PRIMARY KEY ( comment_id )
    30   PRIMARY KEY ( comment_id )
    30 );
    31 );
    31 
    32 
    32 CREATE TABLE {{TABLE_PREFIX}}logs(
    33 CREATE TABLE {{TABLE_PREFIX}}logs(
    33   log_type varchar(16),
    34   log_type varchar(16),
    97   activation_key varchar(40) NOT NULL DEFAULT 0,
    98   activation_key varchar(40) NOT NULL DEFAULT 0,
    98   old_encryption smallint NOT NULL DEFAULT 0,
    99   old_encryption smallint NOT NULL DEFAULT 0,
    99   temp_password text,
   100   temp_password text,
   100   temp_password_time int NOT NULL DEFAULT 0,
   101   temp_password_time int NOT NULL DEFAULT 0,
   101   user_coppa smallint NOT NULL DEFAULT 0,
   102   user_coppa smallint NOT NULL DEFAULT 0,
       
   103   user_lang smallint NOT NULL,
       
   104   user_has_avatar smallint NOT NULL,
       
   105   avatar_type varchar(3) NOT NULL,
       
   106   user_registration_ip varchar(39),
       
   107   CHECK (user_has_avatar IN ('jpg', 'png', 'gif')),
   102   PRIMARY KEY  (user_id)
   108   PRIMARY KEY  (user_id)
   103 );
   109 );
   104 
   110 
   105 CREATE TABLE {{TABLE_PREFIX}}users_extra(
   111 CREATE TABLE {{TABLE_PREFIX}}users_extra(
   106   user_id int NOT NULL,
   112   user_id int NOT NULL,
   298   ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=185;crc=55fb6f14;data=0[1],1[4],0[3],1[1],0[22],1[1],0[16],1[3],0[16],1[1],0[1],1[2],0[6],1[1],0[1],1[1],0[4],1[2],0[3],1[1],0[48],1[2],0[2],1[1],0[4],1[1],0[37]|end' ),
   304   ('max_file_size', '256000'),('enano_version', '{{VERSION}}'),( 'allowed_mime_types', 'cbf:len=185;crc=55fb6f14;data=0[1],1[4],0[3],1[1],0[22],1[1],0[16],1[3],0[16],1[1],0[1],1[2],0[6],1[1],0[1],1[1],0[4],1[2],0[3],1[1],0[48],1[2],0[2],1[1],0[4],1[1],0[37]|end' ),
   299   ('contact_email', '{{ADMIN_EMAIL}}'),
   305   ('contact_email', '{{ADMIN_EMAIL}}'),
   300   ('powered_btn', '1');
   306   ('powered_btn', '1');
   301 
   307 
   302 INSERT INTO {{TABLE_PREFIX}}page_text(page_id, namespace, page_text, char_tag) VALUES
   308 INSERT INTO {{TABLE_PREFIX}}page_text(page_id, namespace, page_text, char_tag) VALUES
   303   ('Main_Page', 'Article', '=== Enano has been successfully installed and is working. ===\n\nIf you can see this message, it means that you\'ve finished the Enano setup process and are ready to start building your website. Congratulations!\n\nTo edit this front page, click the Log In button to the left, enter the credentials you provided during the installation, and click the Edit This Page button that appears on the blue toolbar just above this text. You can also [http://docs.enanocms.org/Help:2.4 learn more] about editing pages.\n\nTo create more pages, use the Create a Page button to the left. If you enabled wiki mode, you don\'t have to log in first, however your IP address will be shown in the page history.\n\nVisit the [http://docs.enanocms.org/Help:Contents Enano documentation project website] to learn more about administering your site effectively and keeping things secure.\n\n\'\'\'NOTE:\'\'\' You\'ve just installed an unstable version of Enano. This release is completely unsupported and may contain security issues or serious usability bugs. You should not use this release on a production website. The Enano team will not provide any type of support at all for this experimental release.', '');
   309   ('Main_Page', 'Article', '{{MAIN_PAGE_CONTENT}}', '');
       
   310   
       
   311 INSERT INTO {{TABLE_PREFIX}}logs(time_id, date_string, log_type, action, page_id, namespace, author, page_text) VALUES
       
   312   ({{UNIX_TIME}}, 'DEPRECATED', 'page', 'edit', 'Main_Page', 'Article', '{{ADMIN_USER}}', '{{MAIN_PAGE_CONTENT}}');
   304 
   313 
   305 INSERT INTO {{TABLE_PREFIX}}pages(page_order, name, urlname, namespace, special, visible, comments_on, protected, delvotes, delvote_ips) VALUES
   314 INSERT INTO {{TABLE_PREFIX}}pages(page_order, name, urlname, namespace, special, visible, comments_on, protected, delvotes, delvote_ips) VALUES
   306   (NULL, 'Main Page', 'Main_Page', 'Article', 0, 1, 1, 1, 0, '');
   315   (NULL, 'Main Page', 'Main_Page', 'Article', 0, 1, 1, 1, 0, '');
   307 
   316 
   308 INSERT INTO {{TABLE_PREFIX}}themes(theme_id, theme_name, theme_order, default_style, enabled) VALUES
   317 INSERT INTO {{TABLE_PREFIX}}themes(theme_id, theme_name, theme_order, default_style, enabled) VALUES
   309   ('oxygen', 'Oxygen', 1, 'bleu.css', 1),
   318   ('oxygen', 'Oxygen', 1, 'bleu.css', 1),
   310   ('stpatty', 'St. Patty', 2, 'shamrock.css', 1);
   319   ('stpatty', 'St. Patty', 2, 'shamrock.css', 1);
   311 
   320 
   312 INSERT INTO {{TABLE_PREFIX}}users(user_id, username, password, email, real_name, user_level, theme, style, signature, reg_time, account_active) VALUES
   321 INSERT INTO {{TABLE_PREFIX}}users(user_id, username, password, email, real_name, user_level, theme, style, signature, reg_time, account_active, user_registration_ip) VALUES
   313   (1, 'Anonymous', 'invalid-pass-hash', 'anonspam@enanocms.org', 'None', 1, 'oxygen', 'bleu', '', 0, 0),
   322   (1, 'Anonymous', 'invalid-pass-hash', 'anonspam@enanocms.org', 'None', 1, 'oxygen', 'bleu', '', 0, 0),
   314   (2, '{{ADMIN_USER}}', '{{ADMIN_PASS}}', '{{ADMIN_EMAIL}}', '{{REAL_NAME}}', 9, 'oxygen', 'bleu', '', {{UNIX_TIME}}, 1);
   323   (2, '{{ADMIN_USER}}', '{{ADMIN_PASS}}', '{{ADMIN_EMAIL}}', '{{REAL_NAME}}', 9, 'oxygen', 'bleu', '', {{UNIX_TIME}}, 1, '{{IP_ADDRESS}}');
   315   
   324   
   316 INSERT INTO {{TABLE_PREFIX}}users_extra(user_id) VALUES
   325 INSERT INTO {{TABLE_PREFIX}}users_extra(user_id) VALUES
   317   (2);
   326   (2);
   318 
   327 
   319 INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(1, 'Everyone', 3, 1),
   328 INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(1, 'Everyone', 3, 1),