Can't generate model in phoenix

Viewed 789

Following the tutorial here

https://www.youtube.com/watch?v=THUG8J3xSYw&list=PLtTtLKRL6UYGxOHToRYnXBynon5plZ7Jd&index=1

trying to generate a model using scaffolding.

I tried this in the terminal

mix phx.gen.model Comment comments body:text post_id:references:posts

but I get the following in the terminal:

** (Mix) The task "phx.gen.model" could not be found. Did you mean "phx.gen.html"?

and I tried this in the terminal

mix phoenix.gen.model Comment comments body:text post_id:references:posts

but I get the following in the terminal:

** (Mix) The task "phoenix.gen.model" could not be found
1 Answers

in 1.3, model got deprecated. it is now schema

mix phx.gen.schema Comment comments body:text post_id:references:posts
Related