Drop software_licenses table
What does this MR do and why?
As described in #497969, we are planning the software_licenses table. We already remove all code references to the software_licenses table. This MR removes the software_licenses table.
Migration up
main: == [advisory_lock_connection] object_id: 155520, pg_backend_pid: 73879
main: == 20250923165400 DropSoftwareLicenses: migrating =============================
main: -- drop_table(:software_licenses)
main: -> 0.0887s
main: == 20250923165400 DropSoftwareLicenses: migrated (0.0955s) ====================
main: == [advisory_lock_connection] object_id: 155520, pg_backend_pid: 73879
Migration down
main: == [advisory_lock_connection] object_id: 155820, pg_backend_pid: 36100
main: == 20250923165400 DropSoftwareLicenses: reverting =============================
main: -- create_table(:software_licenses)
main: -> 0.0070s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- view_exists?(:postgres_partitions)
main: -> 0.0258s
main: -- index_exists?(:software_licenses, "LOWER(name)", {:name=>"idx_software_licenses_lower_name", :algorithm=>:concurrently})
main: -> 0.0012s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0005s
main: -- add_index(:software_licenses, "LOWER(name)", {:name=>"idx_software_licenses_lower_name", :algorithm=>:concurrently})
main: -> 0.0021s
main: -- execute("RESET statement_timeout")
main: -> 0.0007s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- view_exists?(:postgres_partitions)
main: -> 0.0006s
main: -- index_exists?(:software_licenses, :spdx_identifier, {:name=>"index_software_licenses_on_spdx_identifier", :algorithm=>:concurrently})
main: -> 0.0010s
main: -- add_index(:software_licenses, :spdx_identifier, {:name=>"index_software_licenses_on_spdx_identifier", :algorithm=>:concurrently})
main: -> 0.0013s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- view_exists?(:postgres_partitions)
main: -> 0.0005s
main: -- index_exists?(:software_licenses, :name, {:unique=>true, :name=>"index_software_licenses_on_unique_name", :algorithm=>:concurrently})
main: -> 0.0013s
main: -- add_index(:software_licenses, :name, {:unique=>true, :name=>"index_software_licenses_on_unique_name", :algorithm=>:concurrently})
main: -> 0.0011s
main: == 20250923165400 DropSoftwareLicenses: reverted (0.0790s) ====================
main: == [advisory_lock_connection] object_id: 155820, pg_backend_pid: 36100
References
Related to #497969
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Marcos Rocha