From 8f691b566ffbc79f1d2d7a3f67d8607cc03a789c Mon Sep 17 00:00:00 2001 From: hellekin Date: Thu, 8 Oct 2020 16:51:30 +0200 Subject: Add model foundation for classifications Taxonomy > Category > Section This commit adds models for it. https://doc.incommon.cc/#classifications --- db/migrate/20201008133300_create_sections.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 db/migrate/20201008133300_create_sections.rb (limited to 'db/migrate/20201008133300_create_sections.rb') diff --git a/db/migrate/20201008133300_create_sections.rb b/db/migrate/20201008133300_create_sections.rb new file mode 100644 index 0000000..c71c055 --- /dev/null +++ b/db/migrate/20201008133300_create_sections.rb @@ -0,0 +1,14 @@ +class CreateSections < ActiveRecord::Migration[6.0] + def change + create_table :sections do |t| + t.string :name, limit: 64 + t.string :summary, limit: 136 + t.text :description + t.references :category, null: false, foreign_key: true + t.string :color, limit: 25 + t.integer :rank, default: 0 + + t.timestamps + end + end +end -- cgit v1.2.3