use multiple trusted_device_token

This commit is contained in:
simon lehericey 2019-02-01 18:11:55 +01:00
parent bee9a108c5
commit b9b83cca3a
4 changed files with 35 additions and 11 deletions

View file

@ -0,0 +1,11 @@
class CreateTrustedDeviceTokens < ActiveRecord::Migration[5.2]
def change
create_table :trusted_device_tokens do |t|
t.string :token, null: false
t.references :gestionnaire, foreign_key: true
t.timestamps
end
add_index :trusted_device_tokens, :token, unique: true
end
end

View file

@ -520,6 +520,15 @@ ActiveRecord::Schema.define(version: 2019_02_13_144145) do
t.string "version", null: false
end
create_table "trusted_device_tokens", force: :cascade do |t|
t.string "token", null: false
t.bigint "gestionnaire_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["gestionnaire_id"], name: "index_trusted_device_tokens_on_gestionnaire_id"
t.index ["token"], name: "index_trusted_device_tokens_on_token", unique: true
end
create_table "types_de_champ", id: :serial, force: :cascade do |t|
t.string "libelle"
t.string "type_champ"
@ -611,6 +620,7 @@ ActiveRecord::Schema.define(version: 2019_02_13_144145) do
add_foreign_key "received_mails", "procedures"
add_foreign_key "refused_mails", "procedures"
add_foreign_key "services", "administrateurs"
add_foreign_key "trusted_device_tokens", "gestionnaires"
add_foreign_key "types_de_champ", "types_de_champ", column: "parent_id"
add_foreign_key "without_continuation_mails", "procedures"
end