mirror of
https://github.com/kieraneglin/pinchflat.git
synced 2026-01-23 02:24:24 +00:00
[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:
parent
59f8aa69cd
commit
ac895944a8
17 changed files with 247 additions and 65 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue