public virtual void Modify([NotNull] DatabaseModel databaseModel, [NotNull] MigrationOperation operation)
        {
            Check.NotNull(databaseModel, "databaseModel");
            Check.NotNull(operation, "operation");

            operation.Accept(this, databaseModel);
        }
Example #2
0
        protected virtual IEnumerable <SqlStatement> Generate([NotNull] MigrationOperation operation)
        {
            var builder = new IndentedStringBuilder();

            operation.GenerateSql(this, builder);

            if (DatabaseModelModifier != null)
            {
                operation.Accept(DatabaseModelModifier, Database);
            }

            // TODO: Should we support implementations of Generate that output more than one SQL statement?
            yield return(new SqlStatement(builder.ToString()));
        }