aboutsummaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorAlex S <alex.strizhakov@gmail.com>2019-07-10 16:01:32 +0300
committerAlex S <alex.strizhakov@gmail.com>2019-07-10 17:42:18 +0300
commitf8786fa6f27b1934b48b69fce5d285ebddefda92 (patch)
tree3a8cc24f2688453aac11424f5bd982f526e19e29 /priv
parentb972b972e00d1528f77fe726e066f35cf1323cb7 (diff)
downloadpleroma-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.exs9
-rw-r--r--priv/repo/migrations/20190710125051_add_following_address_index_to_user.exs8
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