mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-11 01:22:49 +00:00
server - add hidden fields to thread/reply
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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
|
||||
Reference in New Issue
Block a user