mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
Remove alter param from database sync
Re: [sequelize docs](https://sequelize.org/docs/v6/core-concepts/model-basics/#synchronization-in-production) Alter is a bad idea in production. Also print error message instead of sequelize error object as it's a bit verbose
This commit is contained in:
@@ -185,9 +185,9 @@ Subtitle.belongsTo(File, { foreignKey: 'fileId', constraints: false });
|
|||||||
|
|
||||||
export function connect() {
|
export function connect() {
|
||||||
if (databaseConfig.ENABLE_SYNC) {
|
if (databaseConfig.ENABLE_SYNC) {
|
||||||
return database.sync({ alter: true })
|
return database.sync()
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('Failed syncing database: ', error);
|
console.error('Failed syncing database: ', error.message);
|
||||||
throw error;
|
throw error;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user