1
0
mirror of https://github.com/mgerb/classic-wow-forums synced 2026-01-09 16:42:49 +00:00
Files
classic-wow-forums/priv/repo/migrations/20180123042453_thread_add_hidden_field.exs

23 lines
372 B
Elixir

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