Skip to content
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

Error during migration #50

Open
tsaoyu opened this issue Jul 25, 2019 · 2 comments
Open

Error during migration #50

tsaoyu opened this issue Jul 25, 2019 · 2 comments

Comments

@tsaoyu
Copy link
Member

tsaoyu commented Jul 25, 2019

@takluyver I saw some changes from last year in db/migration.

The migration file https://github.com/WRSC/tracking/blob/master/MYR_rails/db/migrate/201809122145_change_string_to_datetime.rb and https://github.com/WRSC/tracking/blob/master/MYR_rails/db/migrate/201809122251_change_coordinate_data_to_float.rb cause some error when I try to setup a server for this year's competition.

Could not find table 'coordinates'
/root/tracking/MYR_rails/db/migrate/201809122145_change_string_to_datetime.rb:3:in `up'
/root/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/root/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'

Caused by:
ActiveRecord::StatementInvalid: Could not find table 'coordinates'
/root/tracking/MYR_rails/db/migrate/201809122145_change_string_to_datetime.rb:3:in `up'
/root/.rbenv/versions/2.5.1/bin/bundle:23:in `load'
/root/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>'
Tasks: TOP => db:migrate

Do you still remember what those migrations do?

@takluyver
Copy link
Member

I think that is one I added, so sorry if I've broken something. I'm a bit unsure about the whole collection of migrations - I don't know that we need to keep them when we're creating a new database each year. But I'm not quite confident enough in that to delete them all. See #45.

@tsaoyu
Copy link
Member Author

tsaoyu commented Jul 31, 2019

No worries. I found that it is possible to load all migrations from the db/schema.rb and it works well so far. I suspect that this is due to some migrates have been saved. But in the worst case, I still have a copy of production database in hand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants