From: Felix Ableitner Date: Mon, 26 Jun 2023 08:45:37 +0000 (+0200) Subject: Remove DELETED_REPLACEMENT_URL X-Git-Url: http://these/git/%22https:/nerdica.net/photo/contact/80/maint-mode.css?a=commitdiff_plain;h=ce0cf0e41bf00d5b741f0cb4789c508df72edd79;p=lemmy.git Remove DELETED_REPLACEMENT_URL --- diff --git a/crates/db_schema/src/impls/post.rs b/crates/db_schema/src/impls/post.rs index 7f59d29e..6a4d53d3 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 7ba5d5e7..fdd44563 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 {