Page MenuHomePhabricator

D7984.id27069.diff
No OneTemporary

D7984.id27069.diff

diff --git a/web/database/queries/db-queries.js b/web/database/queries/db-queries.js
--- a/web/database/queries/db-queries.js
+++ b/web/database/queries/db-queries.js
@@ -38,6 +38,11 @@
key TEXT UNIQUE PRIMARY KEY NOT NULL,
item TEXT NOT NULL
);
+
+ CREATE TABLE IF NOT EXISTS reports (
+ id TEXT UNIQUE PRIMARY KEY NOT NULL,
+ report TEXT NOT NULL
+ );
`);
const migrationKeys = migrations.size ? migrations.keys() : [0];
const newDatabaseVersion = Math.max(...migrationKeys);
diff --git a/web/database/utils/migrations.js b/web/database/utils/migrations.js
--- a/web/database/utils/migrations.js
+++ b/web/database/utils/migrations.js
@@ -2,7 +2,16 @@
import type { SqliteDatabase } from 'sql.js';
+import { createReportTable } from '../queries/report-queries.js';
+
const migrations: $ReadOnlyMap<number, (sqliteDb: SqliteDatabase) => void> =
- new Map([]);
+ new Map([
+ [
+ 1,
+ (sqliteDb: SqliteDatabase) => {
+ createReportTable(sqliteDb);
+ },
+ ],
+ ]);
export { migrations };

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 8:40 AM (19 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2693366
Default Alt Text
D7984.id27069.diff (1 KB)

Event Timeline