1 -- update script 2005-09-08 by pietro
3 -- * adds "db_patches" and "model_version" tables to the database
5 -- This script will terminate with an error the second time it's run,
6 -- so running this script when it isn't needed can't do any harm.
15 CREATE SEQUENCE "db_patches_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
17 CREATE TABLE "db_patches" (
18 "id" integer DEFAULT nextval('db_patches_id_seq'::text) NOT NULL,
23 INSERT INTO "db_patches" VALUES (1, DATE '2002-12-13', '* introduces sequences and primary keys for comment_status, article_type and
24 language\n * adds is_html to comment');
25 INSERT INTO "db_patches" VALUES (2, DATE '2003-04-09', '* creates table comment_x_media, to support media in comments\n * adds webdb_lastchange to comment');
26 INSERT INTO "db_patches" VALUES (3, DATE '2003-11-22', '* added a bunch of fields to webdb_user: is_disabled, email, profile, creation date, last login date');
27 INSERT INTO "db_patches" VALUES (4, DATE '2003-11-24', '* Clean up comments\n * added a comment field for internal comments');
28 INSERT INTO "db_patches" VALUES (5, DATE '2003-11-25', '* Removal of media (uploaded_media and content are now independently)\n * Clean up of content\n * Added a field for content-locking\n * Added a keywords field for content');
29 INSERT INTO "db_patches" VALUES (6, DATE '2003-12-12', '* makes login unique on webdb_users\n * drops unnecessary index on webdb_users\n * inserts a line for ogg support in media_types\n * drop "- deprecated -" from media_types\n * drop redundant index on id of topic\n * drop redundant index on id of comment\n * recreate indexes on content_x_media');
30 INSERT INTO "db_patches" VALUES (7, DATE '2005-01-09', '* adds filter and filtergroups to the database');
31 INSERT INTO "db_patches" VALUES (8, DATE '2005-09-13', '* adds "db_patches" and "model_version" tables to the database for database changes tracking');
37 CREATE TABLE "model_version" (
38 "description" character varying(24)
41 INSERT INTO "model_version" VALUES ('1.1-1');