mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-18 15:31:13 +00:00
8cb5939f50
* Adding hot_rank columns in place of function sorting. - Creates hot_rank columns for post, comment, and community. - Fixes #2932 * Updating all hot ranks on startup. * Fixing post.url migration. * Removing update_instance_software from startup. * Adding post_rank query
9 lines
280 B
SQL
9 lines
280 B
SQL
-- Make a hard limit of 512 for the post.url column
|
|
-- Truncate existing long rows.
|
|
update post set url = left(url, 512) where length(url) > 512;
|
|
|
|
-- Enforce the limit
|
|
alter table post alter column url type varchar (512);
|
|
|
|
-- Add the index
|
|
create index idx_post_url on post(url);
|