diff options
author | Alex S <alex.strizhakov@gmail.com> | 2019-07-10 16:01:32 +0300 |
---|---|---|
committer | Alex S <alex.strizhakov@gmail.com> | 2019-07-10 17:42:18 +0300 |
commit | f8786fa6f27b1934b48b69fce5d285ebddefda92 (patch) | |
tree | 3a8cc24f2688453aac11424f5bd982f526e19e29 /priv | |
parent | b972b972e00d1528f77fe726e066f35cf1323cb7 (diff) | |
download | pleroma-f8786fa6f27b1934b48b69fce5d285ebddefda92.tar.gz |
adding following_address field to user
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20190710115833_add_following_address_to_user.exs | 9 | ||||
-rw-r--r-- | priv/repo/migrations/20190710125051_add_following_address_index_to_user.exs | 8 |
2 files changed, 17 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190710115833_add_following_address_to_user.exs b/priv/repo/migrations/20190710115833_add_following_address_to_user.exs new file mode 100644 index 000000000..fe30472a1 --- /dev/null +++ b/priv/repo/migrations/20190710115833_add_following_address_to_user.exs @@ -0,0 +1,9 @@ +defmodule Pleroma.Repo.Migrations.AddFollowingAddressToUser do + use Ecto.Migration + + def change do + alter table(:users) do + add(:following_address, :string, unique: true) + end + end +end diff --git a/priv/repo/migrations/20190710125051_add_following_address_index_to_user.exs b/priv/repo/migrations/20190710125051_add_following_address_index_to_user.exs new file mode 100644 index 000000000..0cbfb71f4 --- /dev/null +++ b/priv/repo/migrations/20190710125051_add_following_address_index_to_user.exs @@ -0,0 +1,8 @@ +defmodule Pleroma.Repo.Migrations.AddFollowingAddressIndexToUser do + use Ecto.Migration + + @disable_ddl_transaction true + def change do + create(index(:users, [:following_address], concurrently: true)) + end +end |