tangled
alpha
login
or
join now
bad-example.com
/
core
forked from
tangled.org/core
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
all: misc db fixes + sqlite prod settings
anirudh.fi
11 months ago
71e9f5dd
822248b2
+18
-9
2 changed files
expand all
collapse all
unified
split
appview
db
db.go
knotserver
db
init.go
+9
appview/db/db.go
···
16
16
return nil, err
17
17
}
18
18
_, err = db.Exec(`
19
19
+
pragma journal_mode = WAL;
20
20
+
pragma synchronous = normal;
21
21
+
pragma foreign_keys = on;
22
22
+
pragma temp_store = memory;
23
23
+
pragma mmap_size = 30000000000;
24
24
+
pragma page_size = 32768;
25
25
+
pragma auto_vacuum = incremental;
26
26
+
pragma busy_timeout = 5000;
27
27
+
19
28
create table if not exists registrations (
20
29
id integer primary key autoincrement,
21
30
domain text not null unique,
+9
-9
knotserver/db/init.go
···
17
17
}
18
18
19
19
_, err = db.Exec(`
20
20
+
pragma journal_mode = WAL;
21
21
+
pragma synchronous = normal;
22
22
+
pragma foreign_keys = on;
23
23
+
pragma temp_store = memory;
24
24
+
pragma mmap_size = 30000000000;
25
25
+
pragma page_size = 32768;
26
26
+
pragma auto_vacuum = incremental;
27
27
+
pragma busy_timeout = 5000;
28
28
+
20
29
create table if not exists known_dids (
21
30
did text primary key
22
31
);
···
28
37
created text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
29
38
unique(did, key),
30
39
foreign key (did) references known_dids(did) on delete cascade
31
31
-
);
32
32
-
33
33
-
create table if not exists repos (
34
34
-
id integer primary key autoincrement,
35
35
-
did text not null,
36
36
-
name text not null,
37
37
-
description text not null,
38
38
-
created text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
39
39
-
unique(did, name)
40
40
);
41
41
42
42
create table if not exists _jetstream (