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

            ddlBuilder.AppendSql("ALTER TABLE ");
            ddlBuilder.AppendIdentifier(migrationOperation.DependentTable);
            ddlBuilder.AppendSql(" ADD CONSTRAINT ");
            ddlBuilder.AppendIdentifier(migrationOperation.Name.Replace("dbo.", ""));
            ddlBuilder.AppendSql(" FOREIGN KEY (");
            ddlBuilder.AppendIdentifierList(migrationOperation.DependentColumns);
            ddlBuilder.AppendSql(")");
            ddlBuilder.AppendSql(" REFERENCES ");
            ddlBuilder.AppendIdentifier(migrationOperation.PrincipalTable);
            ddlBuilder.AppendSql(" (");
            ddlBuilder.AppendIdentifierList(migrationOperation.PrincipalColumns);
            ddlBuilder.AppendSql(")");

            if (migrationOperation.CascadeDelete)
            {
                ddlBuilder.AppendSql(" ON DELETE CASCADE ");
            }


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

            ddlBuilder.AppendSql("ALTER TABLE ");
            ddlBuilder.AppendIdentifier(migrationOperation.Table);
            ddlBuilder.AppendSql(" ADD CONSTRAINT ");
            ddlBuilder.AppendIdentifier(migrationOperation.Name.Replace("dbo.", ""));
            ddlBuilder.AppendSql(" PRIMARY KEY (");
            ddlBuilder.AppendIdentifierList(migrationOperation.Columns);
            ddlBuilder.AppendSql(")");
            return(ddlBuilder.GetCommandText());
        }
        private string GenerateSqlStatementConcrete(CreateIndexOperation migrationOperation)
        {
            DB2DdlBuilder ddlBuilder = new DB2DdlBuilder();

            ddlBuilder.AppendSql("CREATE ");
            if (migrationOperation.IsUnique)
            {
                ddlBuilder.AppendSql("UNIQUE ");
            }
            ddlBuilder.AppendSql("INDEX ");
            ddlBuilder.AppendIdentifier(migrationOperation.Name);
            ddlBuilder.AppendSql(" ON ");
            ddlBuilder.AppendIdentifier(migrationOperation.Table);
            ddlBuilder.AppendSql(" (");
            ddlBuilder.AppendIdentifierList(migrationOperation.Columns);
            ddlBuilder.AppendSql(")");

            return(ddlBuilder.GetCommandText());
        }