install/schemas/upgrade/1.1.1-1.1.2-mysql.sql
author Dan
Tue, 12 Feb 2008 00:42:29 -0500
changeset 414 818b4cd12b8b
parent 413 6607cd646d6d
child 422 ca37fcd08c4e
permissions -rw-r--r--
Added "is_draft != 1" where appropriate in SQL queries to prevent drafts from being treated as real revisions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
410
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     1
-- Enano CMS
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     2
-- Upgrade schema - Enano 1.1.1 - 1.1.2
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     3
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     4
ALTER TABLE {{TABLE_PREFIX}}logs ADD COLUMN log_id int(15) NOT NULL auto_increment, ADD PRIMARY KEY ( log_id );
413
6607cd646d6d Added autosave functionality and resurrected the old toolbar code that was added about a year ago but never uesd.
Dan
parents: 410
diff changeset
     5
ALTER TABLE {{TABLE_PREFIX}}logs ADD COLUMN is_draft tinyint(1) NOT NULL DEFAULT 0;
410
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     6
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     7
ALTER TABLE {{TABLE_PREFIX}}users ADD COLUMN user_rank int(12) UNSIGNED NOT NULL DEFAULT 1,
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     8
                                  ADD COLUMN user_timezone int(12) UNSIGNED NOT NULL DEFAULT 0;
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
     9
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    10
CREATE TABLE {{TABLE_PREFIX}}ranks(
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    11
  rank_id int(12) NOT NULL auto_increment,
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    12
  rank_title varchar(63) NOT NULL DEFAULT '',
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    13
  rank_style varchar(255) NOT NULL DEFAULT '',
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    14
  PRIMARY KEY ( rank_id )
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    15
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    16
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    17
CREATE TABLE {{TABLE_PREFIX}}captcha(
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    18
  code_id int(12) NOT NULL auto_increment,
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    19
  session_id varchar(40) NOT NULL DEFAULT '',
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    20
  code varchar(64) NOT NULL DEFAULT '',
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    21
  session_data text,
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    22
  source_ip varchar(39),
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    23
  user_id int(12),
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    24
  PRIMARY KEY ( code_id )
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    25
) CHARACTER SET `utf8` COLLATE `utf8_bin`;
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    26
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    27
INSERT INTO {{TABLE_PREFIX}}ranks(rank_id, rank_title, rank_style) VALUES
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    28
  (1, 'user_rank_member', ''),
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    29
  (2, 'user_rank_mod', 'font-weight: bold; color: #00AA00;'),
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    30
  (3, 'user_rank_admin', 'font-weight: bold; color: #AA0000;');
9db359d6e60c Added upgrade schema files for 1.1.1 -> current (1.1.2-dev)
Dan
parents:
diff changeset
    31