soynatan / django-easy-audit

Yet another Django audit log app, hopefully the simplest one.
GNU General Public License v3.0
735 stars 182 forks source link

Fix migrating db that isn't past squashed migration #304

Closed PaarthShah closed 1 month ago

PaarthShah commented 2 months ago

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 commented 2 months ago

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

jourdanrodrigues commented 2 months ago

There's a need to run poetry lock @PaarthShah

PaarthShah commented 2 months ago

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

PaarthShah commented 2 months ago

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

mschoettle commented 1 month ago

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 commented 1 month ago

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

PaarthShah commented 1 month ago

@jheld @mschoettle done