mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 14:21:19 +00:00
Drop timestamp column from votes (ref #5016)
This commit is contained in:
parent
859dfb3f81
commit
63a2f7b7e3
8 changed files with 4 additions and 7 deletions
|
@ -300,7 +300,6 @@ mod tests {
|
|||
comment_id: inserted_comment.id,
|
||||
post_id: inserted_post.id,
|
||||
person_id: inserted_person.id,
|
||||
published: inserted_comment_like.published,
|
||||
score: 1,
|
||||
};
|
||||
|
||||
|
|
|
@ -500,7 +500,6 @@ mod tests {
|
|||
let expected_post_like = PostLike {
|
||||
post_id: inserted_post.id,
|
||||
person_id: inserted_person.id,
|
||||
published: inserted_post_like.published,
|
||||
score: 1,
|
||||
};
|
||||
|
||||
|
|
|
@ -125,7 +125,6 @@ diesel::table! {
|
|||
comment_id -> Int4,
|
||||
post_id -> Int4,
|
||||
score -> Int2,
|
||||
published -> Timestamptz,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -816,7 +815,6 @@ diesel::table! {
|
|||
post_id -> Int4,
|
||||
person_id -> Int4,
|
||||
score -> Int2,
|
||||
published -> Timestamptz,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,6 @@ pub struct CommentLike {
|
|||
pub comment_id: CommentId,
|
||||
pub post_id: PostId, // TODO this is redundant
|
||||
pub score: i16,
|
||||
pub published: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -150,7 +150,6 @@ pub struct PostLike {
|
|||
pub post_id: PostId,
|
||||
pub person_id: PersonId,
|
||||
pub score: i16,
|
||||
pub published: DateTime<Utc>,
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
|
|
|
@ -1125,7 +1125,6 @@ mod tests {
|
|||
let expected_post_like = PostLike {
|
||||
post_id: data.inserted_post.id,
|
||||
person_id: data.local_user_view.person.id,
|
||||
published: inserted_post_like.published,
|
||||
score: 1,
|
||||
};
|
||||
assert_eq!(expected_post_like, inserted_post_like);
|
||||
|
|
2
migrations/2024-10-17-091053_vote-no-timestamp/down.sql
Normal file
2
migrations/2024-10-17-091053_vote-no-timestamp/down.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
alter table post_like add column published timestamptz not null default now();
|
||||
alter table comment_like add column published timestamptz not null default now();
|
2
migrations/2024-10-17-091053_vote-no-timestamp/up.sql
Normal file
2
migrations/2024-10-17-091053_vote-no-timestamp/up.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
alter table post_like drop published;
|
||||
alter table comment_like drop published;
|
Loading…
Reference in a new issue