diff --git a/packages/nylas-core/models/account/syncback-request.js b/packages/nylas-core/models/account/syncback-request.js index 0e45643dd..5f1069344 100644 --- a/packages/nylas-core/models/account/syncback-request.js +++ b/packages/nylas-core/models/account/syncback-request.js @@ -1,7 +1,7 @@ const {typeJSON} = require('../model-helpers') module.exports = (sequelize, Sequelize) => { - const SyncbackRequest = sequelize.define('SyncbackRequest', { + const SyncbackRequest = sequelize.define('syncbackRequest', { type: Sequelize.STRING, status: { type: Sequelize.ENUM("NEW", "SUCCEEDED", "FAILED"), diff --git a/packages/nylas-core/models/account/thread-category.js b/packages/nylas-core/models/account/thread-category.js index 6d6c7a501..29d8f941a 100644 --- a/packages/nylas-core/models/account/thread-category.js +++ b/packages/nylas-core/models/account/thread-category.js @@ -1,5 +1,5 @@ module.exports = (sequelize, Sequelize) => { - const ThreadCategory = sequelize.define('ThreadCategory', { + const ThreadCategory = sequelize.define('threadCategory', { role: Sequelize.STRING, }); diff --git a/packages/nylas-core/models/account/transaction.js b/packages/nylas-core/models/account/transaction.js index 6726e72c2..044659b6d 100644 --- a/packages/nylas-core/models/account/transaction.js +++ b/packages/nylas-core/models/account/transaction.js @@ -1,5 +1,5 @@ module.exports = (sequelize, Sequelize) => { - const Transaction = sequelize.define('Transaction', { + const Transaction = sequelize.define('transaction', { type: Sequelize.STRING, objectId: Sequelize.STRING, modelName: Sequelize.STRING, diff --git a/packages/nylas-core/models/shared/account-token.js b/packages/nylas-core/models/shared/account-token.js index 1d3a002f4..8b5546350 100644 --- a/packages/nylas-core/models/shared/account-token.js +++ b/packages/nylas-core/models/shared/account-token.js @@ -1,5 +1,5 @@ module.exports = (sequelize, Sequelize) => { - const AccountToken = sequelize.define('AccountToken', { + const AccountToken = sequelize.define('accountToken', { value: { type: Sequelize.UUID, defaultValue: Sequelize.UUIDV4, diff --git a/packages/nylas-core/models/shared/account.js b/packages/nylas-core/models/shared/account.js index 999ad5452..abd019d85 100644 --- a/packages/nylas-core/models/shared/account.js +++ b/packages/nylas-core/models/shared/account.js @@ -4,7 +4,7 @@ const {JSONType} = require('../../database-types'); const {DB_ENCRYPTION_ALGORITHM, DB_ENCRYPTION_PASSWORD} = process.env; module.exports = (sequelize, Sequelize) => { - const Account = sequelize.define('Account', { + const Account = sequelize.define('account', { name: Sequelize.STRING, provider: Sequelize.STRING, emailAddress: Sequelize.STRING,