1 -- update script 2003-07-04 by Zapata
2 -- * makes the password field longer in webdb_users
3 -- * adds a comments field to webdb_users;
4 -- This script will terminate with an error the second time it's run,
5 -- so running this script when it isn't needed can't do any harm.
10 ALTER TABLE "webdb_users" RENAME TO "webdb_users_old";
11 DROP INDEX "webdb_users_pkey";
12 DROP INDEX "idx_webdb_user_log_pas";
14 CREATE TABLE "webdb_users" (
15 "id" integer DEFAULT nextval('webdb_users_id_seq'::text) NOT NULL,
16 "login" character varying(16) NOT NULL,
17 "password" character varying(255) NOT NULL,
18 "is_admin" boolean DEFAULT '0' NOT NULL,
20 Constraint "webdb_users_pkey" Primary Key ("id")
23 INSERT INTO "webdb_users" (
34 FROM "webdb_users_old";
38 relowner = (SELECT relowner FROM pg_class WHERE relname='webdb_users_old'),
39 relacl = (SELECT relacl FROM pg_class WHERE relname='webdb_users_old')
41 relname = 'webdb_users';
43 DROP TABLE "webdb_users_old";
45 DROP INDEX "idx_webdb_user_log_pas_is_admin" on "webdb_users" using btree ( "login" "varchar_ops", "password" "varchar_ops", "is_admin" "bool_ops" );