Esempio n. 1
0
 private static void WriteSql(string databaseSchemaName, TextWriter writer)
 {
     writer.WriteLine(SchemaMigration.CreateSchemaStatementFor(databaseSchemaName));
 }
Esempio n. 2
0
        public static async Task ResetSchema(this SqlConnection conn, string schemaName)
        {
            await conn.DropSchema(schemaName);

            await conn.RunSql(SchemaMigration.CreateSchemaStatementFor(schemaName));
        }
Esempio n. 3
0
        public static async Task ApplyChanges(this ISchemaObject schemaObject, SqlConnection conn)
        {
            var migration = await SchemaMigration.Determine(conn, schemaObject);

            await migration.ApplyAll(conn, new DdlRules(), AutoCreate.CreateOrUpdate);
        }
Esempio n. 4
0
 public static Task CreateSchema(this SqlConnection conn, string schemaName)
 {
     return(conn.CreateCommand(SchemaMigration.CreateSchemaStatementFor(schemaName)).ExecuteNonQueryAsync());
 }