annotate SQL/sqlite/2016112200.sql @ 8:bf99236cc5cd default tip

try to recover from upgrade fail
author Charlie Root
date Sat, 29 Dec 2018 07:07:34 -0500
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
1 DROP TABLE cache;
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
2 DROP TABLE cache_shared;
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
3
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
4 CREATE TABLE cache (
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
5 user_id integer NOT NULL default 0,
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
6 cache_key varchar(128) NOT NULL default '',
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
7 expires datetime DEFAULT NULL,
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
8 data text NOT NULL,
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
9 PRIMARY KEY (user_id, cache_key)
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
10 );
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
11
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
12 CREATE INDEX ix_cache_expires ON cache(expires);
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
13
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
14 CREATE TABLE cache_shared (
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
15 cache_key varchar(255) NOT NULL,
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
16 expires datetime DEFAULT NULL,
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
17 data text NOT NULL,
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
18 PRIMARY KEY (cache_key)
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
19 );
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
20
bf99236cc5cd try to recover from upgrade fail
Charlie Root
parents:
diff changeset
21 CREATE INDEX ix_cache_shared_expires ON cache_shared(expires);