1
0
Fork 0
mirror of https://framagit.org/framasoft/mobilizon.git synced 2024-12-26 09:49:12 +00:00
mobilizon/priv/repo/migrations/20180515100237_create_comments.exs
Thomas Citharel 7dd7e8fc36
Fix mix format and format migrations too
Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Fix credo warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Show elixir version

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Also lint migrations

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Reset allow failure to false

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-02-22 14:53:09 +01:00

17 lines
513 B
Elixir

defmodule Mobilizon.Repo.Migrations.CreateComments do
use Ecto.Migration
def change do
create table(:comments) do
add(:url, :string)
add(:text, :text)
add(:account_id, references(:accounts, on_delete: :nothing), null: false)
add(:event_id, references(:events, on_delete: :nothing))
add(:in_reply_to_comment_id, references(:categories, on_delete: :nothing))
add(:origin_comment_id, references(:addresses, on_delete: :delete_all))
timestamps()
end
end
end