chore: Update Help Center APIs to accomodate locale (#4515)

This commit is contained in:
Pranav Raj S
2022-04-20 16:00:37 +05:30
committed by GitHub
parent 4f3a271355
commit f2f0d466f2
17 changed files with 114 additions and 57 deletions

View File

@@ -0,0 +1,5 @@
class AddConfigToPortal < ActiveRecord::Migration[6.1]
def change
add_column :kbase_portals, :config, :jsonb, default: { allowed_locales: ['en'] }
end
end

View File

@@ -0,0 +1,7 @@
class AddLocaleToKbaseCategory < ActiveRecord::Migration[6.1]
def change
add_column :kbase_categories, :locale, :string, default: 'en'
add_index :kbase_categories, :locale
add_index :kbase_categories, [:locale, :account_id]
end
end

View File

@@ -507,6 +507,8 @@ ActiveRecord::Schema.define(version: 2022_04_18_094715) do
t.integer "position"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "locale", default: "en"
t.index ["locale", "account_id"], name: "index_kbase_categories_on_locale_and_account_id"
end
create_table "kbase_folders", force: :cascade do |t|
@@ -528,6 +530,7 @@ ActiveRecord::Schema.define(version: 2022_04_18_094715) do
t.text "header_text"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.jsonb "config", default: {"allowed_locales"=>["en"]}
t.index ["slug"], name: "index_kbase_portals_on_slug", unique: true
end