Exemplo n.º 1
0
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterSequence(
                name: "PollId",
                incrementBy: 3);

            migrationBuilder.RestartSequence(
                name: "PollId",
                startValue: 10100L);
        }
        public void AlterSequence_adds_operation()
        {
            var builder = new MigrationBuilder();

            builder.AlterSequence("dbo.MySequence", 7);

            Assert.Equal(1, builder.Operations.Count);
            Assert.IsType <AlterSequenceOperation>(builder.Operations[0]);

            var operation = (AlterSequenceOperation)builder.Operations[0];

            Assert.Equal("dbo.MySequence", operation.SequenceName);
            Assert.Equal(7, operation.NewIncrementBy);
        }
Exemplo n.º 3
0
 public override AlterOperationBuilder <AlterSequenceOperation> AlterSequence(string name, string schema = null, int incrementBy = 1, long?minValue = null, long?maxValue = null, bool cyclic = false, int oldIncrementBy = 1, long?oldMinValue = null, long?oldMaxValue = null, bool oldCyclic = false)
 {
     return(_migrationBuilder.AlterSequence(name, schema, incrementBy, minValue, maxValue, cyclic, oldIncrementBy, oldMinValue, oldMaxValue, oldCyclic));
 }