0
我正在使用鳳凰框架,並遵循書籍編程鳳凰。
該項目使用mix
創建。數據庫用戶和密碼的相關配置根據需要進行了更新。 以下的命令被輸入和模型定義 用戶的模型 - 這如下書中的例子:未能在postgresql中創建表格
mix ecto.create
:mix ecto.gen.migration create_user
defmodule Rumbl.User do use Rumbl.Web, :model schema "users" do field :name, :string field :username, :string field :password, :string, virtual: true field :password_hash, :string timestamps end end
的步驟生成xxxx_create_user.exs文件
mix ecto.migrate
可生產的更新schema_migrations但在PostgreSQL並不創建用戶表。
好奇我在這裏可能會做錯什麼。
您是否收到任何錯誤? –
沒有錯誤。從頭開始,仍然沒有成功。 –
你的'xxxx_create_user.exs'的內容是什麼? – chenxsan