private string GenerateSqlStatementConcrete(AlterColumnOperation migrationOperation)
        {
            DB2DdlBuilder ddlBuilder = new DB2DdlBuilder();

            ddlBuilder.AppendSql("ALTER TABLE ");
            ddlBuilder.AppendIdentifier(migrationOperation.Table);
            ddlBuilder.AppendSql(" ALTER COLUMN ");

            ColumnModel column = migrationOperation.Column;

            ddlBuilder.AppendIdentifier(column.Name);
            ddlBuilder.AppendSql(" ");
            TypeUsage storeType = ProviderManifest.GetStoreType(column.TypeUsage);

            ddlBuilder.AppendType(storeType, column.IsNullable ?? true, column.IsIdentity);
            ddlBuilder.AppendNewLine();


            return(ddlBuilder.GetCommandText());
        }
        private string GenerateSqlStatementConcrete(CreateTableOperation migrationOperation)
        {
            DB2DdlBuilder ddlBuilder = new DB2DdlBuilder();


            ddlBuilder.AppendSql("CREATE TABLE ");
            ddlBuilder.AppendIdentifier(migrationOperation.Name);
            ddlBuilder.AppendSql(" (");
            ddlBuilder.AppendNewLine();

            bool first = true;

            foreach (ColumnModel column in migrationOperation.Columns)
            {
                if (first)
                {
                    first = false;
                }
                else
                {
                    ddlBuilder.AppendSql(",");
                }

                ddlBuilder.AppendSql(" ");
                ddlBuilder.AppendIdentifier(column.Name);
                ddlBuilder.AppendSql(" ");
                TypeUsage storeTypeUsage = ProviderManifest.GetStoreType(column.TypeUsage);
                ddlBuilder.AppendType(storeTypeUsage, column.IsNullable ?? true, column.IsIdentity);
                ddlBuilder.AppendNewLine();
            }

            ddlBuilder.AppendSql(")");

            if (migrationOperation.PrimaryKey != null)
            {
                ddlBuilder.AppendSql(BATCHTERMINATOR);
                ddlBuilder.AppendSql(GenerateSqlStatementConcrete(migrationOperation.PrimaryKey));
            }

            return(ddlBuilder.GetCommandText());
        }