fix: help center clearing minor bugs (#5075)

This commit is contained in:
Tejaswini Chile 2022-07-22 15:01:07 +05:30 committed by GitHub
parent 32291f4f7d
commit 5727928600
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 1 deletions

View file

@ -5,6 +5,7 @@
# id :bigint not null, primary key # id :bigint not null, primary key
# content :text # content :text
# description :text # description :text
# meta :jsonb
# status :integer # status :integer
# title :string # title :string
# views :integer # views :integer

View file

@ -25,3 +25,5 @@ if category.root_category.present?
json.partial! 'api/v1/accounts/categories/associated_category.json.jbuilder', category: category.root_category json.partial! 'api/v1/accounts/categories/associated_category.json.jbuilder', category: category.root_category
end end
end end
json.articles_count category.articles.published.try(:count)

View file

@ -23,3 +23,5 @@ if category.root_category.present?
json.partial! partial: 'associated_category', category: category.root_category json.partial! partial: 'associated_category', category: category.root_category
end end
end end
json.articles_count category.articles.published.try(:count)

View file

@ -0,0 +1,5 @@
class AddMetaColumnToArticle < ActiveRecord::Migration[6.1]
def change
add_column :articles, :meta, :jsonb, default: {}
end
end

View file

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_07_18_123938) do ActiveRecord::Schema.define(version: 2022_07_20_080126) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements" enable_extension "pg_stat_statements"
@ -128,6 +128,7 @@ ActiveRecord::Schema.define(version: 2022_07_18_123938) do
t.datetime "updated_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false
t.bigint "author_id" t.bigint "author_id"
t.bigint "associated_article_id" t.bigint "associated_article_id"
t.jsonb "meta", default: {}
t.index ["associated_article_id"], name: "index_articles_on_associated_article_id" t.index ["associated_article_id"], name: "index_articles_on_associated_article_id"
t.index ["author_id"], name: "index_articles_on_author_id" t.index ["author_id"], name: "index_articles_on_author_id"
end end