From 31850c6ca118b7828dbaa3ad1a87dab4287718f5 Mon Sep 17 00:00:00 2001 From: hellekin Date: Thu, 8 Oct 2020 22:10:41 +0200 Subject: Add categories, sections, and import data --- .../20201008184053_add_dewey_id_to_categories_and_sections.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 db/migrate/20201008184053_add_dewey_id_to_categories_and_sections.rb (limited to 'db/migrate/20201008184053_add_dewey_id_to_categories_and_sections.rb') diff --git a/db/migrate/20201008184053_add_dewey_id_to_categories_and_sections.rb b/db/migrate/20201008184053_add_dewey_id_to_categories_and_sections.rb new file mode 100644 index 0000000..d876b47 --- /dev/null +++ b/db/migrate/20201008184053_add_dewey_id_to_categories_and_sections.rb @@ -0,0 +1,8 @@ +class AddDeweyIdToCategoriesAndSections < ActiveRecord::Migration[6.0] + def change + add_column :categories, :dewey_id, :integer + add_column :sections, :dewey_id, :integer + add_index :categories, :dewey_id, unique: true + add_index :sections, :dewey_id, unique: true + end +end -- cgit v1.2.3