Sha256: 2af80c67f80b8bdaf4e29e7b1e380c824ffe2f7468db6010209b739677c6805c

Contents?: true

Size: 485 Bytes

Versions: 77

Compression:

Stored size: 485 Bytes

Contents

class CreateClassifications < ActiveRecord::Migration[4.2]
  def self.up
    create_table :classifications do |t|
      t.integer :parent_id
      t.string :category, null: false
      t.text :note
      t.integer :classification_type_id, null: false

      t.timestamps
    end
    add_index :classifications, :parent_id
    add_index :classifications, :category
    add_index :classifications, :classification_type_id
  end

  def self.down
    drop_table :classifications
  end
end

Version data entries

77 entries across 77 versions & 8 rubygems

Version Path
enju_biblio-0.3.18 spec/dummy/db/migrate/142_create_classifications.rb
enju_biblio-0.3.17 spec/dummy/db/migrate/142_create_classifications.rb
enju_biblio-0.3.16 spec/dummy/db/migrate/142_create_classifications.rb
enju_biblio-0.3.15 spec/dummy/db/migrate/142_create_classifications.rb
enju_library-0.3.11 spec/dummy/db/migrate/142_create_classifications.rb
enju_ndl-0.3.3 spec/dummy/db/migrate/142_create_classifications.rb
enju_nii-0.3.2 spec/dummy/db/migrate/142_create_classifications.rb
enju_subject-0.3.4 db/migrate/142_create_classifications.rb
enju_library-0.3.10 spec/dummy/db/migrate/142_create_classifications.rb
enju_biblio-0.3.14 spec/dummy/db/migrate/142_create_classifications.rb
enju_bookmark-0.3.2 spec/dummy/db/migrate/142_create_classifications.rb
enju_biblio-0.3.13 spec/dummy/db/migrate/142_create_classifications.rb
enju_biblio-0.3.12 spec/dummy/db/migrate/142_create_classifications.rb
enju_oai-0.3.1 spec/dummy/db/migrate/142_create_classifications.rb
enju_biblio-0.3.11 spec/dummy/db/migrate/142_create_classifications.rb
enju_library-0.3.9 spec/dummy/db/migrate/142_create_classifications.rb
enju_nii-0.3.1 spec/dummy/db/migrate/142_create_classifications.rb
enju_subject-0.3.3 db/migrate/142_create_classifications.rb
enju_biblio-0.3.10 spec/dummy/db/migrate/142_create_classifications.rb
enju_library-0.3.8 spec/dummy/db/migrate/142_create_classifications.rb