Prior to the seed file, no convention existed for initialization, and many developers put code in migrations, clouding the differentiation between creating the database and populating it.
在Seed文件之前,不存在初始化的惯例,许多开发人员把代码放入迁移中,这样容易混淆创建数据库和填充数据库之间的不同之处。
In my case, I used the file in listing 4 to seed the database before running my component tests and then used the same file to indicate which data to delete from the database upon test completion.
在本文的例子中,将在运行组件测试前使用清单4中的文件在数据库中播种,然后使用相同的文件指示测试完成时从数据库中删除哪些数据。
A file containing the data needed to seed the database.
一个文件,包含需要放到数据库中的数据。
应用推荐