Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3489456
D5663.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
871 B
Referenced Files
None
Subscribers
None
D5663.diff
View Options
diff --git a/keyserver/src/database/migration-config.js b/keyserver/src/database/migration-config.js
--- a/keyserver/src/database/migration-config.js
+++ b/keyserver/src/database/migration-config.js
@@ -2,6 +2,8 @@
import fs from 'fs';
+import { policyTypes } from 'lib/facts/policies.js';
+
import { dbQuery, SQL } from '../database/database';
import { updateRolesAndPermissionsForAllThreads } from '../updaters/thread-permission-updaters';
@@ -103,6 +105,18 @@
`);
},
],
+ [
+ 11,
+ async () => {
+ const time = Date.now();
+ await dbQuery(SQL`
+ INSERT IGNORE INTO policy_acknowledgments (policy, user, date,
+ confirmed)
+ SELECT ${policyTypes.tosAndPrivacyPolicy}, id, ${time}, 1
+ FROM users
+ `);
+ },
+ ],
]);
const newDatabaseVersion: number = Math.max(...migrations.keys());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 12:42 PM (21 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677343
Default Alt Text
D5663.diff (871 B)
Attached To
Mode
D5663: [keyserver] add migration to populate `policy_acknowledgments` table
Attached
Detach File
Event Timeline
Log In to Comment