From 85734c0d49712d53791237e93637b86b848f0f66 Mon Sep 17 00:00:00 2001 From: eugenijm Date: Fri, 1 Mar 2019 13:25:32 +0300 Subject: [PATCH] Added migration for setting default tags in existing users records --- .../20190301101154_add_default_tags_to_user.exs | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 priv/repo/migrations/20190301101154_add_default_tags_to_user.exs diff --git a/priv/repo/migrations/20190301101154_add_default_tags_to_user.exs b/priv/repo/migrations/20190301101154_add_default_tags_to_user.exs new file mode 100644 index 000000000..faeb8f1c6 --- /dev/null +++ b/priv/repo/migrations/20190301101154_add_default_tags_to_user.exs @@ -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 -- 2.45.2