mobilizon.chapril.org-mobil.../priv/repo/migrations/20171207162701_create_events.exs
Thomas Citharel 90ceb4f6fe initial commit
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2017-12-08 09:58:14 +01:00

18 lines
418 B
Elixir

defmodule Eventos.Repo.Migrations.CreateEvents do
use Ecto.Migration
def change do
create table(:events) do
add :title, :string, null: false
add :description, :text
add :begin_on, :utc_datetime
add :ends_on, :utc_datetime
add :organizer_id, references(:accounts, on_delete: :nothing), null: false
timestamps()
end
create index(:events, [:organizer_id])
end
end