feat: init db
This commit is contained in:
15
src/migrations/init.ts
Normal file
15
src/migrations/init.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { db } from "../data/db"
|
||||
|
||||
db.execute(`
|
||||
CREATE TABLE IF NOT EXISTS note (
|
||||
title TEXT NOT NULL,
|
||||
content TEXT NOT NULL,
|
||||
publishedAt DATETIME,
|
||||
createdAt DATETIME NOT NULL,
|
||||
did TEXT NOT NULL,
|
||||
rkey TEXT NOT NULL,
|
||||
PRIMARY KEY (did, rkey)
|
||||
);
|
||||
`);
|
||||
|
||||
db.close();
|
||||
Reference in New Issue
Block a user