Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Remove force replace for the database tables
Browse files Browse the repository at this point in the history
  • Loading branch information
f4irline committed May 19, 2019
1 parent 634115b commit c862f70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/app/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const User = UserModel(sequelize, Sequelize);
Room.hasMany(Message, {as: 'messages'});
Message.belongsTo(Room, {foreignKey: 'roomId', as: 'room'});

sequelize.sync({force: true})
sequelize.sync()
.then(() => {
Room.findOrCreate({where: {roomName: 'General'}});
console.log('Database and tables created.');
Expand Down

0 comments on commit c862f70

Please sign in to comment.