@@ -627,17 +627,6 @@ The `up` and `down` options available when creating tables, adding columns and r
627627_Example: move `email` column from `users` to `profiles` table_
628628
629629```toml
630−[[actions]]
631−type = "remove_column"
632−table = "users"
633−column = "email"
634−
635− # When `profiles` is changed in the new schema, we write the email address back to the removed column
636− [actions.down]
637− table = "profiles"
638− value = "profiles.email"
639− where = "users.id = profiles.user_id"
640−
641630[[actions]]
642631type = "add_column"
643632table = "profiles"
@@ -652,6 +641,17 @@ table = "profiles"
652641 table = "users"
653642 value = "users.email"
654643 where = "profiles.user_id = users.id"
644+
645+[[actions]]
646+type = "remove_column"
647+table = "users"
648+column = "email"
649+
650+ # When `profiles` is changed in the new schema, we write the email address back to the removed column
651+ [actions.down]
652+ table = "profiles"
653+ value = "profiles.email"
654+ where = "users.id = profiles.user_id"
655655```
656656
657657_Example: turn a 1:N relationship between `users` and `accounts` into N:M and change the format of the associated `role`_