Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3515378
D7984.id27069.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D7984.id27069.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D7984: [web-db] add report table on web
Attached
Detach File
Event Timeline
Log In to Comment