如何制作一个已经 运行 的迁移文件?
How to make a migration file as already run?
我在数据库中创建了一个列,但没有创建迁移文件。
现在我想为 column.How 创建一个迁移文件,我可以将迁移文件设为已经 运行 吗?
Rails 根据在 schema_migrations
table.
中找到迁移的 ID,知道迁移是否具有 运行
运行 rails db
启动你的 SQL 前端,然后
insert into schema_migrations(id) values (<leading digits of migration>);
我在数据库中创建了一个列,但没有创建迁移文件。 现在我想为 column.How 创建一个迁移文件,我可以将迁移文件设为已经 运行 吗?
Rails 根据在 schema_migrations
table.
运行 rails db
启动你的 SQL 前端,然后
insert into schema_migrations(id) values (<leading digits of migration>);