1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/db/migrate/20210608082748_create_plan_categories.rb
2021-06-08 16:43:43 +02:00

15 lines
338 B
Ruby

# frozen_string_literal: true
# Allows to sort plans into categories
class CreatePlanCategories < ActiveRecord::Migration[5.2]
def change
create_table :plan_categories do |t|
t.string :name
t.integer :weight
t.timestamps
end
add_reference :plans, :plan_category, index: true, foreign_key: true
end
end