Skip to content

Commit 6a283ac

Browse files
authored
Merge pull request rails#50228 from cedriccarrard/fix-50189-docs-mismatch-between-revert-code-example-and-subsequent-steps
Adjusted an example to align with the documentation section on reversing a previous migration.
2 parents 486bb99 + 992dbd7 commit 6a283ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

guides/source/active_record_migrations.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,10 @@ class DontUseDistributorsViewMigration < ActiveRecord::Migration[8.0]
854854
def change
855855
revert do
856856
# copy-pasted code from ExampleMigration
857+
create_table :distributors do |t|
858+
t.string :zipcode
859+
end
860+
857861
reversible do |direction|
858862
direction.up do
859863
# create a distributors view

0 commit comments

Comments
 (0)