13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
value text
);
insert into parsav_config (key,value) values
('bind',:'bind'),
('domain',:'domain'),
('auth-source',:'auth'),
('administrator',:'admin');
-- note that valid ids should always > 0, as 0 is reserved for null
-- on the client side, vastly simplifying code
drop table if exists parsav_servers cascade;
create table parsav_servers (
id bigint primary key default (1+random()*(2^63-1))::bigint,
domain text not null,
|
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
value text
);
insert into parsav_config (key,value) values
('bind',:'bind'),
('domain',:'domain'),
('auth-source',:'auth'),
('administrator',:'admin'),
('server-secret', encode(
digest(int8send((2^63 * (random()*2 - 1))::bigint),
'sha512'), 'base64'));
-- note that valid ids should always > 0, as 0 is reserved for null
-- on the client side, vastly simplifying code
drop table if exists parsav_servers cascade;
create table parsav_servers (
id bigint primary key default (1+random()*(2^63-1))::bigint,
domain text not null,
|