API for apps to register for push notifications
This commit is contained in:
13
db/migrate/20170129000348_create_devices.rb
Normal file
13
db/migrate/20170129000348_create_devices.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class CreateDevices < ActiveRecord::Migration[5.0]
|
||||
def change
|
||||
create_table :devices do |t|
|
||||
t.integer :account_id, null: false
|
||||
t.string :registration_id, null: false, default: ''
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :devices, :registration_id
|
||||
add_index :devices, :account_id
|
||||
end
|
||||
end
|
11
db/schema.rb
11
db/schema.rb
@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20170127165745) do
|
||||
ActiveRecord::Schema.define(version: 20170129000348) do
|
||||
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "plpgsql"
|
||||
@ -54,6 +54,15 @@ ActiveRecord::Schema.define(version: 20170127165745) do
|
||||
t.index ["account_id", "target_account_id"], name: "index_blocks_on_account_id_and_target_account_id", unique: true, using: :btree
|
||||
end
|
||||
|
||||
create_table "devices", force: :cascade do |t|
|
||||
t.integer "account_id", null: false
|
||||
t.string "registration_id", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id"], name: "index_devices_on_account_id", using: :btree
|
||||
t.index ["registration_id"], name: "index_devices_on_registration_id", using: :btree
|
||||
end
|
||||
|
||||
create_table "domain_blocks", force: :cascade do |t|
|
||||
t.string "domain", default: "", null: false
|
||||
t.datetime "created_at", null: false
|
||||
|
Reference in New Issue
Block a user