mirror of
https://github.com/aljazceru/mcp-code.git
synced 2025-12-17 12:45:28 +01:00
22 lines
528 B
TypeScript
22 lines
528 B
TypeScript
import type { Database } from "bun:sqlite";
|
|
|
|
export const up = async (db: Database) => {
|
|
db.run(`
|
|
CREATE TABLE IF NOT EXISTS wot (
|
|
follower TEXT NOT NULL,
|
|
followed TEXT NOT NULL,
|
|
PRIMARY KEY (follower, followed)
|
|
)
|
|
`);
|
|
|
|
// Create index for faster lookup by followed pubkey
|
|
db.run(`
|
|
CREATE INDEX IF NOT EXISTS idx_wot_followed
|
|
ON wot (followed)
|
|
`);
|
|
};
|
|
|
|
export const down = async (db: Database) => {
|
|
db.run("DROP TABLE IF EXISTS wot");
|
|
};
|