install/schemas/postgresql_stage2.sql
author Dan
Wed, 06 Feb 2008 18:41:47 -0500
changeset 401 6ae6e387a0e3
parent 377 bb3e6c3bd4f4
child 406 7468a663315f
permissions -rw-r--r--
Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     1
-- Enano - an open-source CMS capable of wiki functions, Drupal-like sidebar blocks, and everything in between
359
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
     2
-- Version 1.1.1
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     3
-- Copyright (C) 2006-2007 Dan Fuhry
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     4
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     5
-- This program is Free Software; you can redistribute and/or modify it under the terms of the GNU General Public License
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     6
-- as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     7
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     8
-- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
     9
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    10
359
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
    11
-- postgresql_stage2.sql - PostgreSQL installation schema, main payload
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    12
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    13
CREATE TABLE {{TABLE_PREFIX}}categories(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    14
  page_id varchar(64),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    15
  namespace varchar(64),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    16
  category_id varchar(64)
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    17
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    18
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    19
CREATE TABLE {{TABLE_PREFIX}}comments(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    20
  comment_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    21
  page_id text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    22
  namespace text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    23
  subject text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    24
  comment_data text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    25
  name text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    26
  approved smallint default 1,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    27
  user_id int NOT NULL DEFAULT -1,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    28
  time int NOT NULL DEFAULT 0,
359
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
    29
  ip_address varchar(39),
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    30
  PRIMARY KEY ( comment_id )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    31
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    32
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    33
CREATE TABLE {{TABLE_PREFIX}}logs(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    34
  log_type varchar(16),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    35
  action varchar(16),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    36
  time_id int NOT NULL default '0',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    37
  date_string varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    38
  page_id text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    39
  namespace text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    40
  page_text text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    41
  char_tag varchar(40),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    42
  author varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    43
  edit_summary text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    44
  minor_edit smallint
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    45
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    46
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    47
CREATE TABLE {{TABLE_PREFIX}}page_text(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    48
  page_id varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    49
  namespace varchar(16) NOT NULL default 'Article',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    50
  page_text text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    51
  char_tag varchar(63)
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    52
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    53
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    54
CREATE TABLE {{TABLE_PREFIX}}pages(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    55
  page_order int,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    56
  name varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    57
  urlname varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    58
  namespace varchar(16) NOT NULL default 'Article',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    59
  special smallint default '0',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    60
  visible smallint default '1',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    61
  comments_on smallint default '1',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    62
  protected smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    63
  wiki_mode smallint NOT NULL DEFAULT 2,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    64
  delvotes int NOT NULL default 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    65
  password varchar(40) NOT NULL DEFAULT '',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    66
  delvote_ips text DEFAULT NULL
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    67
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    68
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    69
CREATE TABLE {{TABLE_PREFIX}}session_keys(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    70
  session_key varchar(32),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    71
  salt varchar(32),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    72
  user_id int,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    73
  auth_level smallint NOT NULL default '0',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    74
  source_ip varchar(10) default '0x7f000001',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    75
  time bigint default '0'
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    76
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    77
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    78
CREATE TABLE {{TABLE_PREFIX}}themes(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    79
  theme_id varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    80
  theme_name text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    81
  theme_order smallint NOT NULL default '1',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    82
  default_style varchar(63) NOT NULL DEFAULT '',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    83
  enabled smallint NOT NULL default '1'
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    84
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    85
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    86
CREATE TABLE {{TABLE_PREFIX}}users(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    87
  user_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    88
  username text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    89
  password varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    90
  email text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    91
  real_name text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    92
  user_level smallint NOT NULL default 2,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    93
  theme varchar(64) NOT NULL default 'bleu.css',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    94
  style varchar(64) NOT NULL default 'default',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    95
  signature text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    96
  reg_time int NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    97
  account_active smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    98
  activation_key varchar(40) NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
    99
  old_encryption smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   100
  temp_password text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   101
  temp_password_time int NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   102
  user_coppa smallint NOT NULL DEFAULT 0,
359
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   103
  user_lang smallint NOT NULL,
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   104
  user_has_avatar smallint NOT NULL,
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   105
  avatar_type varchar(3) NOT NULL,
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   106
  user_registration_ip varchar(39),
401
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   107
  user_rank int NOT NULL DEFAULT 1,
371
dc6026376919 Improved compatibility with PostgreSQL and fixed a number of installer bugs; fixed missing "meta" category declaration in language files
Dan
parents: 359
diff changeset
   108
  CHECK (avatar_type IN ('jpg', 'png', 'gif')),
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   109
  PRIMARY KEY  (user_id)
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   110
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   111
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   112
CREATE TABLE {{TABLE_PREFIX}}users_extra(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   113
  user_id int NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   114
  user_aim varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   115
  user_yahoo varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   116
  user_msn varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   117
  user_xmpp varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   118
  user_homepage text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   119
  user_location text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   120
  user_job text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   121
  user_hobbies text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   122
  email_public smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   123
  PRIMARY KEY ( user_id ) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   124
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   125
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   126
CREATE TABLE {{TABLE_PREFIX}}banlist(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   127
  ban_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   128
  ban_type smallint,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   129
  ban_value varchar(64),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   130
  is_regex smallint DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   131
  reason text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   132
  PRIMARY KEY ( ban_id ) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   133
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   134
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   135
CREATE TABLE {{TABLE_PREFIX}}files(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   136
  file_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   137
  time_id int NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   138
  page_id varchar(63) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   139
  filename varchar(127) default NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   140
  size bigint NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   141
  mimetype varchar(63) default NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   142
  file_extension varchar(8) default NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   143
  file_key varchar(32) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   144
  PRIMARY KEY (file_id) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   145
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   146
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   147
CREATE TABLE {{TABLE_PREFIX}}buddies(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   148
  buddy_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   149
  user_id int,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   150
  buddy_user_id int,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   151
  is_friend smallint NOT NULL default '1',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   152
  PRIMARY KEY  (buddy_id) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   153
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   154
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   155
CREATE TABLE {{TABLE_PREFIX}}privmsgs(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   156
  message_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   157
  message_from varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   158
  message_to varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   159
  date int,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   160
  subject varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   161
  message_text text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   162
  folder_name varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   163
  message_read smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   164
  PRIMARY KEY  (message_id) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   165
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   166
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   167
CREATE TABLE {{TABLE_PREFIX}}sidebar(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   168
  item_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   169
  item_order smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   170
  item_enabled smallint NOT NULL DEFAULT 1,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   171
  sidebar_id smallint NOT NULL DEFAULT 1,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   172
  block_name varchar(63) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   173
  block_type smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   174
  block_content text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   175
  PRIMARY KEY ( item_id )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   176
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   177
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   178
CREATE TABLE {{TABLE_PREFIX}}hits(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   179
  hit_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   180
  username varchar(63) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   181
  time int NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   182
  page_id varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   183
  namespace varchar(63),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   184
  PRIMARY KEY ( hit_id ) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   185
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   186
353
2398420f48e7 Dropping changes from revision 350 (dd7cbc97f681)
Dan
parents: 350
diff changeset
   187
CREATE TABLE {{TABLE_PREFIX}}search_index(
2398420f48e7 Dropping changes from revision 350 (dd7cbc97f681)
Dan
parents: 350
diff changeset
   188
  word varchar(64) NOT NULL,
2398420f48e7 Dropping changes from revision 350 (dd7cbc97f681)
Dan
parents: 350
diff changeset
   189
  page_names text,
2398420f48e7 Dropping changes from revision 350 (dd7cbc97f681)
Dan
parents: 350
diff changeset
   190
  PRIMARY KEY ( word )
2398420f48e7 Dropping changes from revision 350 (dd7cbc97f681)
Dan
parents: 350
diff changeset
   191
);
2398420f48e7 Dropping changes from revision 350 (dd7cbc97f681)
Dan
parents: 350
diff changeset
   192
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   193
CREATE TABLE {{TABLE_PREFIX}}groups(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   194
  group_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   195
  group_name varchar(64),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   196
  group_type smallint NOT NULL DEFAULT 1,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   197
  PRIMARY KEY ( group_id ),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   198
  system_group smallint NOT NULL DEFAULT 0 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   199
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   200
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   201
CREATE TABLE {{TABLE_PREFIX}}group_members(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   202
  member_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   203
  group_id int NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   204
  user_id int NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   205
  is_mod smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   206
  pending smallint NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   207
  PRIMARY KEY ( member_id ) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   208
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   209
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   210
CREATE TABLE {{TABLE_PREFIX}}acl(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   211
  rule_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   212
  target_type smallint NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   213
  target_id int NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   214
  page_id varchar(255),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   215
  namespace varchar(24),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   216
  rules text,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   217
  PRIMARY KEY ( rule_id ) 
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   218
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   219
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   220
-- Added in 1.0.1
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   221
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   222
CREATE TABLE {{TABLE_PREFIX}}page_groups(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   223
  pg_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   224
  pg_type smallint NOT NULL DEFAULT 1,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   225
  pg_name varchar(255) NOT NULL DEFAULT '',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   226
  pg_target varchar(255) DEFAULT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   227
  PRIMARY KEY ( pg_id )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   228
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   229
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   230
-- Added in 1.0.1
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   231
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   232
CREATE TABLE {{TABLE_PREFIX}}page_group_members(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   233
  pg_member_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   234
  pg_id int NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   235
  page_id varchar(63) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   236
  namespace varchar(63) NOT NULL DEFAULT 'Article',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   237
  PRIMARY KEY ( pg_member_id )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   238
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   239
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   240
-- Added in 1.0.1
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   241
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   242
CREATE TABLE {{TABLE_PREFIX}}tags(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   243
  tag_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   244
  tag_name varchar(63) NOT NULL DEFAULT 'bla',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   245
  page_id varchar(255) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   246
  namespace varchar(255) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   247
  user_id int NOT NULL DEFAULT 1,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   248
  PRIMARY KEY ( tag_id )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   249
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   250
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   251
-- Added in 1.1.1
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   252
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   253
CREATE TABLE {{TABLE_PREFIX}}lockout(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   254
  id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   255
  ipaddr varchar(40) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   256
  action varchar(20) NOT NULL DEFAULT 'credential',
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   257
  timestamp int NOT NULL DEFAULT 0,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   258
  CHECK ( action IN ('credential', 'level') )
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   259
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   260
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   261
-- Added in 1.1.1
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   262
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   263
CREATE TABLE {{TABLE_PREFIX}}language(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   264
  lang_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   265
  lang_code varchar(16) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   266
  lang_name_default varchar(64) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   267
  lang_name_native varchar(64) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   268
  last_changed int NOT NULL DEFAULT 0
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   269
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   270
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   271
-- Added in 1.1.1
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   272
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   273
CREATE TABLE {{TABLE_PREFIX}}language_strings(
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   274
  string_id SERIAL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   275
  lang_id int NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   276
  string_category varchar(32) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   277
  string_name varchar(64) NOT NULL,
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   278
  string_content text NOT NULL
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   279
);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   280
401
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   281
-- Added in 1.1.1
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   282
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   283
CREATE TABLE {{TABLE_PREFIX}}ranks(
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   284
  rank_id SERIAL,
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   285
  rank_title varchar(63) NOT NULL DEFAULT '',
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   286
  rank_style varchar(255) NOT NULL DEFAULT ''
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   287
);
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   288
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   289
-- Added in 1.1.1
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   290
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   291
CREATE TABLE {{TABLE_PREFIX}}captcha(
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   292
  code_id SERIAL,
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   293
  session_id varchar(40) NOT NULL DEFAULT '',
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   294
  code varchar(64) NOT NULL DEFAULT '',
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   295
  session_data text,
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   296
  source_ip varchar(39),
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   297
  user_id int
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   298
);
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   299
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   300
INSERT INTO {{TABLE_PREFIX}}config(config_name, config_value) VALUES
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   301
  ('site_name', '{{SITE_NAME}}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   302
  ('main_page', 'Main_Page'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   303
  ('site_desc', '{{SITE_DESC}}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   304
  ('wiki_mode', '{{WIKI_MODE}}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   305
  ('wiki_edit_notice', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   306
  ('sflogo_enabled', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   307
  ('sflogo_groupid', ''),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   308
  ('sflogo_type', '1'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   309
  ('w3c_vh32', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   310
  ('w3c_vh40', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   311
  ('w3c_vh401', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   312
  ('w3c_vxhtml10', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   313
  ('w3c_vxhtml11', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   314
  ('w3c_vcss', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   315
  ('approve_comments', '0'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   316
  ('enable_comments', '1'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   317
  ('plugin_SpecialAdmin.php', '1'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   318
  ('plugin_SpecialPageFuncs.php', '1'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   319
  ('plugin_SpecialUserFuncs.php', '1'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   320
  ('plugin_SpecialCSS.php', '1'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   321
  ('copyright_notice', '{{COPYRIGHT}}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   322
  ('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.'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   323
  ('cache_thumbs', '{{ENABLE_CACHE}}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   324
  ('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' ),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   325
  ('contact_email', '{{ADMIN_EMAIL}}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   326
  ('powered_btn', '1');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   327
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   328
INSERT INTO {{TABLE_PREFIX}}page_text(page_id, namespace, page_text, char_tag) VALUES
359
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   329
  ('Main_Page', 'Article', '{{MAIN_PAGE_CONTENT}}', '');
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   330
  
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   331
INSERT INTO {{TABLE_PREFIX}}logs(time_id, date_string, log_type, action, page_id, namespace, author, page_text) VALUES
e0787bb6285b Implemented IP logging for comments and registration
Dan
parents: 353
diff changeset
   332
  ({{UNIX_TIME}}, 'DEPRECATED', 'page', 'edit', 'Main_Page', 'Article', '{{ADMIN_USER}}', '{{MAIN_PAGE_CONTENT}}');
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   333
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   334
INSERT INTO {{TABLE_PREFIX}}pages(page_order, name, urlname, namespace, special, visible, comments_on, protected, delvotes, delvote_ips) VALUES
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   335
  (NULL, 'Main Page', 'Main_Page', 'Article', 0, 1, 1, 1, 0, '');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   336
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   337
INSERT INTO {{TABLE_PREFIX}}themes(theme_id, theme_name, theme_order, default_style, enabled) VALUES
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   338
  ('oxygen', 'Oxygen', 1, 'bleu.css', 1),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   339
  ('stpatty', 'St. Patty', 2, 'shamrock.css', 1);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   340
371
dc6026376919 Improved compatibility with PostgreSQL and fixed a number of installer bugs; fixed missing "meta" category declaration in language files
Dan
parents: 359
diff changeset
   341
INSERT INTO {{TABLE_PREFIX}}users(user_id, username, password, email, real_name, user_level, theme, style, signature, reg_time, account_active, user_registration_ip, user_lang, user_has_avatar, avatar_type) VALUES
dc6026376919 Improved compatibility with PostgreSQL and fixed a number of installer bugs; fixed missing "meta" category declaration in language files
Dan
parents: 359
diff changeset
   342
  (1, 'Anonymous', 'invalid-pass-hash', 'anonspam@enanocms.org', 'None', 1, 'oxygen', 'bleu', '', 0, 0, '', 0, 0, 'png'),
dc6026376919 Improved compatibility with PostgreSQL and fixed a number of installer bugs; fixed missing "meta" category declaration in language files
Dan
parents: 359
diff changeset
   343
  (2, '{{ADMIN_USER}}', '{{ADMIN_PASS}}', '{{ADMIN_EMAIL}}', '{{REAL_NAME}}', 9, 'oxygen', 'bleu', '', {{UNIX_TIME}}, 1, '{{IP_ADDRESS}}', 0, 0, 'png');
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   344
  
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   345
INSERT INTO {{TABLE_PREFIX}}users_extra(user_id) VALUES
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   346
  (2);
401
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   347
  
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   348
INSERT INTO {{TABLE_PREFIX}}ranks(rank_id, rank_title, rank_style) VALUES
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   349
  (1, 'user_rank_member', ''),
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   350
  (2, 'user_rank_mod', 'font-weight: bold; color: #00AA00;'),
6ae6e387a0e3 Implemented a new CAPTCHA API; the frontend ($session->{make,get}_captcha) is API-compatible but the backend (the captcha class) is deprecated.
Dan
parents: 377
diff changeset
   351
  (3, 'user_rank_admin', 'font-weight: bold; color: #AA0000;');
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   352
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   353
INSERT INTO {{TABLE_PREFIX}}groups(group_id,group_name,group_type,system_group) VALUES(1, 'Everyone', 3, 1),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   354
  (2,'Administrators',3,1),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   355
  (3,'Moderators',3,1);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   356
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   357
INSERT INTO {{TABLE_PREFIX}}group_members(group_id,user_id,is_mod) VALUES(2, 2, 1);
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   358
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   359
INSERT INTO {{TABLE_PREFIX}}acl(target_type,target_id,page_id,namespace,rules) VALUES
377
bb3e6c3bd4f4 Removed stray debugging info from ACL editor success notification; added ability for guests to set language on URI (?lang=eng); added html_in_pages ACL type and separated from php_in_pages so HTML can be embedded but not PHP; rewote portions of the path manager to better abstract URL input; added Zend Framework into list of BSD-licensed libraries; localized some remaining strings; got the migration script working, but just barely; fixed display bug in Special:Contributions; localized Main Page button in admin panel
Dan
parents: 371
diff changeset
   360
  (1,2,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=4;clear_logs=4;vote_delete=4;vote_reset=4;delete_page=4;tag_create=4;tag_delete_own=4;tag_delete_other=4;set_wiki_mode=4;password_set=4;password_reset=4;mod_misc=4;edit_cat=4;even_when_protected=4;upload_files=4;upload_new_version=4;create_page=4;html_in_pages=4;php_in_pages={{ADMIN_EMBED_PHP}};edit_acl=4;'),
348
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   361
  (1,3,NULL,NULL,'read=4;post_comments=4;edit_comments=4;edit_page=4;view_source=4;mod_comments=4;history_view=4;history_rollback=4;history_rollback_extra=4;protect=4;rename=3;clear_logs=2;vote_delete=4;vote_reset=4;delete_page=4;set_wiki_mode=2;password_set=2;password_reset=2;mod_misc=2;edit_cat=4;even_when_protected=4;upload_files=2;upload_new_version=3;create_page=3;php_in_pages=2;edit_acl=2;');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   362
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   363
INSERT INTO {{TABLE_PREFIX}}sidebar(item_id, item_order, sidebar_id, block_name, block_type, block_content) VALUES
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   364
  (1, 1, 1, '{lang:sidebar_title_navigation}', 1, '[[Main_Page|{lang:sidebar_btn_home}]]'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   365
  (2, 2, 1, '{lang:sidebar_title_tools}', 1, '[[$NS_SPECIAL$CreatePage|{lang:sidebar_btn_createpage}]]\n[[$NS_SPECIAL$UploadFile|{lang:sidebar_btn_uploadfile}]]\n[[$NS_SPECIAL$SpecialPages|{lang:sidebar_btn_specialpages}]]\n{if auth_admin}\n$ADMIN_LINK$\n[[$NS_SPECIAL$EditSidebar|{lang:sidebar_btn_editsidebar}]]\n{/if}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   366
  (3, 3, 1, '$USERNAME$', 1, '[[$NS_USER$$USERNAME$|{lang:sidebar_btn_userpage}]]\n[[$NS_SPECIAL$Contributions/$USERNAME$|{lang:sidebar_btn_mycontribs}]]\n{if user_logged_in}\n[[$NS_SPECIAL$Preferences|{lang:sidebar_btn_preferences}]]\n[[$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n[[$NS_SPECIAL$Usergroups|{lang:sidebar_btn_groupcp}]]\n$THEME_LINK$\n{/if}\n{if user_logged_in}\n$LOGOUT_LINK$\n{else}\n[[$NS_SPECIAL$Register|{lang:sidebar_btn_register}]]\n$LOGIN_LINK$\n[[$NS_SPECIAL$Login/$NS_SPECIAL$PrivateMessages|{lang:sidebar_btn_privatemessages}]]\n{/if}'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   367
  (4, 4, 1, '{lang:sidebar_title_search}', 1, '<div class="slideblock2" style="padding: 0px;"><form action="$CONTENTPATH$$NS_SPECIAL$Search" method="get" style="padding: 0; margin: 0;"><p><input type="hidden" name="title" value="$NS_SPECIAL$Search" />$INPUT_AUTH$<input name="q" alt="Search box" type="text" size="10" style="width: 70%" /> <input type="submit" value="{lang:sidebar_btn_search_go}" style="width: 20%" /></p></form></div>'),
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   368
  (5, 2, 2, '{lang:sidebar_title_links}', 4, 'Links');
87e08a6e4fec Welcome to the new Enano installer. Much distance still to be covered but the basics are there.
Dan
parents:
diff changeset
   369