private OracleSchemaMigrator GenerateMigrations(SchemaMigrationContext context, params CreateTableExpression[] createTables)
        {
            ExecuteMigrations(createTables);

               var migrator = new OracleSchemaMigrator(new DebugAnnouncer());

               migrator.Generate(context);
               return migrator;
        }
        private void ExecuteSchemaMigration()
        {
            BaseSchemaMigrator migrator;
            switch ( SchemaMigrationContext.FromDatabaseType)
            {
                case DatabaseType.SqlServer:
                case DatabaseType.SqlServer2008:
                case DatabaseType.SqlServer2005:
                    migrator = new SqlServerSchemaMigrator(new TextWriterAnnouncer(_announcerOutput));
                    break;
                case DatabaseType.Oracle:
                    migrator = new OracleSchemaMigrator(new TextWriterAnnouncer(_announcerOutput));
                    break;
                default:
                    throw new NotSupportedException(string.Format("Database type {0} not supported as source database",
                                                                  SchemaMigrationContext.FromDatabaseType));
            }

            migrator.Generate(SchemaMigrationContext);

            if ( _generateOnly )
                return;

            migrator.Migrate(SchemaMigrationContext);
        }