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:
@@ -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
|
||||
-5
@@ -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
|
||||
Reference in New Issue
Block a user