Closed m2sillanpaa closed 4 years ago
Same problem :/
Still no fix on this? I'm also running into the same issue
Running into this issue as well. Migration runs fine but no tables seem to actually be created. :-( It took me a while to even notice this was happening because sync() was fixing things.
Apparently my database wasn't connecting in development using the "use_env_variable" method. However, I wasn't receiving any errors.
Using this method...
development: {
username: null,
password: null,
database: DATABASE_NAME,
host: HOST,
dialect: "postgres"
}
fixed the issue. Migrations are running fine now.
Check out this StackOverflow post, especially the comment made by 'a_horse_with_no_name': https://stackoverflow.com/questions/47288265/sequelizer-generated-postgres-tables-cannot-be-accessed
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
What you are doing?
I'm having problems creating models with sequelizer. Or more accurately I can create models and migrate them, but I cannot access, modify or delete them via psql.
I'm creating the model like this:
sequelize model:generate --name Device --attributes pid:string ip:string
output:
migrating like this:
after this I can see the tables in pqsl.
my user credentials (using it as matti):
I'm working in Ubuntu 16.04.
I've reverted the migration and dropped the db just to be certain. But it didn't have any effect. Nor did restarting the postgres.
I can create, list and delete the db:ses as user "matti" from psql. But not the ones generated by the sequelizer.
migration file:
What do you expect to happen?
Working tables.
What is actually happening?
used versions: Sequelize: Sequelize CLI [Node: 4.6.1, CLI: 3.0.0, ORM: 4.22.6] postgres: psql (PostgreSQL) 10.1 nodejs: v4.6.1 npm: 2.15.9