Commit | Line | Data |
---|---|---|
07cefc9f MW |
1 | /* -*-sql-*- |
2 | * | |
3 | * Plain old SQL for setting up the tables for Odin web services. | |
4 | */ | |
5 | ||
6 | begin; | |
7 | alter table odin_pastebin alter column lang set default 'txt'; | |
8 | alter table odin_pastebin rename column stamp to oldstamp; | |
9 | alter table odin_pastebin add column stamp bigint not null default 0; | |
10 | update odin_pastebin set stamp = extract(epoch from oldstamp); | |
11 | commit; | |
12 | ||
13 | begin; | |
14 | alter table odin_pastebin drop column oldstamp; | |
15 | alter table odin_pastebin alter column stamp drop default; | |
16 | commit; |