Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set priority key to not null #11

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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
Loading