Geo: Part 2 of Enforce not null packages_package_files.file_store
What does this MR do?
Part 1: !38822 (merged)
This MR is the last part needed to enforce not null file_store on packages_package_files. This improves the performance of queries for locally stored package files since we no longer have to look for 1
and also NULL
values.
Resolves #235516 (closed)
(Basically copy-paste-adjust-for-different-table of !42045 (merged))
Migration Output
Up:
== 20200915185707 EnsureFilledFileStoreOnPackageFiles: migrating ==============
== 20200915185707 EnsureFilledFileStoreOnPackageFiles: migrated (0.0372s) =====
== 20200915191156 ValidateNotNullFileStoreOnPackageFiles: migrating ===========
-- execute("ALTER TABLE packages_package_files VALIDATE CONSTRAINT check_4c5e6bb0b3;")
-> 0.0004s
-- transaction_open?()
-> 0.0000s
-- indexes(:packages_package_files)
-> 0.0033s
-- remove_index(:packages_package_files, {:algorithm=>:concurrently, :name=>"index_packages_package_files_file_store_is_null"})
-> 0.0035s
== 20200915191156 ValidateNotNullFileStoreOnPackageFiles: migrated (0.0090s) ==
Down:
== 20200915191156 ValidateNotNullFileStoreOnPackageFiles: reverting ===========
-- transaction_open?()
-> 0.0000s
-- index_exists?(:packages_package_files, :id, {:where=>"file_store IS NULL", :name=>"index_packages_package_files_file_store_is_null", :algorithm=>:concurrently})
-> 0.0032s
-- add_index(:packages_package_files, :id, {:where=>"file_store IS NULL", :name=>"index_packages_package_files_file_store_is_null", :algorithm=>:concurrently})
-> 0.0079s
== 20200915191156 ValidateNotNullFileStoreOnPackageFiles: reverted (0.0114s) ==
== 20200915185707 EnsureFilledFileStoreOnPackageFiles: reverting ==============
== 20200915185707 EnsureFilledFileStoreOnPackageFiles: reverted (0.0000s) =====
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process.
Edited by Michael Kozono