-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: configure consumer offset without deploy
- Loading branch information
Showing
7 changed files
with
192 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
105 changes: 105 additions & 0 deletions
105
src/ParcelRegistry.Consumer.Address/Migrations/20241205082856_AddOffsetOverrides.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
47 changes: 47 additions & 0 deletions
47
src/ParcelRegistry.Consumer.Address/Migrations/20241205082856_AddOffsetOverrides.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace ParcelRegistry.Consumer.Address.Migrations | ||
{ | ||
/// <inheritdoc /> | ||
public partial class AddOffsetOverrides : Migration | ||
{ | ||
/// <inheritdoc /> | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.CreateTable( | ||
name: "OffsetOverrides", | ||
schema: "ParcelRegistryConsumerAddress", | ||
columns: table => new | ||
{ | ||
ConsumerGroupId = table.Column<string>(type: "nvarchar(450)", nullable: false), | ||
Offset = table.Column<long>(type: "bigint", nullable: false), | ||
Configured = table.Column<bool>(type: "bit", nullable: false) | ||
}, | ||
constraints: table => | ||
{ | ||
table.PrimaryKey("PK_OffsetOverrides", x => x.ConsumerGroupId); | ||
}); | ||
|
||
migrationBuilder.CreateIndex( | ||
name: "IX_Addresses_Position", | ||
schema: "ParcelRegistryConsumerAddress", | ||
table: "Addresses", | ||
column: "Position"); | ||
} | ||
|
||
/// <inheritdoc /> | ||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropTable( | ||
name: "OffsetOverrides", | ||
schema: "ParcelRegistryConsumerAddress"); | ||
|
||
migrationBuilder.DropIndex( | ||
name: "IX_Addresses_Position", | ||
schema: "ParcelRegistryConsumerAddress", | ||
table: "Addresses"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters