public void Create_and_initialize_operation()
        {
            var dropPrimaryKeyOperation = new DropPrimaryKeyOperation("dbo.MyTable", "MyPK");

            Assert.Equal("dbo.MyTable", dropPrimaryKeyOperation.TableName);
            Assert.Equal("MyPK", dropPrimaryKeyOperation.PrimaryKeyName);
            Assert.True(dropPrimaryKeyOperation.IsDestructiveChange);
        }
        public void Dispatches_visitor()
        {
            var dropPrimaryKeyOperation = new DropPrimaryKeyOperation("dbo.MyTable", "MyPK");
            var mockVisitor = new Mock<MigrationOperationSqlGenerator>(new RelationalTypeMapper());
            var builder = new Mock<IndentedStringBuilder>();
            dropPrimaryKeyOperation.GenerateSql(mockVisitor.Object, builder.Object);

            mockVisitor.Verify(g => g.Generate(dropPrimaryKeyOperation, builder.Object), Times.Once());
        }
 public virtual void Visit([NotNull] DropPrimaryKeyOperation dropPrimaryKeyOperation, [NotNull] TContext context)
 {
     VisitDefault(dropPrimaryKeyOperation, context);
 }
 public override void Generate(
     DropPrimaryKeyOperation dropPrimaryKeyOperation,
     IndentedStringBuilder stringBuilder)
 {
     // TODO: Rebuild table
     throw new NotImplementedException();
 }