Skip to content
New issue

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

fix: codegen generating migrations that apply backwards #952

Merged
merged 5 commits into from
Nov 9, 2024

Conversation

ABruel
Copy link
Contributor

@ABruel ABruel commented Nov 2, 2024

Fixes #949

BREAKING CHANGE: requires inject comment in migration/src/lib.rs to now be inject-above (and be moved to be after last item)

BREAKING CHANGE: requires inject comment in `migration/src/lib.rs` to now be `inject-above`
@ABruel
Copy link
Contributor Author

ABruel commented Nov 2, 2024

I didn't know if I should change CHANGELOG.md#39 since 0.12 is already out.

@ABruel ABruel mentioned this pull request Nov 3, 2024
@jondot jondot added this to the 0.13.0 milestone Nov 9, 2024
@jondot
Copy link
Contributor

jondot commented Nov 9, 2024

Looks good. I put back the "below" comment, so that older version of gen will still work against starters (which are always pointing to master).
In v0.1.4.0 we're radically changing how starters are created, so that generators and starters are going to be coupled + we're going to have an amazing "new app" generator subsystem that will allow for any kind of app to be generated (using rhai scripts)
sneak preview: https://github.com/loco-rs/loco/blob/new-loco-cli-generator/loco-new/setup.rhai

@jondot jondot merged commit 52cf0b6 into loco-rs:master Nov 9, 2024
22 checks passed
jondot added a commit that referenced this pull request Nov 9, 2024
* fix: codegen generating migrations that apply backwards

BREAKING CHANGE: requires inject comment in `migration/src/lib.rs` to now be `inject-above`

* Update lib.rs to be nonbreaking


---------

Co-authored-by: Elad Kaplan <[email protected]>
Co-authored-by: Dotan J. Nahum <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't scaffold references. Migrations applied in the wrong order.
3 participants