Skip to content

[dammi] Remove mig tables#3641

Merged
hjanott merged 46 commits into
OpenSlides:feature/dammifrom
hjanott:remove_mig_tables
Jul 10, 2026
Merged

[dammi] Remove mig tables#3641
hjanott merged 46 commits into
OpenSlides:feature/dammifrom
hjanott:remove_mig_tables

Conversation

@hjanott

@hjanott hjanott commented Jun 26, 2026

Copy link
Copy Markdown
Member

This aims at improving the test setup and applying the already sql diff from file.
It removes the migration tables, the finalize command and unused migration states.
Instead it applies the schema diff and operates on the tables directly using only one transaction.
It slims down the replace tables to basically only the collection names.
It changes the directory structure and file naming convention for the migrations.
Decouples the migration and migration route test cases again as the route test cases do not need a reset of the schema and it would lead to other unwanted side effects. Thus we are generating some code redundancy.
There is still one error in test_play_with_migrations which is intended as the test_migration will get removed again.

@hjanott hjanott requested a review from luisa-beerboom June 26, 2026 15:01
@hjanott hjanott self-assigned this Jun 26, 2026
hjanott added 8 commits June 26, 2026 20:55
 * cleanup get_stats/count method
 * improve exception stats output
 * handle listdir patching in migrate_previous
…diff

 * return optional cleanup
 * improve and fix test mig 100 and base test class
 * fix mig 101
 * more cleanups
 * decuple BaseMigration and BaseMigrationRouteTestCase
 * remove finalize commands
 * fix migration route tests
@hjanott hjanott changed the title Remove mig tables [dammi] Remove mig tables Jul 3, 2026
hjanott added 2 commits July 3, 2026 15:05
 * delete unwanted comments
 * use only empty values within replace tables
 * catch only first Exception
 * various improvements from PR 3548
@hjanott hjanott force-pushed the remove_mig_tables branch from 7675730 to 398d5d4 Compare July 8, 2026 14:33
@hjanott hjanott force-pushed the remove_mig_tables branch from 398d5d4 to 0e6dd96 Compare July 8, 2026 15:01
@hjanott hjanott assigned luisa-beerboom and unassigned hjanott Jul 8, 2026
Comment thread openslides_backend/migrations/migration_handler.py
MigrationHelper.migrate_thread_stream_can_be_closed = False
MigrationHelper.migrate_thread_exception = None

def finalize(self) -> None:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging this into #3643 is going to be fuuuuun (x_x)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry.

Comment thread openslides_backend/migrations/migration_helper.py Outdated
Comment thread openslides_backend/migrations/migration_helper.py Outdated
Comment thread openslides_backend/services/postgresql/create_schema.py
Comment thread openslides_backend/services/postgresql/utils.py Outdated
Comment thread tests/system/migrations/base_migration_test.py Outdated
Comment thread tests/system/migrations/base_migration_test.py Outdated
Comment thread tests/conftest.py
@hjanott hjanott assigned luisa-beerboom and unassigned hjanott Jul 10, 2026
@hjanott hjanott requested a review from luisa-beerboom July 10, 2026 05:15
@hjanott hjanott merged commit f20c8b7 into OpenSlides:feature/dammi Jul 10, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants