diff options
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  | 
