public static IDbMigrationCollection Add <TMigration>
     (this IDbMigrationCollection migrations, params Object[] parameters)
     where TMigration : IDbMigration
 {
     migrations.Add(typeof(TMigration), parameters);
     return(migrations);
 }
示例#2
0
 /// <param name = "scriptLocation"> Location of the script in the project. Must be in format '*.sql'. </param>
 /// <param name = "migrationId"> Migration id. By default it's the script name. </param>
 public static IDbMigrationCollection Add
     (this IDbMigrationCollection migrations,
     Route scriptLocation,
     String?locationNamespace = null,
     String?migrationId       = null)
 {
     migrations.Add(new DbMigrationPresenter.EmbeddedScript(scriptLocation, locationNamespace, migrationId));
     return(migrations);
 }
示例#3
0
 public static IDbMigrationCollection Add <TMigration> (this IDbMigrationCollection migrations)
     where TMigration : IDbMigration
 {
     migrations.Add(new DbMigrationPresenter.Class(typeof(TMigration)));
     return(migrations);
 }
 public static IDbMigrationCollection Add <TMigration> (this IDbMigrationCollection migrations)
     where TMigration : IDbMigration =>
 migrations.Add <TMigration>(parameters : Array.Empty <Object>());
示例#5
0
 public void Configure(IDbMigrationCollection migrations) =>
 migrations
 .Add <CreatePostsTable>()
 .Add("posts/migrate/AddHelloWorldPost.sql")
 .Add <RequirePostAuthor>();