mirror of
https://github.com/mgerb/classic-wow-forums
synced 2026-01-11 01:22:49 +00:00
create thread migration
This commit is contained in:
18
priv/repo/migrations/20180102015706_create_thread.exs
Normal file
18
priv/repo/migrations/20180102015706_create_thread.exs
Normal file
@@ -0,0 +1,18 @@
|
||||
defmodule MyApp.Repo.Migrations.CreateThread do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:thread) do
|
||||
add :title, :string
|
||||
add :content, :string
|
||||
add :view_count, :integer
|
||||
add :user_id, references(:user)
|
||||
add :last_reply_id, :integer
|
||||
add :sticky, :boolean
|
||||
add :locked, :boolean
|
||||
|
||||
timestamps()
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user