Skip to content

Commit

Permalink
set priority key to not null
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaczanowski committed Nov 8, 2024
1 parent a4b0651 commit 1c9b511
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/pkg/proto/version_resolver/version_resolver.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions migrations/01_init_tables.psql
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CREATE TABLE "upgrades"
"type" INTEGER NOT NULL,
"status" INTEGER NOT NULL DEFAULT 0,
"step" INTEGER NOT NULL DEFAULT 0,
"priority" INTEGER,
"priority" INTEGER NOT NULL,
"source" INTEGER NOT NULL,
"proposal_id" BIGINT,
PRIMARY KEY ("height", "network", "priority")
Expand All @@ -19,6 +19,6 @@ CREATE TABLE "versions"
"network" TEXT NOT NULL,
"tag" TEXT,
"source" INTEGER NOT NULL,
"priority" INTEGER,
"priority" INTEGER NOT NULL,
PRIMARY KEY ("height", "network", "priority")
)
2 changes: 1 addition & 1 deletion proto/upgrades_registry.proto
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ message Upgrade {
UpgradeStep step = 7;

// priority of the upgrade (highest priority wins)
// @gotags: gorm:"primaryKey"
// @gotags: gorm:"primaryKey;not null"
int32 priority = 8;

// source of the upgrade
Expand Down
2 changes: 1 addition & 1 deletion proto/version_resolver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ message Version {
ProviderType source = 4;

// the version priority
// @gotags: gorm:"primaryKey"
// @gotags: gorm:"primaryKey;not null"
int32 priority = 5;
}

Expand Down

0 comments on commit 1c9b511

Please sign in to comment.