From: Roger Braun Date: Mon, 20 Mar 2017 20:28:31 +0000 (+0100) Subject: Add user schema. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=66f536ecbadd70fae4b1cc3d8c10792ced221ae0;p=akkoma Add user schema. --- diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex new file mode 100644 index 000000000..3fb298d05 --- /dev/null +++ b/lib/pleroma/user.ex @@ -0,0 +1,13 @@ +defmodule Pleroma.User do + use Ecto.Schema + + schema "users" do + field :bio, :string + field :email, :string + field :name, :string + field :nickname, :string + field :password_hash, :string + + timestamps() + end +end diff --git a/priv/repo/migrations/20170320193800_create_user.exs b/priv/repo/migrations/20170320193800_create_user.exs new file mode 100644 index 000000000..2d2f7fbf0 --- /dev/null +++ b/priv/repo/migrations/20170320193800_create_user.exs @@ -0,0 +1,16 @@ +defmodule Pleroma.Repo.Migrations.CreatePleroma.User do + use Ecto.Migration + + def change do + create table(:users) do + add :email, :string + add :password_hash, :string + add :name, :string + add :nickname, :string + add :bio, :string + + timestamps() + end + + end +end