Squash device migrations into single table creation

Consolidates the session reference and index cleanup into the original
CreateActionPushNativeDevices migration for a cleaner migration history.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Rosa Gutierrez
2026-01-21 20:50:57 +01:00
parent 92f283c4d9
commit 8a77fd7966
3 changed files with 2 additions and 11 deletions
@@ -4,7 +4,8 @@ class CreateActionPushNativeDevices < ActiveRecord::Migration[8.0]
t.string :name
t.string :platform, null: false
t.string :token, null: false
t.belongs_to :owner, polymorphic: true, type: :uuid
t.belongs_to :owner, polymorphic: true, type: :uuid, index: false
t.belongs_to :session, type: :uuid, foreign_key: true
t.timestamps
end
@@ -1,5 +0,0 @@
class AddSessionToActionPushNativeDevices < ActiveRecord::Migration[8.2]
def change
add_reference :action_push_native_devices, :session, foreign_key: true, type: :uuid
end
end
@@ -1,5 +0,0 @@
class RemoveRedundantOwnerIndexFromActionPushNativeDevices < ActiveRecord::Migration[8.2]
def change
remove_index :action_push_native_devices, column: [ :owner_type, :owner_id ]
end
end