diff options
author | hellekin <hellekin@cepheide.org> | 2020-10-08 16:51:30 +0200 |
---|---|---|
committer | hellekin <hellekin@cepheide.org> | 2020-10-08 16:59:33 +0200 |
commit | 8f691b566ffbc79f1d2d7a3f67d8607cc03a789c (patch) | |
tree | fb17d5bb8b725778fe24d8c9e685467ebb48da79 /db/migrate/20201008132731_create_categories.rb | |
parent | 46071bc467cd6d671c2cfe53ffe5d9eedcb96ae3 (diff) | |
download | incommon-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/migrate/20201008132731_create_categories.rb')
-rw-r--r-- | db/migrate/20201008132731_create_categories.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20201008132731_create_categories.rb b/db/migrate/20201008132731_create_categories.rb new file mode 100644 index 0000000..eb5a6fa --- /dev/null +++ b/db/migrate/20201008132731_create_categories.rb @@ -0,0 +1,15 @@ +class CreateCategories < ActiveRecord::Migration[6.0] + def change + create_table :categories do |t| + t.string :name, limit: 64 + t.string :summary, limit: 136 + t.text :description + t.references :taxonomy, null: false, foreign_key: true + t.string :color, limit: 25 + t.integer :rank + t.integer :sections_count, default: 0 + + t.timestamps + end + end +end |