Skip to content

Commit 4ef4bc6

Browse files
authored
Migration extracted form #6143 (#6166)
1 parent 4858209 commit 4ef4bc6

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
defmodule Plausible.Repo.Migrations.ReplaceSitesSortPreferenceWithSortIndexOptions do
2+
use Ecto.Migration
3+
4+
def up do
5+
alter table(:team_membership_user_preferences) do
6+
remove :sites_sort_by
7+
remove :sites_sort_direction
8+
add :sort_index_options, :map, null: false, default: "{}"
9+
end
10+
end
11+
12+
def down do
13+
alter table(:team_membership_user_preferences) do
14+
remove :sort_index_options, :map
15+
add :sites_sort_by, :string, null: true
16+
add :sites_sort_direction, :string, null: true
17+
end
18+
end
19+
end

0 commit comments

Comments
 (0)