We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, there. ridgepole is nice gem. Thank you for your publishing ;)
I encountered strange behavior. Is this correct behaviour??
# -*- mode: ruby -*- # vi: set ft=ruby : create_table :users, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", id: false do |t| t.bigint :my_original_id, null: false t.index %i[my_original_id], unique: true end create_table :lessons, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t| t.bigint :user_id, null: false t.index %i[user_id], name: :index_lessons_on_user_id end add_foreign_key :lessons, :users, primary_key: :my_original_id
https://github.com/mrdShinse/ridgepole/blob/0.7_test_foreign_key/Schemafile#L13
shinse@edo:~/go/src/github.com/mrdShinse/ridgepole (0.7_test_foreign_key) $ bundle exec ridgepole -c ./config.yml -a Apply `Schemafile` -- create_table("users", {:options=>"ENGINE=InnoDB DEFAULT CHARSET=utf8", :id=>false}) -> 0.0098s -- add_index("users", ["my_original_id"], {:unique=>true}) -> 0.0233s -- create_table("lessons", {:options=>"ENGINE=InnoDB DEFAULT CHARSET=utf8"}) -> 0.0152s -- add_index("lessons", ["user_id"], {:name=>"index_lessons_on_user_id"}) -> 0.0288s -- add_foreign_key("lessons", "users", {:primary_key=>:my_original_id}) -> 0.0325s shinse@edo:~/go/src/github.com/mrdShinse/ridgepole (0.7_test_foreign_key) $ bundle exec ridgepole -c ./config.yml -a Apply `Schemafile` -- remove_foreign_key("lessons", "users") -> 0.0271s -- add_foreign_key("lessons", "users", {:primary_key=>:my_original_id}) -> 0.0257s
Result should be Idempotent, I think. But ridgepole always remove&create foreign_key.
I don't know well about how to implement this feature. Can triage this issue??
The text was updated successfully, but these errors were encountered:
Thank you for your report 😃 I fixed it. Please try v0.7.4.
Sorry, something went wrong.
No branches or pull requests
Hi, there. ridgepole is nice gem. Thank you for your publishing ;)
I encountered strange behavior.
Is this correct behaviour??
Schemafile
https://github.com/mrdShinse/ridgepole/blob/0.7_test_foreign_key/Schemafile#L13
Result
my opinion
Result should be Idempotent, I think.
But ridgepole always remove&create foreign_key.
I don't know well about how to implement this feature.
Can triage this issue??
The text was updated successfully, but these errors were encountered: