Esempio n. 1
0
        protected virtual void Generate(
            [NotNull] MySQLDropDatabaseOperation operation,
            [CanBeNull] IModel model,
            [NotNull] MigrationCommandListBuilder builder)
        {
            ThrowIf.Argument.IsNull(operation, "operation");
            ThrowIf.Argument.IsNull(builder, "builder");

            builder
            .Append("DROP DATABASE IF EXISTS ")
            .Append(_sqlGenerationHelper.DelimitIdentifier(operation.Name));

            EndStatement(builder, suppressTransaction: true);
        }
        protected virtual void Generate(
            [NotNull] MySQLDropDatabaseOperation operation,
            [CanBeNull] IModel model,
            [NotNull] MigrationCommandListBuilder builder)
        {
            Check.NotNull(operation, nameof(operation));
            Check.NotNull(builder, nameof(builder));

            builder
            .Append("DROP DATABASE IF EXISTS ")
            .Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Name))
            .Append(Dependencies.SqlGenerationHelper.StatementTerminator)
            .AppendLine(Dependencies.SqlGenerationHelper.BatchTerminator);

            EndStatement(builder);
        }