Page MenuHomePhabricator

D5663.diff
No OneTemporary

D5663.diff

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

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)

Event Timeline