diff --git a/src/database.js b/src/database.js index a7f0727..addd67f 100644 --- a/src/database.js +++ b/src/database.js @@ -12,7 +12,9 @@ const sequelize = new Sequelize({ password: process.env.POSTGRES_PASSWORD, define: { timestamps: false, - freezeTableName: true + freezeTableName: true, + underscored: true, + quoteIdentifiers: false }, }); diff --git a/src/models/AppInvite.js b/src/models/AppInvite.js index 846a9ba..72a15fd 100644 --- a/src/models/AppInvite.js +++ b/src/models/AppInvite.js @@ -15,7 +15,9 @@ const AppInvite = sequelize.define('AppInvite', { created_at: { type: DataTypes.DATE, allowNull: false - }, + } +}, { + tableName: 'app_invite' }); module.exports = AppInvite; \ No newline at end of file diff --git a/src/models/Session.js b/src/models/Session.js index d94b217..136cabd 100644 --- a/src/models/Session.js +++ b/src/models/Session.js @@ -11,7 +11,9 @@ const Session = sequelize.define('Session', { created_at: { type: DataTypes.DATE, allowNull: false - }, + } +}, { + tableName: 'session' }); module.exports = Session; \ No newline at end of file diff --git a/src/models/SessionNpubbed.js b/src/models/SessionNpubbed.js index 4ac65f1..2d51d13 100644 --- a/src/models/SessionNpubbed.js +++ b/src/models/SessionNpubbed.js @@ -19,7 +19,9 @@ const SessionNpubbed = sequelize.define('SessionNpubbed', { created_at: { type: DataTypes.DATE, allowNull: false - }, + } +}, { + tableName: 'session_npubbed' }); module.exports = SessionNpubbed; \ No newline at end of file