Ash FrameworkAF
Ash Framework7mo ago
67 replies
Ev

Rollback went further than expected

Did I do this incorrectly? I ran mix ash.rollback -r Ngen.Repo and answered the prompt but it rolled much further back than I expected.

How many migrations should be rolled back? (default: 0)

Last 20 migration names, with the input you must provide to
rollback up to *and including* that migration:

1: /20250714010938_add_urls.exs
2: /20250714005740_add_sitemaps.exs
3: /20250713221021_initialize_extensions_1.exs
4: /20250707191126_pdp_add_rating.exs
5: /20250707184451_pdp_add_tags.exs
6: /20250621021828_add_source_id_to_embeddings.exs
7: /20250615215955_create_api_key_metadata.exs
8: /20250611064155_add_merchant_url_to_search_mapping.exs
...ommitting for brevity
20: /20250516072230_rename_raw_data.exs

Rollback to: 3 <--- I answered this


I thought it would roll back to 3:
3: /20250713221021_initialize_extensions_1.exs

But it rolled all the way back to (but not including):
7: /20250615215955_create_api_key_metadata.exs

Was I supposed to specify the full migration filename? I'm confused what the connection is between my answer of 3 and the migration it rolled back to. Can/should I use mix ecto.rollback directly in the future?
Was this page helpful?