Merge pull request #1478 from LemmyNet/fix_wrong_urls

Fixing wrong user_ and community icon and banner urls.
This commit is contained in:
Nutomic 2021-03-04 12:18:30 +00:00 committed by GitHub
commit e0c61c1334
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View file

@ -1,4 +1,6 @@
# syntax=docker/dockerfile:experimental
# Warning: this will not pick up migrations unless there are code changes
FROM rust:1.50-buster as rust
ENV HOME=/home/root

View file

@ -0,0 +1,3 @@
-- This is a clean-up migration that cannot be undone,
-- but Diesel requires a non-empty script so run a no-op.
SELECT 1;

View file

@ -0,0 +1,5 @@
-- If these are not urls, it will crash the server
update user_ set avatar = NULL where avatar not like 'http%';
update user_ set banner = NULL where banner not like 'http%';
update community set icon = NULL where icon not like 'http%';
update community set banner = NULL where banner not like 'http%';