migrate to multiple sqlite db files ( primary + requests + logs )
This commit is contained in:
6
scnserver/db/impl/logs/schema/assets.go
Normal file
6
scnserver/db/impl/logs/schema/assets.go
Normal file
@@ -0,0 +1,6 @@
|
||||
package schema
|
||||
|
||||
import _ "embed"
|
||||
|
||||
//go:embed schema_1.ddl
|
||||
var LogsSchema1 string
|
||||
22
scnserver/db/impl/logs/schema/schema_1.ddl
Normal file
22
scnserver/db/impl/logs/schema/schema_1.ddl
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
CREATE TABLE `logs`
|
||||
(
|
||||
log_id INTEGER PRIMARY KEY,
|
||||
timestamp_created INTEGER NOT NULL
|
||||
|
||||
) STRICT;
|
||||
|
||||
|
||||
CREATE TABLE `meta`
|
||||
(
|
||||
meta_key TEXT NOT NULL,
|
||||
value_int INTEGER NULL,
|
||||
value_txt TEXT NULL,
|
||||
value_real REAL NULL,
|
||||
value_blob BLOB NULL,
|
||||
|
||||
PRIMARY KEY (meta_key)
|
||||
) STRICT;
|
||||
|
||||
|
||||
INSERT INTO meta (meta_key, value_int) VALUES ('schema', 1)
|
||||
7
scnserver/db/impl/logs/schema/schema_sqlite.ddl
Normal file
7
scnserver/db/impl/logs/schema/schema_sqlite.ddl
Normal file
@@ -0,0 +1,7 @@
|
||||
CREATE TABLE sqlite_master (
|
||||
type text,
|
||||
name text,
|
||||
tbl_name text,
|
||||
rootpage integer,
|
||||
sql text
|
||||
);
|
||||
Reference in New Issue
Block a user