]> Untitled Git - lemmy.git/blobdiff - crates/db_schema/src/source/post_report.rs
Diesel 2.0.0 upgrade (#2452)
[lemmy.git] / crates / db_schema / src / source / post_report.rs
index afb3346984894354e5f6c729d9240d39820c6198..abee0f32f19b2c4e1277419ea48ea5635601e41d 100644 (file)
@@ -4,10 +4,10 @@ use serde::{Deserialize, Serialize};
 #[cfg(feature = "full")]
 use crate::schema::post_report;
 
-#[derive(PartialEq, Serialize, Deserialize, Debug, Clone)]
+#[derive(PartialEq, Eq, Serialize, Deserialize, Debug, Clone)]
 #[cfg_attr(feature = "full", derive(Identifiable, Queryable, Associations))]
-#[cfg_attr(feature = "full", belongs_to(crate::source::post::Post))]
-#[cfg_attr(feature = "full", table_name = "post_report")]
+#[cfg_attr(feature = "full", diesel(belongs_to(crate::source::post::Post)))] // Is this the right assoc?
+#[cfg_attr(feature = "full", diesel(table_name = post_report))]
 pub struct PostReport {
   pub id: PostReportId,
   pub creator_id: PersonId,
@@ -24,7 +24,7 @@ pub struct PostReport {
 
 #[derive(Clone)]
 #[cfg_attr(feature = "full", derive(Insertable, AsChangeset))]
-#[cfg_attr(feature = "full", table_name = "post_report")]
+#[cfg_attr(feature = "full", diesel(table_name = post_report))]
 pub struct PostReportForm {
   pub creator_id: PersonId,
   pub post_id: PostId,