Replace FK with LFK on lfs_object_states
What does this MR do and why?
In order to exempt lfs_objects table from sharding, we must address
the FKs referencing it. There are 2 tables that do so -
lfs_objects_project and lfs_object_states. This change is the end
result of running scripts/decomposition/generate-loose-foreign-key
against lfs_object_state.
References
DB
Up
main: == [advisory_lock_connection] object_id: 138580, pg_backend_pid: 16577
main: == 20250403001818 RemoveLfsObjectsLfsObjectStatesLfsObjectIdFk: migrating =====
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- transaction_open?(nil)
main: -> 0.0000s
main: -- execute("LOCK TABLE lfs_objects, lfs_object_states IN ACCESS EXCLUSIVE MODE")
main: -> 0.0005s
main: -- remove_foreign_key(:lfs_object_states, :lfs_objects, {:name=>"fk_rails_4188448cd5"})
main: -> 0.0026s
main: == 20250403001818 RemoveLfsObjectsLfsObjectStatesLfsObjectIdFk: migrated (0.0524s)
Related to #490482 (closed) and #533930 (closed)
Edited by Kerri Miller