install/schemas/upgrade/postgresql/1121.sql
author Dan Fuhry <dan@enanocms.org>
Thu, 01 Jul 2010 20:24:19 -0400
changeset 1259 49db7495f6b8
permissions -rw-r--r--
First shot at switching to database revision numbers separate from release version number. There are probably bugs, especially related to migration.

-- Enano CMS
-- Upgrade schema: 1.1.2 - 1.1.3

-- Storing obscenely huge integers as strings since that's how php processes them.

CREATE TABLE {{TABLE_PREFIX}}diffiehellman (
  key_id SERIAL,
  private_key text,
  public_key text,
  PRIMARY KEY ( key_id )
);

ALTER TABLE {{TABLE_PREFIX}}themes DROP group_policy, ADD COLUMN group_policy varchar(9) NOT NULL DEFAULT 'allow_all', ADD CHECK ( group_policy IN ('allow_all', 'whitelist', 'blacklist') );

ALTER TABLE {{TABLE_PREFIX}}session_keys ALTER COLUMN source_ip TYPE varchar(39),
                                         ADD CHECK ( source_ip IS NOT NULL ),
                                         ALTER COLUMN source_ip SET DEFAULT '127.0.0.1';