Mercurial > hg > rc2
comparison SQL/oracle.initial.sql @ 8:bf99236cc5cd
try to recover from upgrade fail
author | Charlie Root |
---|---|
date | Sat, 29 Dec 2018 07:07:34 -0500 |
parents | 4681f974d28b |
children |
comparison
equal
deleted
inserted
replaced
7:65fd7d441cf1 | 8:bf99236cc5cd |
---|---|
5 "user_id" integer PRIMARY KEY, | 5 "user_id" integer PRIMARY KEY, |
6 "username" varchar(128) NOT NULL, | 6 "username" varchar(128) NOT NULL, |
7 "mail_host" varchar(128) NOT NULL, | 7 "mail_host" varchar(128) NOT NULL, |
8 "created" timestamp with time zone DEFAULT current_timestamp NOT NULL, | 8 "created" timestamp with time zone DEFAULT current_timestamp NOT NULL, |
9 "last_login" timestamp with time zone DEFAULT NULL, | 9 "last_login" timestamp with time zone DEFAULT NULL, |
10 "failed_login" timestamp with time zone DEFAULT NULL, | |
11 "failed_login_counter" integer DEFAULT NULL, | |
10 "language" varchar(5), | 12 "language" varchar(5), |
11 "preferences" long DEFAULT NULL, | 13 "preferences" long DEFAULT NULL, |
12 CONSTRAINT "users_username_key" UNIQUE ("username", "mail_host") | 14 CONSTRAINT "users_username_key" UNIQUE ("username", "mail_host") |
13 ); | 15 ); |
14 | 16 |
22 END; | 24 END; |
23 / | 25 / |
24 | 26 |
25 CREATE TABLE "session" ( | 27 CREATE TABLE "session" ( |
26 "sess_id" varchar(128) NOT NULL PRIMARY KEY, | 28 "sess_id" varchar(128) NOT NULL PRIMARY KEY, |
27 "created" timestamp with time zone DEFAULT current_timestamp NOT NULL, | |
28 "changed" timestamp with time zone DEFAULT current_timestamp NOT NULL, | 29 "changed" timestamp with time zone DEFAULT current_timestamp NOT NULL, |
29 "ip" varchar(41) NOT NULL, | 30 "ip" varchar(41) NOT NULL, |
30 "vars" long NOT NULL | 31 "vars" long NOT NULL |
31 ); | 32 ); |
32 | 33 |
123 | 124 |
124 CREATE TABLE "cache" ( | 125 CREATE TABLE "cache" ( |
125 "user_id" integer NOT NULL | 126 "user_id" integer NOT NULL |
126 REFERENCES "users" ("user_id") ON DELETE CASCADE, | 127 REFERENCES "users" ("user_id") ON DELETE CASCADE, |
127 "cache_key" varchar(128) NOT NULL, | 128 "cache_key" varchar(128) NOT NULL, |
128 "created" timestamp with time zone DEFAULT current_timestamp NOT NULL, | 129 "expires" timestamp with time zone DEFAULT NULL, |
129 "expires" timestamp with time zone DEFAULT NULL, | 130 "data" long NOT NULL, |
130 "data" long NOT NULL | 131 PRIMARY KEY ("user_id", "cache_key") |
131 ); | 132 ); |
132 | 133 |
133 CREATE INDEX "cache_user_id_idx" ON "cache" ("user_id", "cache_key"); | |
134 CREATE INDEX "cache_expires_idx" ON "cache" ("expires"); | 134 CREATE INDEX "cache_expires_idx" ON "cache" ("expires"); |
135 | 135 |
136 | 136 |
137 CREATE TABLE "cache_shared" ( | 137 CREATE TABLE "cache_shared" ( |
138 "cache_key" varchar(255) NOT NULL, | 138 "cache_key" varchar(255) NOT NULL, |
139 "created" timestamp with time zone DEFAULT current_timestamp NOT NULL, | 139 "expires" timestamp with time zone DEFAULT NULL, |
140 "expires" timestamp with time zone DEFAULT NULL, | 140 "data" long NOT NULL, |
141 "data" long NOT NULL | 141 PRIMARY KEY ("cache_key") |
142 ); | 142 ); |
143 | 143 |
144 CREATE INDEX "cache_shared_cache_key_idx" ON "cache_shared" ("cache_key"); | |
145 CREATE INDEX "cache_shared_expires_idx" ON "cache_shared" ("expires"); | 144 CREATE INDEX "cache_shared_expires_idx" ON "cache_shared" ("expires"); |
146 | 145 |
147 | 146 |
148 CREATE TABLE "cache_index" ( | 147 CREATE TABLE "cache_index" ( |
149 "user_id" integer NOT NULL | 148 "user_id" integer NOT NULL |
216 CREATE TABLE "system" ( | 215 CREATE TABLE "system" ( |
217 "name" varchar(64) NOT NULL PRIMARY KEY, | 216 "name" varchar(64) NOT NULL PRIMARY KEY, |
218 "value" long | 217 "value" long |
219 ); | 218 ); |
220 | 219 |
221 INSERT INTO "system" ("name", "value") VALUES ('roundcube-version', '2015030800'); | 220 INSERT INTO "system" ("name", "value") VALUES ('roundcube-version', '2016112200'); |