Add imported_from column to some importable records
What does this MR do and why?
We added an imported
column to 11 DB tables in !149570 (merged)
We have decided imported_from
is a better name. This MR adds an imported_from
column to the same DB tables.
Tables impacted:
design_management_designs
epics
events
issues
merge_requests
notes
resource_label_events
resource_milestone_events
resource_state_events
snippets
temp_notes_backup
The imported
column on these tables is not currently being used.
All additions have been done in the same migration as they are identical and for efficiency.
Follow-up MRs will remove the unused imported
column (requires 3 MRs over 3 releases)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
bin/rails db:migrate RAILS_ENV=development
main: == [advisory_lock_connection] object_id: 124720, pg_backend_pid: 42809
main: == 20240502114801 AddImportedFromColumns: migrating ===========================
main: -- add_column(:design_management_designs, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0038s
main: -- add_column(:epics, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0010s
main: -- add_column(:events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0008s
main: -- add_column(:issues, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0010s
main: -- add_column(:merge_requests, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0010s
main: -- add_column(:notes, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0009s
main: -- add_column(:resource_label_events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0010s
main: -- add_column(:resource_milestone_events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0009s
main: -- add_column(:resource_state_events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0009s
main: -- add_column(:snippets, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0013s
main: -- add_column(:temp_notes_backup, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
main: -> 0.0008s
main: == 20240502114801 AddImportedFromColumns: migrated (0.0177s) ==================
main: == [advisory_lock_connection] object_id: 124720, pg_backend_pid: 42809
ci: == [advisory_lock_connection] object_id: 125220, pg_backend_pid: 42811
ci: == 20240502114801 AddImportedFromColumns: migrating ===========================
ci: -- add_column(:design_management_designs, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0038s
ci: -- add_column(:epics, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0013s
ci: -- add_column(:events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0013s
ci: -- add_column(:issues, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0009s
ci: -- add_column(:merge_requests, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0012s
ci: -- add_column(:notes, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0012s
ci: -- add_column(:resource_label_events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0011s
ci: -- add_column(:resource_milestone_events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0006s
ci: -- add_column(:resource_state_events, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0011s
ci: -- add_column(:snippets, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0012s
ci: -- add_column(:temp_notes_backup, :imported_from, :integer, {:default=>0, :null=>false, :limit=>2})
ci: -> 0.0009s
ci: == 20240502114801 AddImportedFromColumns: migrated (0.0226s) ==================
ci: == [advisory_lock_connection] object_id: 125220, pg_backend_pid: 42811
Edited by Carla Drago