mirror of https://github.com/zulip/zulip.git
migrations: Squash zerver migrations.
This has the impact of making rebuilding the database in a Zulip development environment, or initializing a new production database, dramatically faster. This was generated by merging the output of `manage.py makemigrations` with an empty migration. Tested using `tools/rebuild-test-database` before and after this change, and comparing the output of `pg_dump -d zulip_test` using Git's diff comparison algorithm. Differences in that SQL dump include: - The actual generated table contents, due to timestamps and the like; this is expected and unrelated to schema. - Orders of fields within tables, which is not significant in SQL. - IDs assigned to tables in the ContentType table, which is expected and not a problem with how that Django table is designed. - Names of generated indexes and constraints; modern Django seems to abbreviate long names differently for these, and it's not obviously possible to configure those used by the `db_index` property. If necessarily, likely this can be converged via a migration filled with `IF EXISTS` rename operations like the one done in zerver/migrations/0246_message_date_sent_finalize_part2.py. - Names of the ~3 sequences related to renamed tables: usertopic/mutedtopic, botconfigdata/botuserconfigdata, realmdomain/realmalias. Probably there's no action required here, but we could do rename operations if desired.
This commit is contained in:
parent
029ceb2a48
commit
f4d98b03d5
|
@ -72,6 +72,7 @@ rules:
|
|||
include:
|
||||
- "**/migrations"
|
||||
exclude:
|
||||
- zerver/migrations/0001_squashed_0569.py
|
||||
- zerver/migrations/0032_verify_all_medium_avatar_images.py
|
||||
- zerver/migrations/0104_fix_unreads.py
|
||||
- zerver/migrations/0206_stream_rendered_description.py
|
||||
|
@ -93,6 +94,7 @@ rules:
|
|||
exclude:
|
||||
- analytics/migrations/0008_add_count_indexes.py
|
||||
- zerver/migrations/0001_initial.py
|
||||
- zerver/migrations/0001_squashed_0569.py
|
||||
- zerver/migrations/0082_index_starred_user_messages.py
|
||||
- zerver/migrations/0083_index_mentioned_user_messages.py
|
||||
- zerver/migrations/0095_index_unread_user_messages.py
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue