mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
ALTER TABLE with a foreign key constraint will _always_ add the constraint, which means we always require a table lock even if this migration has run. So we check if the column exists first. The motivation for this change was me noticing slow migrations against S2, even though it had been migrated already. This speeds it up since it avoids a bunch of locks. In testing I kept running into issues with the lsif_* tables. We agreed we will only migrate them later. Test Plan: ran against my local instance and S2 multiple times and CI. Also manually ran the down and up migration against dotcom |
||
|---|---|---|
| .. | ||
| 1000000033_squashed_migrations_privileged | ||
| 1000000034_squashed_migrations_unprivileged | ||
| 1665531314_remove_api_docs_tables | ||
| 1666727108_add_codeintel_last_reconcile_table | ||
| 1669075922_add_scip_tables | ||
| 1669842405_add_additional_metadata_fields | ||
| 1669934289_add_scip_document_schema_versions_table | ||
| 1670001463_add_missing_index_for_cascading_deletes | ||
| 1670363942_fix_scip_schema_version_triggers | ||
| 1670365552_fix_scip_document_schema_counting | ||
| 1670370058_process_unreferenced_documents | ||
| 1670881409_fix_scip_document_schema_counting_again | ||
| 1670940342_add_codeintel_scip_symbol_names_table | ||
| 1670967960_add_codeintel_scip_symbol_names_indexes | ||
| 1671059396_remove_duplicate_trigger | ||
| 1676423214_remove_lsif_data | ||
| 1678041507_cleanup_unused_functions | ||
| 1678898749_make_unreferenced_documents_index_usable | ||
| 1678899132_remove_unused_unreferenced_documents_index | ||
| 1679010276_add_missing_index | ||
| 1686315964_clean_out_schema_versions_tables | ||
| 1723117227_add_tenants_table | ||
| 1723127341_add_tenant_id_to_most_tables | ||
| BUILD.bazel | ||
| squashed.sql | ||