-
Notifications
You must be signed in to change notification settings - Fork 437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix postgres issue when updating #584
Conversation
Postgres could not be used in 12. It installed the tables with wrong names so we need to ignore it on the update steps. The wrong tables will be dropped and new tables will be created with further migrations. But we shouldn't try to migrate data from the old and broken layout. Signed-off-by: Joas Schilling <coding@schilljs.com>
Actually it's not postgres having the problem, but migrations. Postgres allows camelCased columns, but they need to be quoted. They were quoted from the old database.xml file but this does not work anymore in migrations. But that means it worked on postgres in the past, it just didn't work in 2.9~ to install since migrations where merged. So we are reverting the check for postgres and only allow updating from 2.0.0 or later. This makes sure that when newly installing the migration code is not run. Signed-off-by: Joas Schilling <coding@schilljs.com>
So this means that old DB enteries will be purged? I'd like an as clean DB as possible. |
The issue is that migrations always generate lowercase columns only. So all columns that were created with database.xml are okay and cC. But all intermediate columns the migrations create need to be referenced as lowercase columns in the queries. In the future we won't have this problem anymore because we switched to under_score column names for 3.0 Signed-off-by: Joas Schilling <coding@schilljs.com>
Actually its a bit different:
@enoch85 I have no idea what you are talking about
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works 👍
Nvm, I'm glad it wasn't a PostgreSQL issue. |
Postgres could not be used in 12. It installed the tables with wrong namesso we need to ignore it on the update steps. The wrong tables will be
dropped and new tables will be created with further migrations.
But we shouldn't try to migrate data from the old and broken layout.
Fix #578
Fix #543