* First commit with iOS PN working * RPush cleanup worker + unique jobs config * Remove rpush tables from schema.rb * PR feedback * Feature flag and test for route * Tests and feature flag PushNotification ::Send * Update app/controllers/devices_controller.rb Co-authored-by: Michael Kohl <citizen428@dev.to> * Update spec/routing/devices_routes_spec.rb Co-authored-by: Michael Kohl <citizen428@dev.to> * Update spec/services/push_notifications/send_spec.rb Co-authored-by: Michael Kohl <citizen428@dev.to> * PR feedback * Set Rpush driver and url * More PR feedback * Apply suggestions from code review Co-authored-by: Jamie Gaskins <jgaskins@gmail.com> * PR feedback from Rhymes * Don’t double render * Sure Co-authored-by: Josh Puetz <hi@joshpuetz.com> Co-authored-by: Josh Puetz <josh@dev.to> Co-authored-by: Michael Kohl <citizen428@dev.to> Co-authored-by: Jamie Gaskins <jgaskins@gmail.com>
14 lines
401 B
Ruby
14 lines
401 B
Ruby
class CreateDevices < ActiveRecord::Migration[6.0]
|
|
def change
|
|
create_table :devices do |t|
|
|
t.references :user, null: false, foreign_key: true, index: false
|
|
t.string :token, null: false
|
|
t.string :platform, null: false
|
|
t.string :app_bundle, null: false
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :devices, [:user_id, :token, :platform, :app_bundle], unique: true
|
|
end
|
|
end
|