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

The specified initialization vector (IV) does not match the block size for this algorithm