9bac099339
This table stores email credentials for users using apps which use the email addon
19 lines
603 B
JavaScript
19 lines
603 B
JavaScript
'use strict';
|
|
|
|
exports.up = async function(db) {
|
|
const cmd = 'CREATE TABLE mailPasswords(' +
|
|
'appId VARCHAR(128) NOT NULL,' +
|
|
'userId VARCHAR(128) NOT NULL,' +
|
|
'password VARCHAR(1024) NOT NULL,' +
|
|
'creationTime TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,' +
|
|
'FOREIGN KEY(appId) REFERENCES apps(id),' +
|
|
'FOREIGN KEY(userId) REFERENCES users(id),' +
|
|
'PRIMARY KEY (appId, userId)) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin';
|
|
|
|
await db.runSql(cmd);
|
|
};
|
|
|
|
exports.down = async function(db) {
|
|
await db.runSql('DROP TABLE mailPasswords');
|
|
};
|