forked from tangled.org/core
this repo has no description

all: misc db fixes + sqlite prod settings

anirudh.fi c843ceea 92eb2c2d

verified
Changed files
+18 -9
appview
db
knotserver
db
+9
appview/db/db.go
···
return nil, err
}
_, err = db.Exec(`
+
pragma journal_mode = WAL;
+
pragma synchronous = normal;
+
pragma foreign_keys = on;
+
pragma temp_store = memory;
+
pragma mmap_size = 30000000000;
+
pragma page_size = 32768;
+
pragma auto_vacuum = incremental;
+
pragma busy_timeout = 5000;
+
create table if not exists registrations (
id integer primary key autoincrement,
domain text not null unique,
+9 -9
knotserver/db/init.go
···
}
_, err = db.Exec(`
+
pragma journal_mode = WAL;
+
pragma synchronous = normal;
+
pragma foreign_keys = on;
+
pragma temp_store = memory;
+
pragma mmap_size = 30000000000;
+
pragma page_size = 32768;
+
pragma auto_vacuum = incremental;
+
pragma busy_timeout = 5000;
+
create table if not exists known_dids (
did text primary key
);
···
created text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
unique(did, key),
foreign key (did) references known_dids(did) on delete cascade
-
);
-
-
create table if not exists repos (
-
id integer primary key autoincrement,
-
did text not null,
-
name text not null,
-
description text not null,
-
created text not null default (strftime('%Y-%m-%dT%H:%M:%SZ', 'now')),
-
unique(did, name)
);
create table if not exists _jetstream (