gpt4 book ai didi

elixir - 无法在 Phoenix 中生成模型

转载 作者:行者123 更新时间:2023-12-04 16:39:06 26 4
gpt4 key购买 nike

按照这里的教程

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

尝试使用脚手架生成模型。

我在终端试过了

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

但我在终端中得到以下信息:

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

我在终端试过了

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

但我在终端中得到以下信息:

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

最佳答案

在 1.3 中,模型被弃用了。现在是架构

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

关于elixir - 无法在 Phoenix 中生成模型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64253471/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com