aboutsummaryrefslogtreecommitdiff
path: root/db/schema.rb
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2020-10-08 16:51:30 +0200
committerhellekin <hellekin@cepheide.org>2020-10-08 16:59:33 +0200
commit8f691b566ffbc79f1d2d7a3f67d8607cc03a789c (patch)
treefb17d5bb8b725778fe24d8c9e685467ebb48da79 /db/schema.rb
parent46071bc467cd6d671c2cfe53ffe5d9eedcb96ae3 (diff)
downloadincommon-map-8f691b566ffbc79f1d2d7a3f67d8607cc03a789c.tar.gz
Add model foundation for classifications
Taxonomy > Category > Section This commit adds models for it. https://doc.incommon.cc/#classifications
Diffstat (limited to 'db/schema.rb')
-rw-r--r--db/schema.rb44
1 files changed, 43 insertions, 1 deletions
diff --git a/db/schema.rb b/db/schema.rb
index fbd0924..5a8bba7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2020_10_06_140511) do
+ActiveRecord::Schema.define(version: 2020_10_08_133300) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -35,6 +35,19 @@ ActiveRecord::Schema.define(version: 2020_10_06_140511) do
t.index ["uuid"], name: "index_agents_on_uuid", unique: true
end
+ create_table "categories", force: :cascade do |t|
+ t.string "name", limit: 64
+ t.string "summary", limit: 136
+ t.text "description"
+ t.bigint "taxonomy_id", null: false
+ t.string "color", limit: 25
+ t.integer "rank"
+ t.integer "sections_count", default: 0
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["taxonomy_id"], name: "index_categories_on_taxonomy_id"
+ end
+
create_table "resources", force: :cascade do |t|
t.uuid "uuid"
t.jsonb "feature"
@@ -45,6 +58,32 @@ ActiveRecord::Schema.define(version: 2020_10_06_140511) do
t.index ["uuid"], name: "index_resources_on_uuid", unique: true
end
+ create_table "sections", force: :cascade do |t|
+ t.string "name", limit: 64
+ t.string "summary", limit: 136
+ t.text "description"
+ t.bigint "category_id", null: false
+ t.string "color", limit: 25
+ t.integer "rank", default: 0
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["category_id"], name: "index_sections_on_category_id"
+ end
+
+ create_table "taxonomies", force: :cascade do |t|
+ t.string "name", limit: 64
+ t.string "summary", limit: 64
+ t.text "description"
+ t.uuid "uuid"
+ t.integer "categories_count", default: 0
+ t.bigint "agent_id", null: false
+ t.datetime "created_at", precision: 6, null: false
+ t.datetime "updated_at", precision: 6, null: false
+ t.index ["agent_id"], name: "index_taxonomies_on_agent_id"
+ t.index ["name"], name: "index_taxonomies_on_name", unique: true
+ t.index ["uuid"], name: "index_taxonomies_on_uuid", unique: true
+ end
+
create_table "users", force: :cascade do |t|
t.string "name"
t.string "username"
@@ -59,5 +98,8 @@ ActiveRecord::Schema.define(version: 2020_10_06_140511) do
add_foreign_key "agencies", "agents"
add_foreign_key "agencies", "users"
+ add_foreign_key "categories", "taxonomies"
add_foreign_key "resources", "agents"
+ add_foreign_key "sections", "categories"
+ add_foreign_key "taxonomies", "agents"
end