From 210dbc7bc89e26e425ad99d8855c228381c8cba7 Mon Sep 17 00:00:00 2001 From: codevictory Date: Sat, 24 Apr 2021 23:52:51 +0300 Subject: [PATCH] Migration: Fix performances fields. --- .../20210424202639_fix_performance_fields.exs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 priv/repo/migrations/20210424202639_fix_performance_fields.exs diff --git a/priv/repo/migrations/20210424202639_fix_performance_fields.exs b/priv/repo/migrations/20210424202639_fix_performance_fields.exs new file mode 100644 index 0000000..204a25d --- /dev/null +++ b/priv/repo/migrations/20210424202639_fix_performance_fields.exs @@ -0,0 +1,21 @@ +defmodule Runosaari.Repo.Migrations.FixPerformanceFields do + use Ecto.Migration + + def up do + alter table("performances") do + remove :notes + remove :time + remove :description + add :description, :string, size: 2000 + add :name, :string + end + end + + def down do + alter table("performances") do + add :notes, :string + add :time, :naive_datetime + remove :name + end + end +end