mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-22 09:18:15 +00:00
parent
ca3c1269f5
commit
817b4ff08e
|
@ -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
|
||||
|
|
3
migrations/2021-03-04-040229_clean_icon_urls/down.sql
Normal file
3
migrations/2021-03-04-040229_clean_icon_urls/down.sql
Normal 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;
|
5
migrations/2021-03-04-040229_clean_icon_urls/up.sql
Normal file
5
migrations/2021-03-04-040229_clean_icon_urls/up.sql
Normal 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%';
|
Loading…
Reference in a new issue