mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-28 05:44:01 +02:00
Merge branch 'dev' into user-management-and-resources
This commit is contained in:
commit
5278c4d6f2
29 changed files with 2109 additions and 76 deletions
|
@ -23,6 +23,25 @@ export default async function migration() {
|
|||
} catch (e) {
|
||||
console.log("Error adding passwordResetTokenExpiryHours column to orgs table:");
|
||||
console.log(e);
|
||||
db.exec(`
|
||||
CREATE TABLE IF NOT EXISTS securityKey (
|
||||
credentialId TEXT PRIMARY KEY,
|
||||
userId TEXT NOT NULL,
|
||||
publicKey TEXT NOT NULL,
|
||||
signCount INTEGER NOT NULL,
|
||||
transports TEXT,
|
||||
name TEXT,
|
||||
lastUsed TEXT NOT NULL,
|
||||
dateCreated TEXT NOT NULL,
|
||||
FOREIGN KEY (userId) REFERENCES user(id) ON DELETE CASCADE
|
||||
);
|
||||
`);
|
||||
})(); // executes the transaction immediately
|
||||
db.pragma("foreign_keys = ON");
|
||||
console.log(`Created securityKey table`);
|
||||
} catch (e) {
|
||||
console.error("Unable to create securityKey table");
|
||||
console.error(e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue