[Enhancement] Add option for a source to only use cookies when needed (#640)
* Updated model with new attribute * Update app logic to use new cookie logic * lots of tests * Updated UI and renamed attribute * Updated tests
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 497 KiB After Width: | Height: | Size: 497 KiB |
@@ -0,0 +1,18 @@
|
||||
defmodule Pinchflat.Repo.Migrations.AddCookieBehaviourToSources do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:sources) do
|
||||
add :cookie_behaviour, :string, null: false, default: "disabled"
|
||||
end
|
||||
|
||||
execute(
|
||||
"UPDATE sources SET cookie_behaviour = 'all_operations' WHERE use_cookies = TRUE",
|
||||
"UPDATE sources SET use_cookies = TRUE WHERE cookie_behaviour = 'all_operations'"
|
||||
)
|
||||
|
||||
alter table(:sources) do
|
||||
remove :use_cookies, :boolean, null: false, default: false
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user