From 45e20b09b88f6622412061f8a312f90b3637eb9b Mon Sep 17 00:00:00 2001 From: John Craft Date: Thu, 14 Nov 2024 20:17:09 -0800 Subject: [PATCH] Standardize table names --- users-api/src/migrations/20230921200634-create-user.js | 4 ++-- users-api/src/models/user.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/users-api/src/migrations/20230921200634-create-user.js b/users-api/src/migrations/20230921200634-create-user.js index 0ec8dad..fb3d076 100644 --- a/users-api/src/migrations/20230921200634-create-user.js +++ b/users-api/src/migrations/20230921200634-create-user.js @@ -2,7 +2,7 @@ /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { - await queryInterface.createTable('Users', { + await queryInterface.createTable('users', { user_id: { allowNull: false, autoIncrement: true, @@ -47,6 +47,6 @@ module.exports = { }); }, async down(queryInterface, Sequelize) { - await queryInterface.dropTable('Users'); + await queryInterface.dropTable('users'); } }; \ No newline at end of file diff --git a/users-api/src/models/user.js b/users-api/src/models/user.js index 36c1b57..1167d7f 100644 --- a/users-api/src/models/user.js +++ b/users-api/src/models/user.js @@ -25,6 +25,7 @@ module.exports = (sequelize, DataTypes) => { }, { sequelize, modelName: 'User', + tableName: 'users' }); return User; }; \ No newline at end of file