Пример #1
0
        public override IEnumerable<XElement> Apply(Transaction transaction, bool forceIntegrity)
        {
            if(!forceIntegrity)
            {
                throw new NotImplementedException("Safe stored procedure creation is not implemented yet");
            }

            transaction.CreateColumn(this.description);
            return Enumerable.Empty<XElement>();
        }
Пример #2
0
 public override void Rollback(Transaction transaction, XElement commandRollbackInfo)
 {
     transaction.CreateColumn(
         new ColumnDescription(
             this.column,
             new ColumnOptions(
                 commandRollbackInfo.Element("type").Value,
                 commandRollbackInfo.Element("defaultValue") != null ? commandRollbackInfo.Element("defaultValue").Value : null,
                 commandRollbackInfo.Element("isNotNull") != null
             )
         )
     );
 }