aboutsummaryrefslogtreecommitdiff
path: root/db/migrate/20201008133300_create_sections.rb
blob: c71c055a1b3e3f795685a2010e0da616416612cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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