diff --git a/src/FluentMigrator.Runner.Postgres/Generators/Postgres/PostgresGenerator.cs b/src/FluentMigrator.Runner.Postgres/Generators/Postgres/PostgresGenerator.cs index 5197f8af6..428cb2539 100644 --- a/src/FluentMigrator.Runner.Postgres/Generators/Postgres/PostgresGenerator.cs +++ b/src/FluentMigrator.Runner.Postgres/Generators/Postgres/PostgresGenerator.cs @@ -380,7 +380,7 @@ public override string Generate(CreateSequenceExpression expression) if (seq.Increment.HasValue) { - result.AppendFormat(" INCREMENT {0}", seq.Increment); + result.AppendFormat(" INCREMENT BY {0}", seq.Increment); } if (seq.MinValue.HasValue) diff --git a/test/FluentMigrator.Tests/Unit/Generators/Postgres/PostgresSequenceTests.cs b/test/FluentMigrator.Tests/Unit/Generators/Postgres/PostgresSequenceTests.cs index 39321a9eb..cbf50a099 100644 --- a/test/FluentMigrator.Tests/Unit/Generators/Postgres/PostgresSequenceTests.cs +++ b/test/FluentMigrator.Tests/Unit/Generators/Postgres/PostgresSequenceTests.cs @@ -30,7 +30,7 @@ public override void CanCreateSequenceWithCustomSchema() expression.Sequence.SchemaName = "TestSchema"; var result = Generator.Generate(expression); - result.ShouldBe("CREATE SEQUENCE \"TestSchema\".\"Sequence\" INCREMENT 2 MINVALUE 0 MAXVALUE 100 START WITH 2 CACHE 10 CYCLE;"); + result.ShouldBe("CREATE SEQUENCE \"TestSchema\".\"Sequence\" INCREMENT BY 2 MINVALUE 0 MAXVALUE 100 START WITH 2 CACHE 10 CYCLE;"); } [Test] @@ -39,7 +39,7 @@ public override void CanCreateSequenceWithDefaultSchema() var expression = GeneratorTestHelper.GetCreateSequenceExpression(); var result = Generator.Generate(expression); - result.ShouldBe("CREATE SEQUENCE \"Sequence\" INCREMENT 2 MINVALUE 0 MAXVALUE 100 START WITH 2 CACHE 10 CYCLE;"); + result.ShouldBe("CREATE SEQUENCE \"Sequence\" INCREMENT BY 2 MINVALUE 0 MAXVALUE 100 START WITH 2 CACHE 10 CYCLE;"); } [Test]