features(api): add ip_ranges to api_tokens
This commit is contained in:
parent
4c94eca7c0
commit
352924ed52
2 changed files with 6 additions and 0 deletions
5
db/migrate/20231220202003_add_ip_ranges_to_api_token.rb
Normal file
5
db/migrate/20231220202003_add_ip_ranges_to_api_token.rb
Normal 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
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue