1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-10 17:12:48 +00:00
Files
classic-wow-forums/priv/repo/migrations/20180123041244_reply_add_hidden_field.exs

23 lines
368 B
Elixir

defmodule MyApp.Repo.Migrations.ReplyAddHiddenField do
use Ecto.Migration
import Ecto.Query
def up do
alter table(:reply) do
add :hidden, :boolean
end
flush()
from(r in "reply",
update: [set: [hidden: false]])
|> MyApp.Repo.update_all([])
end
def down do
alter table(:reply) do
remove :hidden
end
end
end