mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-30 08:11:20 +00:00
Switching from bigint to smallint.
This commit is contained in:
parent
a50528a5bc
commit
9c03dcaa88
3 changed files with 12 additions and 12 deletions
|
@ -39,8 +39,8 @@ pub struct CommentAggregates {
|
||||||
pub hot_rank: f64,
|
pub hot_rank: f64,
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
pub controversy_rank: f64,
|
pub controversy_rank: f64,
|
||||||
pub report_count: i64,
|
pub report_count: i16,
|
||||||
pub unresolved_report_count: i64,
|
pub unresolved_report_count: i16,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone)]
|
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone)]
|
||||||
|
@ -148,8 +148,8 @@ pub struct PostAggregates {
|
||||||
/// A rank that amplifies smaller communities
|
/// A rank that amplifies smaller communities
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
pub scaled_rank: f64,
|
pub scaled_rank: f64,
|
||||||
pub report_count: i64,
|
pub report_count: i16,
|
||||||
pub unresolved_report_count: i64,
|
pub unresolved_report_count: i16,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
|
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
|
||||||
|
|
|
@ -130,8 +130,8 @@ diesel::table! {
|
||||||
child_count -> Int4,
|
child_count -> Int4,
|
||||||
hot_rank -> Float8,
|
hot_rank -> Float8,
|
||||||
controversy_rank -> Float8,
|
controversy_rank -> Float8,
|
||||||
report_count -> Int8,
|
report_count -> Int2,
|
||||||
unresolved_report_count -> Int8,
|
unresolved_report_count -> Int2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -779,8 +779,8 @@ diesel::table! {
|
||||||
controversy_rank -> Float8,
|
controversy_rank -> Float8,
|
||||||
instance_id -> Int4,
|
instance_id -> Int4,
|
||||||
scaled_rank -> Float8,
|
scaled_rank -> Float8,
|
||||||
report_count -> Int8,
|
report_count -> Int2,
|
||||||
unresolved_report_count -> Int8,
|
unresolved_report_count -> Int2,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
-- Adding report_count and unresolved_report_count
|
-- Adding report_count and unresolved_report_count
|
||||||
-- to the post and comment aggregate tables
|
-- to the post and comment aggregate tables
|
||||||
ALTER TABLE post_aggregates
|
ALTER TABLE post_aggregates
|
||||||
ADD COLUMN report_count bigint NOT NULL DEFAULT 0,
|
ADD COLUMN report_count smallint NOT NULL DEFAULT 0,
|
||||||
ADD COLUMN unresolved_report_count bigint NOT NULL DEFAULT 0;
|
ADD COLUMN unresolved_report_count smallint NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
ALTER TABLE comment_aggregates
|
ALTER TABLE comment_aggregates
|
||||||
ADD COLUMN report_count bigint NOT NULL DEFAULT 0,
|
ADD COLUMN report_count smallint NOT NULL DEFAULT 0,
|
||||||
ADD COLUMN unresolved_report_count bigint NOT NULL DEFAULT 0;
|
ADD COLUMN unresolved_report_count smallint NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
-- Update the historical counts
|
-- Update the historical counts
|
||||||
-- Posts
|
-- Posts
|
||||||
|
|
Loading…
Reference in a new issue