Skip to content

Commit 4ff63d6

Browse files
committed
Fix para vote id persistence data type.
1 parent 404b0d4 commit 4ff63d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

_migrations/network/migrations/20220702145621_para_vote.up.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CREATE TABLE IF NOT EXISTS sub_para_vote
22
(
3-
id SERIAL PRIMARY KEY,
3+
id BIGSERIAL PRIMARY KEY,
44
block_hash VARCHAR(66) NOT NULL,
55
session_index bigint NOT NULL,
66
para_id bigint NOT NULL,

subvt-persistence/src/postgres/network/para/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ impl PostgreSQLNetworkStorage {
117117
para_id: u32,
118118
para_validator_index: u32,
119119
is_explicit: Option<bool>,
120-
) -> anyhow::Result<i32> {
121-
let result: (i32,) = sqlx::query_as(
120+
) -> anyhow::Result<i64> {
121+
let result: (i64,) = sqlx::query_as(
122122
r#"
123123
INSERT INTO sub_para_vote (block_hash, session_index, para_id, para_validator_index, is_explicit)
124124
VALUES ($1, $2, $3, $4, $5)

0 commit comments

Comments
 (0)