mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 22:31: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,
|
||||
#[serde(skip)]
|
||||
pub controversy_rank: f64,
|
||||
pub report_count: i64,
|
||||
pub unresolved_report_count: i64,
|
||||
pub report_count: i16,
|
||||
pub unresolved_report_count: i16,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone)]
|
||||
|
@ -148,8 +148,8 @@ pub struct PostAggregates {
|
|||
/// A rank that amplifies smaller communities
|
||||
#[serde(skip)]
|
||||
pub scaled_rank: f64,
|
||||
pub report_count: i64,
|
||||
pub unresolved_report_count: i64,
|
||||
pub report_count: i16,
|
||||
pub unresolved_report_count: i16,
|
||||
}
|
||||
|
||||
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
|
||||
|
|
|
@ -130,8 +130,8 @@ diesel::table! {
|
|||
child_count -> Int4,
|
||||
hot_rank -> Float8,
|
||||
controversy_rank -> Float8,
|
||||
report_count -> Int8,
|
||||
unresolved_report_count -> Int8,
|
||||
report_count -> Int2,
|
||||
unresolved_report_count -> Int2,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -779,8 +779,8 @@ diesel::table! {
|
|||
controversy_rank -> Float8,
|
||||
instance_id -> Int4,
|
||||
scaled_rank -> Float8,
|
||||
report_count -> Int8,
|
||||
unresolved_report_count -> Int8,
|
||||
report_count -> Int2,
|
||||
unresolved_report_count -> Int2,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
-- Adding report_count and unresolved_report_count
|
||||
-- to the post and comment aggregate tables
|
||||
ALTER TABLE post_aggregates
|
||||
ADD COLUMN report_count bigint NOT NULL DEFAULT 0,
|
||||
ADD COLUMN unresolved_report_count bigint NOT NULL DEFAULT 0;
|
||||
ADD COLUMN report_count smallint NOT NULL DEFAULT 0,
|
||||
ADD COLUMN unresolved_report_count smallint NOT NULL DEFAULT 0;
|
||||
|
||||
ALTER TABLE comment_aggregates
|
||||
ADD COLUMN report_count bigint NOT NULL DEFAULT 0,
|
||||
ADD COLUMN unresolved_report_count bigint NOT NULL DEFAULT 0;
|
||||
ADD COLUMN report_count smallint NOT NULL DEFAULT 0,
|
||||
ADD COLUMN unresolved_report_count smallint NOT NULL DEFAULT 0;
|
||||
|
||||
-- Update the historical counts
|
||||
-- Posts
|
||||
|
|
Loading…
Reference in a new issue