Skip to content Skip to sidebar Skip to footer

Sequelizedatabaseerror: Sqlite_error: No Such Table: Users

I'm using Sequelize with sqlite and when i try to insert data to the table gives me the error Executing (default): INSERT INTO `Users` (`id`,`username`,`password`,`createdAt`,`upda

Solution 1:

its probably late to answer but i just found solution

this problem occurred to me because I have made changes to database.

so you have to drop the table first and recreate it.

sequelize
  .sync()
  .then(() => {
     //something here
  })
  .catch((e) =>console.log(e));


we use above code to create the database you just have to drop table as below


sequelize
  .sync()
  .then(() => {
     //something herereturn sequelize.drop();
  })
  .catch((e) =>console.log(e));

Post a Comment for "Sequelizedatabaseerror: Sqlite_error: No Such Table: Users"