Всем привет,
секвалайз не понимаю на что ругается, вроде всё верно, взгляните пожалуйста
migrations:
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('ukey', {
kkey: {
type: DataTypes.STRING,
allowNull: false
},
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable('ukey');
}
};
model:
const apikeyadd = sequelize.define('ukey', {
kkey: {
type: DataTypes.STRING,
allowNull: false
}
})
module.exports = apikeyadd;
env:
DB_NAME = "api"
DB_USER = ""
DB_PASSWORD = ""
DB_HOST = ""
Executing (default): SELECT 1+1 AS result
Executing (default): SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_NAME = 'ukeys' AND TABLE_SCHEMA = 'api'
Connection has been established successfully.
Executing (default): SHOW INDEX FROM `ukeys`