有没有可能不使用 rails "generater" 来创建迁移的方法?
Is there any possible way to create migration with out using rails "generater"?
我是新手,正在学习 rails Active Record
。我们可以在不使用 rails 生成器的情况下创建或更改 migration
吗??
如果您想在不使用生成器的情况下更改现有迁移,可以使用 hack。
在您的数据库中,将有一个名为 schema_migrations
的 table。从 table 中删除您想要更改的特定迁移的时间戳。 运行 rake db:migrate
再次进行更改,迁移将再次 运行。
我是新手,正在学习 rails Active Record
。我们可以在不使用 rails 生成器的情况下创建或更改 migration
吗??
如果您想在不使用生成器的情况下更改现有迁移,可以使用 hack。
在您的数据库中,将有一个名为 schema_migrations
的 table。从 table 中删除您想要更改的特定迁移的时间戳。 运行 rake db:migrate
再次进行更改,迁移将再次 运行。