mirror of https://github.com/zulip/zulip.git
50c3dd88e6
Migrate all `ids` of anything which does not have a foreign key from the Message or UserMessage table (and would thus require walking those) to be `bigint`. This is done by removing explicit `BigAutoField`s, trading them for explicit `AutoField`s on the tables to not be migrated, while updating `DEFAULT_AUTO_FIELD` to the new default. In general, the tables adjusted in this commit are small tables -- at least compared to Messages and UserMessages. Many-to-many tables without their own model class are adjusted by a custom Operation, since they do not automatically pick up migrations when `DEFAULT_AUTO_FIELD` changes[^1]. Note that this does multiple scans over tables to update foreign keys[^2]. Large installs may wish to hand-optimize this using the output of `./manage.py sqlmigrate` to join multiple `ALTER TABLE` statements into one, to speed up the migration. This is unfortunately not possible to do generically, as constraint names may differ between installations. This leaves the following primary keys as non-`bigint`: - `auth_group.id` - `auth_group_permissions.id` - `auth_permission.id` - `django_content_type.id` - `django_migrations.id` - `otp_static_staticdevice.id` - `otp_static_statictoken.id` - `otp_totp_totpdevice.id` - `two_factor_phonedevice.id` - `zerver_archivedmessage.id` - `zerver_client.id` - `zerver_message.id` - `zerver_realm.id` - `zerver_recipient.id` - `zerver_userprofile.id` [^1]: https://code.djangoproject.com/ticket/32674 [^2]: https://code.djangoproject.com/ticket/24203 |
||
---|---|---|
.. | ||
ci | ||
documentation_crawler | ||
droplets | ||
i18n | ||
lib | ||
linter_lib | ||
node_lib | ||
oneclickapps | ||
screenshots | ||
setup | ||
test-install | ||
tests | ||
zulip-export | ||
README.md | ||
__init__.py | ||
backport-pull-request | ||
build-docs | ||
build-release-tarball | ||
cache-zulip-git-version | ||
check-capitalization | ||
check-frontend-i18n | ||
check-issue-labels | ||
check-openapi | ||
check-provision | ||
check-schemas | ||
check-templates | ||
check-thirdparty | ||
clean-branches | ||
commit-message-lint | ||
commit-msg | ||
conf.ini-template | ||
coveragerc | ||
deploy-branch | ||
diagnose | ||
documentation.vnufilter | ||
duplicate_commits.json | ||
fetch-contributor-data | ||
fetch-pull-request | ||
fetch-rebase-pull-request | ||
find-unused-css | ||
lint | ||
pre-commit | ||
provision | ||
push-to-pull-request | ||
rebuild-dev-database | ||
rebuild-test-database | ||
release | ||
release-tarball-exclude.txt | ||
renumber-migrations | ||
reset-to-pull-request | ||
review | ||
run-codespell | ||
run-dev | ||
run-mypy | ||
run-tsc | ||
semgrep-py.yml | ||
setup-git-repo | ||
show-profile-results | ||
stop-run-dev | ||
tail-ses | ||
test-all | ||
test-api | ||
test-backend | ||
test-documentation | ||
test-help-documentation | ||
test-js-with-node | ||
test-js-with-puppeteer | ||
test-locked-requirements | ||
test-migrations | ||
test-queue-worker-reload | ||
test-run-dev | ||
test-tools | ||
total-contributions | ||
update-locked-requirements | ||
update-prod-static | ||
update-zuliprc-api-field | ||
upload-release | ||
webpack | ||
zanitizer | ||
zanitizer_config.pm.sample |
README.md
This directory contains scripts that are used in building, managing,
testing, and other forms of work in a Zulip development environment.
Note that tools that are also useful in production belong in
scripts/
or should be Django management commands.
For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.