summaryrefslogtreecommitdiff
path: root/src/routers/vault/models/vault/migration_log.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/routers/vault/models/vault/migration_log.js')
-rw-r--r--src/routers/vault/models/vault/migration_log.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/routers/vault/models/vault/migration_log.js b/src/routers/vault/models/vault/migration_log.js
new file mode 100644
index 0000000..5b2e651
--- /dev/null
+++ b/src/routers/vault/models/vault/migration_log.js
@@ -0,0 +1,35 @@
+const Sequelize = require("sequelize"); // from npm registry
+
+module.exports = {
+ fields: {
+ legacyId: {
+ type: Sequelize.INTEGER.UNSIGNED,
+ primaryKey: true,
+ allowNull: false,
+ },
+ accountId: {
+ type: Sequelize.INTEGER.UNSIGNED,
+ allowNull: false,
+ },
+ vaultId: {
+ type: Sequelize.INTEGER.UNSIGNED,
+ allowNull: false,
+ },
+ ip: {
+ type: "VARBINARY(16)",
+ allowNull: false,
+ },
+ date: {
+ type: Sequelize.DATE,
+ allowNull: false,
+ defaultValue: Sequelize.NOW,
+ },
+ },
+ options: {
+ indexes: [
+ { fields: ["vault_id"] },
+ { fields: ["account_id"] },
+ { fields: ["ip"] },
+ ]
+ }
+};