features(api): add ip_ranges to api_tokens

This commit is contained in:
simon lehericey 2023-12-21 11:44:56 +01:00
parent 4c94eca7c0
commit 352924ed52
2 changed files with 6 additions and 0 deletions

View file

@ -0,0 +1,5 @@
class AddIPRangesToAPIToken < ActiveRecord::Migration[7.0]
def change
add_column :api_tokens, :authorized_networks, :inet, array: true, default: []
end
end

View file

@ -93,6 +93,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_01_10_113623) do
create_table "api_tokens", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.bigint "administrateur_id", null: false
t.bigint "allowed_procedure_ids", array: true
t.inet "authorized_networks", default: [], array: true
t.datetime "created_at", null: false
t.string "encrypted_token", null: false
t.datetime "last_v1_authenticated_at"