mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: remove uploaded_meta_id column from category (#6725)
* DEV: remove uploaded_meta_id column from category * remove uploaded_meta part
This commit is contained in:
committed by
Guo Xiang Tan
parent
a52baf4b28
commit
b63b399799
@@ -28,7 +28,6 @@ class Category < ActiveRecord::Base
|
||||
belongs_to :latest_post, class_name: "Post"
|
||||
belongs_to :uploaded_logo, class_name: "Upload"
|
||||
belongs_to :uploaded_background, class_name: "Upload"
|
||||
belongs_to :uploaded_meta, class_name: "Upload"
|
||||
|
||||
has_many :topics
|
||||
has_many :category_users
|
||||
@@ -666,7 +665,6 @@ end
|
||||
# sort_ascending :boolean
|
||||
# uploaded_logo_id :integer
|
||||
# uploaded_background_id :integer
|
||||
# uploaded_meta_id :integer
|
||||
# topic_featured_link_allowed :boolean default(TRUE)
|
||||
# all_topics_wiki :boolean default(FALSE), not null
|
||||
# show_subcategory_list :boolean default(FALSE)
|
||||
|
||||
@@ -69,7 +69,6 @@ class CategoryList
|
||||
@categories = Category.includes(
|
||||
:uploaded_background,
|
||||
:uploaded_logo,
|
||||
:uploaded_meta,
|
||||
:topic_only_relative_url,
|
||||
subcategories: [:topic_only_relative_url]
|
||||
).secured(@guardian)
|
||||
|
||||
@@ -28,7 +28,7 @@ class Site
|
||||
def categories
|
||||
@categories ||= begin
|
||||
categories = Category
|
||||
.includes(:uploaded_logo, :uploaded_background, :uploaded_meta)
|
||||
.includes(:uploaded_logo, :uploaded_background)
|
||||
.secured(@guardian)
|
||||
.joins('LEFT JOIN topics t on t.id = categories.topic_id')
|
||||
.select('categories.*, t.slug topic_slug')
|
||||
|
||||
Reference in New Issue
Block a user