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 migrating db that isn't past squashed migration #304

Merged
merged 3 commits into from
Sep 15, 2024

Conversation

PaarthShah
Copy link
Contributor

@PaarthShah PaarthShah commented Aug 20, 2024

Retroactively changing the migration is the only way for this to work: it's a safe operation on its own because:

  1. The migration has already been run
  2. the operation itself is identical (it was copied from the squashed migration)
  3. for a fresh migration, only the squashed version is run anyway

Fixes #303

Migration state after:

easyaudit                                                                                                                                                                        
 [X] 0001_initial                                                                                                                                                                
 [X] 0002_auto_20170125_0759                                                                                                                                                     
 [X] 0003_auto_20170228_1505                                                                                                                                                     
 [X] 0004_auto_20170620_1354_squashed_0019_alter_crudevent_changed_fields_and_more (16 squashed migrations)

@jourdanrodrigues
Copy link

My approval doesn't mean anything, sadly. 😬 Hope the maintainers show up soon enough.

@jourdanrodrigues
Copy link

There's a need to run poetry lock @PaarthShah

@PaarthShah
Copy link
Contributor Author

@jourdanrodrigues I'll get to that asap when I'm back at my computer

@PaarthShah
Copy link
Contributor Author

@jourdanrodrigues poetry lock ran, pushed changes without self-reviewing.

@mschoettle
Copy link
Contributor

Could you bring your branch up to date with master? The lock file is updated and CI now runs with all supported combinations of Python and Django.

Ultimately, it is up to @jheld as the (sole?) maintainer to decide which approach to take (as discussed in #301).

@jheld
Copy link
Collaborator

jheld commented Sep 13, 2024

@PaarthShah seems we need another rebase to get rid of the conflicts

@PaarthShah
Copy link
Contributor Author

@jheld @mschoettle done

@jheld jheld merged commit 7ae8591 into soynatan:master Sep 15, 2024
11 checks passed
@PaarthShah PaarthShah deleted the fix-existing-migration branch October 28, 2024 06:01
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.

1.3.7b3 migration fails if only partially migrated
5 participants