public override void Rollback(Transaction transaction, XElement commandRollbackInfo) { transaction.ModifyColumn( new ColumnDescription( this.column, new ColumnOptions( commandRollbackInfo.Element("type").Value, commandRollbackInfo.Element("defaultValue") != null ? commandRollbackInfo.Element("defaultValue").Value : null, commandRollbackInfo.Element("isNotNull") != null ) ) ); }
public override IEnumerable<XElement> Apply(Transaction transaction, bool forceIntegrity) { if(!forceIntegrity) { throw new NotImplementedException("Safe stored procedure creation is not implemented yet"); } var oldOptions = transaction.GetColumnOptions(column); transaction.ModifyColumn(this.description); return new[] { new XElement("type", oldOptions.type), oldOptions.defaultValue != null ? new XElement("defaultValue", oldOptions.defaultValue) : null, oldOptions.isNotNull ? new XElement("isNotNull") : null }; }