-
Notifications
You must be signed in to change notification settings - Fork 8
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
1190 restructure migrations #1195
Conversation
`20140915123503_move_to_has_and_belongs_to_many_for_ontologies_tasks` has been split into two files: `20140915123503_move_to_has_and_belongs_to_many_for_ontologies_tasks`, `20140915123504_move_to_has_and_belongs_to_many_for_ontologies_tasks_end` because its data migration needs to be executed between two schema migrations.
@@ -0,0 +1,871 @@ | |||
class InitSchema < ActiveRecord::Migration |
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.
Metrics/ClassLength: Class definition is too long. [732/100]
Sorry Hound, I ignore your comments on the 20140615175553_init_schema.rb because that file is mostly generated. |
e5fcb16
to
b4f37eb
Compare
test this please |
raise 'Can not revert initial migration' | ||
end | ||
|
||
def up |
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.
Assignment Branch Condition size for up is too high. [576/15]
👍 |
This shall fix #1190.
As for this pull request, the data migrations can be executed with
rake data:migrate
. This is a synchronous job. It can be executed asynchronously in two ways:nohup rake data:migrate &
. Then the job continues its work even if the ssh connection is closed. Its output is written into a file callednohup.out
.rake data:migrate:async
which creates a Sidekiq job that runsrake data:migrate
. Interestingly, on my machine, the job is not added to thedefault
queue, but to the queue with the empty name and stay "Enqueued". I can't explain why this happens. Your ideas are welcome :)For future coding: Other than schema migrations, data migrations are supposed to be changed whenever the code they depend on changes.