diff options
author | Egor Kislitsyn <egor@kislitsyn.com> | 2021-01-23 00:37:49 +0400 |
---|---|---|
committer | Egor Kislitsyn <egor@kislitsyn.com> | 2021-01-27 18:20:06 +0400 |
commit | 793fc77b160ae2bcaded23d22d7606c2ab499f0a (patch) | |
tree | deb2dc4d1e1f4abd0148d0bf6b714865a2ffcdcc /priv/repo/migrations | |
parent | 7f0787163999fc0ac0c6fcfd0c13f80c5a55266d (diff) | |
download | pleroma-793fc77b160ae2bcaded23d22d7606c2ab499f0a.tar.gz pleroma-793fc77b160ae2bcaded23d22d7606c2ab499f0a.zip |
Add active user count
Diffstat (limited to 'priv/repo/migrations')
-rw-r--r-- | priv/repo/migrations/20210122151424_add_last_active_at_to_users.exs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/priv/repo/migrations/20210122151424_add_last_active_at_to_users.exs b/priv/repo/migrations/20210122151424_add_last_active_at_to_users.exs new file mode 100644 index 000000000..9671e495b --- /dev/null +++ b/priv/repo/migrations/20210122151424_add_last_active_at_to_users.exs @@ -0,0 +1,11 @@ +defmodule Pleroma.Repo.Migrations.AddLastActiveAtToUsers do + use Ecto.Migration + + def change do + alter table(:users) do + add(:last_active_at, :naive_datetime) + end + + create_if_not_exists(index(:users, [:last_active_at])) + end +end |