3 * Plain old SQL for setting up the tables for Odin web services.
6 /* The various tools assume that the database is appropriate configured with
7 * the SERIALIZABLE isolation level.
12 drop table if exists odin_shorturl
;
13 drop table if exists odin_shorturl_seq
;
15 create table odin_shorturl_seq (seq
int);
16 insert into odin_shorturl_seq (seq
) values (10000);
18 create table odin_shorturl
19 (tag
varchar(16) primary key,
20 stamp
bigint not null,
21 owner varchar(64) not null,
23 create index odin_shorturl_by_owner
on odin_shorturl (owner);
24 create index odin_shorturl_by_url_owner
on odin_shorturl (url
, owner);