From ce0cf0e41bf00d5b741f0cb4789c508df72edd79 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 26 Jun 2023 10:45:37 +0200 Subject: [PATCH] Remove DELETED_REPLACEMENT_URL --- crates/db_schema/src/impls/post.rs | 11 ++--------- crates/db_schema/src/utils.rs | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/crates/db_schema/src/impls/post.rs b/crates/db_schema/src/impls/post.rs index 7f59d29ec..6a4d53d3a 100644 --- a/crates/db_schema/src/impls/post.rs +++ b/crates/db_schema/src/impls/post.rs @@ -27,14 +27,7 @@ use crate::{ PostUpdateForm, }, traits::{Crud, Likeable, Readable, Saveable}, - utils::{ - get_conn, - naive_now, - DbPool, - DELETED_REPLACEMENT_TEXT, - DELETED_REPLACEMENT_URL, - FETCH_LIMIT_MAX, - }, + utils::{get_conn, naive_now, DbPool, DELETED_REPLACEMENT_TEXT, FETCH_LIMIT_MAX}, }; use ::url::Url; use diesel::{dsl::insert_into, result::Error, ExpressionMethods, QueryDsl, TextExpressionMethods}; @@ -121,7 +114,7 @@ impl Post { diesel::update(post.filter(creator_id.eq(for_creator_id))) .set(( name.eq(DELETED_REPLACEMENT_TEXT), - url.eq(DELETED_REPLACEMENT_URL), + url.eq(Option::<&str>::None), body.eq(DELETED_REPLACEMENT_TEXT), deleted.eq(true), updated.eq(naive_now()), diff --git a/crates/db_schema/src/utils.rs b/crates/db_schema/src/utils.rs index 7ba5d5e7b..fdd445637 100644 --- a/crates/db_schema/src/utils.rs +++ b/crates/db_schema/src/utils.rs @@ -279,7 +279,6 @@ pub mod functions { } pub const DELETED_REPLACEMENT_TEXT: &str = "*Permanently Deleted*"; -pub const DELETED_REPLACEMENT_URL: &str = "https://join-lemmy.org/"; impl ToSql for DbUrl { fn to_sql(&self, out: &mut Output) -> diesel::serialize::Result {