diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-30 12:09:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-30 12:09:53 +0300 |
commit | 915a5b6e89195aab5d7eb0deb16e4825cfce509e (patch) | |
tree | e54f4a19516ac2418a7830340194b26bcafcbae2 /db | |
parent | c2bfdff5d32c238ccc90b1c688b0a14479b3737e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb | 15 | ||||
-rw-r--r-- | db/post_migrate/20211027043229_track_ci_build_deletions.rb | 15 | ||||
-rw-r--r-- | db/schema_migrations/20211027043206 | 1 | ||||
-rw-r--r-- | db/schema_migrations/20211027043229 | 1 | ||||
-rw-r--r-- | db/structure.sql | 4 |
5 files changed, 36 insertions, 0 deletions
diff --git a/db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb b/db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb new file mode 100644 index 00000000000..3836159c2cd --- /dev/null +++ b/db/post_migrate/20211027043206_track_ci_pipeline_deletions.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class TrackCiPipelineDeletions < Gitlab::Database::Migration[1.0] + include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers + + enable_lock_retries! + + def up + track_record_deletions(:ci_pipelines) + end + + def down + untrack_record_deletions(:ci_pipelines) + end +end diff --git a/db/post_migrate/20211027043229_track_ci_build_deletions.rb b/db/post_migrate/20211027043229_track_ci_build_deletions.rb new file mode 100644 index 00000000000..b76d5f3261c --- /dev/null +++ b/db/post_migrate/20211027043229_track_ci_build_deletions.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class TrackCiBuildDeletions < Gitlab::Database::Migration[1.0] + include Gitlab::Database::MigrationHelpers::LooseForeignKeyHelpers + + enable_lock_retries! + + def up + track_record_deletions(:ci_builds) + end + + def down + untrack_record_deletions(:ci_builds) + end +end diff --git a/db/schema_migrations/20211027043206 b/db/schema_migrations/20211027043206 new file mode 100644 index 00000000000..7387484a118 --- /dev/null +++ b/db/schema_migrations/20211027043206 @@ -0,0 +1 @@ +543feeedace6596d63207738829dcd62249a9f048a08928fbe4131ec69058322
\ No newline at end of file diff --git a/db/schema_migrations/20211027043229 b/db/schema_migrations/20211027043229 new file mode 100644 index 00000000000..75c99cb5491 --- /dev/null +++ b/db/schema_migrations/20211027043229 @@ -0,0 +1 @@ +2bceb12bdb90052cc8c1aedbd52c11cb8125471e1b59de3d75ef476fc64851c9
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 70a7ddc674d..ab7f7d1c984 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -28723,6 +28723,10 @@ ALTER INDEX product_analytics_events_experimental_pkey ATTACH PARTITION gitlab_p CREATE TRIGGER chat_names_loose_fk_trigger AFTER DELETE ON chat_names REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); +CREATE TRIGGER ci_builds_loose_fk_trigger AFTER DELETE ON ci_builds REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); + +CREATE TRIGGER ci_pipelines_loose_fk_trigger AFTER DELETE ON ci_pipelines REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); + CREATE TRIGGER ci_runners_loose_fk_trigger AFTER DELETE ON ci_runners REFERENCING OLD TABLE AS old_table FOR EACH STATEMENT EXECUTE FUNCTION insert_into_loose_foreign_keys_deleted_records(); CREATE TRIGGER trigger_delete_project_namespace_on_project_delete AFTER DELETE ON projects FOR EACH ROW WHEN ((old.project_namespace_id IS NOT NULL)) EXECUTE FUNCTION delete_associated_project_namespace(); |