Feature: Knowledge Base APIs (#1002)
- Introduce models & migrations for portals, categories, folders and articles - CRUD API for portals - CRUD API for categories Addresses: #714 Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
17
db/migrate/20200704135408_create_kbase_portals.rb
Normal file
17
db/migrate/20200704135408_create_kbase_portals.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
class CreateKbasePortals < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :kbase_portals do |t|
|
||||
t.integer :account_id, null: false
|
||||
t.string :name, null: false
|
||||
t.string :slug, null: false
|
||||
t.string :custom_domain
|
||||
t.string :color
|
||||
t.string :homepage_link
|
||||
t.string :page_title
|
||||
t.text :header_text
|
||||
|
||||
t.index :slug, unique: true
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
13
db/migrate/20200704135810_create_kbase_categories.rb
Normal file
13
db/migrate/20200704135810_create_kbase_categories.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
class CreateKbaseCategories < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :kbase_categories do |t|
|
||||
t.integer :account_id, null: false
|
||||
t.integer :portal_id, null: false
|
||||
t.string :name
|
||||
t.text :description
|
||||
t.integer :position
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20200704140029_create_kbase_folders.rb
Normal file
11
db/migrate/20200704140029_create_kbase_folders.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateKbaseFolders < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :kbase_folders do |t|
|
||||
t.integer :account_id, null: false
|
||||
t.integer :category_id, null: false
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
18
db/migrate/20200704140509_create_kbase_articles.rb
Normal file
18
db/migrate/20200704140509_create_kbase_articles.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
class CreateKbaseArticles < ActiveRecord::Migration[6.0]
|
||||
def change
|
||||
create_table :kbase_articles do |t|
|
||||
t.integer :account_id, null: false
|
||||
t.integer :portal_id, null: false
|
||||
t.integer :category_id
|
||||
t.integer :folder_id
|
||||
t.integer :author_id
|
||||
t.string :title
|
||||
t.text :description
|
||||
t.text :content
|
||||
t.integer :status
|
||||
t.integer :views
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user