quintel / etmoses

Online decision support tool to create local energy situations for neighbourhoods, cities and regions with a time resolution of 15 minutes created and maintained by Quintel – Not maintained
https://moses.energytransitionmodel.com
MIT License
11 stars 3 forks source link

Not able to run migrations regarding changes in Topologies/Market Models in serie #1518

Closed grdw closed 7 years ago

grdw commented 7 years ago

For #1515 I updated the migrations to run in a single go. However they don't (it works in 2 goes, but it works). Appearantly after I remove x-columns from the topologies table and try to create a unique topology per LES, Mysql tries to store columns to the database which no longer exist.

Is this because the Topology.find_by_id still finds the old records from cache?

Do you know what this might be?

After this migration fails, I run rake db:migrate again and all is well.

antw commented 7 years ago

Appearantly after I remove x-columns from the topologies table and try to create a unique topology per LES, Mysql tries to store columns to the database which no longer exist.

After making the changes to the table structure, try running Topology.reset_column_information.

grdw commented 7 years ago

Yes that was it 👍 thanks!