如果该表不存在,则它调用数据库初始化代码ResourcesDatabaseInitializer,该代码在此示例中是初始化数据库的实用程序类。
If the table doesn't exist, it invokes the database initialization code, ResourcesDatabaseInitializer, which in this example is a utility class that initializes the database.
在Seed文件之前,不存在初始化的惯例,许多开发人员把代码放入迁移中,这样容易混淆创建数据库和填充数据库之间的不同之处。
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文件之前,不存在初始化的惯例,许多开发人员把代码放入迁移中,这样容易混淆创建数据库和填充数据库之间的不同之处。
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.
应用推荐