diff options
Diffstat (limited to 'src/plugin/namecache/namecache-0001.sql')
-rw-r--r-- | src/plugin/namecache/namecache-0001.sql | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/plugin/namecache/namecache-0001.sql b/src/plugin/namecache/namecache-0001.sql new file mode 100644 index 000000000..8509b078f --- /dev/null +++ b/src/plugin/namecache/namecache-0001.sql | |||
@@ -0,0 +1,42 @@ | |||
1 | -- | ||
2 | -- This file is part of GNUnet | ||
3 | -- Copyright (C) 2014--2022 GNUnet e.V. | ||
4 | -- | ||
5 | -- GNUnet is free software; you can redistribute it and/or modify it under the | ||
6 | -- terms of the GNU General Public License as published by the Free Software | ||
7 | -- Foundation; either version 3, or (at your option) any later version. | ||
8 | -- | ||
9 | -- GNUnet is distributed in the hope that it will be useful, but WITHOUT ANY | ||
10 | -- WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR | ||
11 | -- A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
12 | -- | ||
13 | -- You should have received a copy of the GNU General Public License along with | ||
14 | -- GNUnet; see the file COPYING. If not, see <http://www.gnu.org/licenses/> | ||
15 | -- | ||
16 | |||
17 | -- Everything in one big transaction | ||
18 | BEGIN; | ||
19 | |||
20 | -- Check patch versioning is in place. | ||
21 | SELECT _v.register_patch('namecache-0001', NULL, NULL); | ||
22 | |||
23 | -------------------- Schema ---------------------------- | ||
24 | |||
25 | CREATE SCHEMA datacache; | ||
26 | COMMENT ON SCHEMA datacache IS 'gnunet-datacache data'; | ||
27 | |||
28 | SET search_path TO datacache; | ||
29 | |||
30 | CREATE TABLE IF NOT EXISTS ns096blocks ( | ||
31 | query BYTEA NOT NULL DEFAULT '', | ||
32 | block BYTEA NOT NULL DEFAULT '', | ||
33 | expiration_time BIGINT NOT NULL DEFAULT 0); | ||
34 | |||
35 | CREATE INDEX ir_query_hash | ||
36 | ON ns096blocks (query,expiration_time); | ||
37 | |||
38 | CREATE INDEX ir_block_expiration | ||
39 | ON ns096blocks (expiration_time); | ||
40 | |||
41 | |||
42 | COMMIT; | ||