Browse Source

Added migration for setting default tags in existing users records

tags/v1.1.4
eugenijm 5 years ago
parent
commit
85734c0d49
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      priv/repo/migrations/20190301101154_add_default_tags_to_user.exs

+ 9
- 0
priv/repo/migrations/20190301101154_add_default_tags_to_user.exs View File

@@ -0,0 +1,9 @@
defmodule Pleroma.Repo.Migrations.AddDefaultTagsToUser do
use Ecto.Migration

def up do
execute "UPDATE users SET tags = array[]::varchar[] where tags IS NULL"
end

def down, do: :noop
end

Loading…
Cancel
Save