Added a route_token column to settings model
This commit is contained in:
parent
6b2ecb56a7
commit
bac51152d6
3 changed files with 12 additions and 0 deletions
|
|
@ -31,6 +31,7 @@ defmodule Pinchflat.Settings.Setting do
|
||||||
field :apprise_version, :string
|
field :apprise_version, :string
|
||||||
field :apprise_server, :string
|
field :apprise_server, :string
|
||||||
field :youtube_api_key, :string
|
field :youtube_api_key, :string
|
||||||
|
field :route_token, :string
|
||||||
|
|
||||||
field :video_codec_preference, :string
|
field :video_codec_preference, :string
|
||||||
field :audio_codec_preference, :string
|
field :audio_codec_preference, :string
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 438 KiB After Width: | Height: | Size: 442 KiB |
|
|
@ -0,0 +1,11 @@
|
||||||
|
defmodule Pinchflat.Repo.Migrations.AddRouteTokenToSettings do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table(:settings) do
|
||||||
|
add :route_token, :string, null: false, default: "tmp-token"
|
||||||
|
end
|
||||||
|
|
||||||
|
execute "UPDATE settings SET route_token = gen_random_uuid();", "SELECT 1;"
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in a new issue