public override IEnumerable<XElement> Apply(Transaction transaction, bool forceIntegrity) { if(!forceIntegrity) { throw new NotImplementedException("Safe stored procedure creation is not implemented yet"); } var options = transaction.GetColumnOptions(column); /*Console.WriteLine(); Console.Write(options.type); if(options.defaultValue != null) { Console.Write(" DEFAULT " + options.defaultValue); } if(options.isNotNull) { Console.Write(" NOT NULL"); } Console.WriteLine(); Console.WriteLine("'" + options.defaultValue + "'");*/ transaction.RemoveColumn(column); return new[] { new XElement("type", options.type), options.defaultValue != null ? new XElement("defaultValue", options.defaultValue) : null, options.isNotNull ? new XElement("isNotNull") : null }; }
public override void Rollback(Transaction transaction, XElement commandRollbackInfo) { transaction.RemoveColumn(this.column); }