mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove needless change_table
These are using `remove_column` directly, not used `t` in `change_table`.
This commit is contained in:
parent
cda7e63abc
commit
3ddb811acc
1 changed files with 2 additions and 6 deletions
|
@ -372,9 +372,7 @@ module ActiveRecord
|
|||
code = "214fe0c2-dd47-46df-b53b-66090b3c1d40"
|
||||
Barcode.create!(code: code, other_attr: "xxx")
|
||||
|
||||
connection.change_table "barcodes" do |t|
|
||||
connection.remove_column("barcodes", "other_attr")
|
||||
end
|
||||
connection.remove_column("barcodes", "other_attr")
|
||||
|
||||
assert_equal code, Barcode.first.id
|
||||
ensure
|
||||
|
@ -392,9 +390,7 @@ module ActiveRecord
|
|||
code = "214fe0c2-dd47-46df-b53b-66090b3c1d40"
|
||||
Barcode.create!(region: region, code: code, other_attr: "xxx")
|
||||
|
||||
connection.change_table "barcodes" do |t|
|
||||
connection.remove_column("barcodes", "other_attr")
|
||||
end
|
||||
connection.remove_column("barcodes", "other_attr")
|
||||
|
||||
assert_equal ["region", "code"], connection.primary_keys("barcodes")
|
||||
|
||||
|
|
Loading…
Reference in a new issue