Using MySql with Ecto



You might need to create a folder manually, priv\repo\migrations if it doesn't exist. Otherwise ecto will complain when you run "mix ecto.migrate"

Let's create some schema

mix  phoenix.gen.model User users name:string email:string bio:string number_of_pets:integer

Details of phoenix mix task can be found here.

Next run

"mix ecto.migrate"



The actual documentation uses slightly different command.








Comments

Popular posts from this blog

ionic2 cordova build android - Unable resolve gradle 2.2.3

OpenCover code coverage for .Net Core

Using Custom DLL with IronPython / Scripts