Skip to content

Commit a7ad6ed

Browse files
committed
standalone: use text instead of string
1 parent 1e796a3 commit a7ad6ed

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

standalone/src/db.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ const db = new Database(join(process.env.DATA_PATH || "./.data", "db.sqlite"));
1010

1111
db.query(
1212
`create table if not exists sessions (
13-
token string primary key not null,
13+
token text primary key not null,
1414
expires integer not null,
1515
created integer not null
1616
)`,
1717
).run();
1818

1919
db.query(
2020
`create table if not exists keys (
21-
siteKey string primary key not null,
22-
name string not null,
23-
secretHash string not null,
24-
config string not null,
21+
siteKey text primary key not null,
22+
name text not null,
23+
secretHash text not null,
24+
config text not null,
2525
created integer not null
2626
)`,
2727
).run();
@@ -37,28 +37,28 @@ db.query(
3737

3838
db.query(
3939
`create table if not exists challenges (
40-
siteKey string not null,
41-
token string not null,
42-
data string not null,
40+
siteKey text not null,
41+
token text not null,
42+
data text not null,
4343
expires integer not null,
4444
primary key (siteKey, token)
4545
)`,
4646
).run();
4747

4848
db.query(
4949
`create table if not exists tokens (
50-
siteKey string not null,
51-
token string not null,
50+
siteKey text not null,
51+
token text not null,
5252
expires integer not null,
5353
primary key (siteKey, token)
5454
)`,
5555
).run();
5656

5757
db.query(
5858
`create table if not exists api_keys (
59-
id string not null,
60-
name string not null,
61-
tokenHash string not null,
59+
id text not null,
60+
name text not null,
61+
tokenHash text not null,
6262
created integer not null,
6363
primary key (id, tokenHash)
6464
)`,

0 commit comments

Comments
 (0)