chiark / gitweb /
Make a licensing decision: it's all AGPLv3+.
[odin-cgi] / sql / update-pastebin-v2.sql
CommitLineData
07cefc9f
MW
1/* -*-sql-*-
2 *
3 * Plain old SQL for setting up the tables for Odin web services.
128543b0
MW
4 *
5 * (c) 2015 Mark Wooding
6 */
7
8/*----- Licensing notice ----------------------------------------------------
9 *
10 * This file is part of the `odin.gg' service, `odin-cgi'.
11 *
12 * `odin-cgi' is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU Affero General Public License as
14 * published by the Free Software Foundation; either version 3 of the
15 * License, or (at your option) any later version.
16 *
17 * `odin-cgi' is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU Affero General Public License for more details.
21 *
22 * You should have received a copy of the GNU Affero General Public
23 * License along with `odin-cgi'; if not, see
24 * <http://www.gnu.org/licenses/>.
07cefc9f
MW
25 */
26
27begin;
28alter table odin_pastebin alter column lang set default 'txt';
29alter table odin_pastebin rename column stamp to oldstamp;
30alter table odin_pastebin add column stamp bigint not null default 0;
31update odin_pastebin set stamp = extract(epoch from oldstamp);
32commit;
33
34begin;
35alter table odin_pastebin drop column oldstamp;
36alter table odin_pastebin alter column stamp drop default;
37commit;