rubyforgood / ghgvc

Ecosystem Climate Regulation Services Calculator
http://www.ecosystemservicescalc.org
Other
4 stars 3 forks source link

The Great Schema Migration Rollup #55

Closed robbkidd closed 7 years ago

robbkidd commented 7 years ago

Fixes the issue where past migrations fail because ActiveRecord models have changed their interfaces over the years.

Moved the current schema table and index declarations into a single migration with a schema version number equal to the last actual migration.

A db:migrate of this single migration will generate an equivalent schema.rb, but the "new" schema.rb will have syntax differences because of the newer version of Rails. The "new" schema.rb is currently included in this PR as a separate commit so it can be easily omitted if that is desired.

For example, I am uncertain of the future impact of including options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" in the schema, e.g. how well supported that is for older MySQLs or whether it's ignored for other databases.

robbkidd commented 7 years ago

Merging since the test failures are at least new failures that are past the DB migration and into the wiring of Capybara, Selenium, and Chrome.