sequelize / sequelize-auto

Automatically generate bare sequelize models from your database.
2.88k stars 521 forks source link

Cannot generate model from existing PostgreSQL database #646

Open faisvsqrl opened 1 year ago

faisvsqrl commented 1 year ago

POSTGRESQL command failed to generate modals from existing database, then I have created another database in mysql and run MYSQL command which works fine and generated modals from existing mysql database.

POSTGRESQL : -npx sequelize-auto -o "./modals/postgres" -d birdsquirreldb -h localhost -u bird_squirreldb -p 5432 -x -e postgres MYSQL :-npx sequelize-auto -o "./modals/mysql" -d birdsquirreldb -h localhost -u root -p 3306 -x -e mysql

I got following response from POSTGRESQL command.

I done some wrong or is it issue in sequelize-auto with postgres.

Password: { spaces: true, indentation: 2, directory: '../temp_location', additional: {}, dialect: 'postgres', port: 5432, host: 'localhost', database: 'birdsquirreldb', storage: 'birdsquirreldb', tables: null, skipTables: null, skipFields: null, pkSuffixes: null, schema: undefined, lang: 'es5', caseModel: 'o', caseFile: 'o', caseProp: 'o', noAlias: false, noInitModels: false, noWrite: false, views: false, singularize: false, username: 'bird_squirreldb', useDefine: false, noIndexes: false }

Another quick update after the issue posted then I create new fresh database in postgres and run sequelize-auto command to generate models and it's working fine, now question is why sequelize-auto cannot show any of error when it's failed.