Sha256: 2bd979b258eb87833e7a079517a68e01fe8db6f1df82ff3a68655ab0c91405f7

Contents?: true

Size: 456 Bytes

Versions: 68

Compression:

Stored size: 456 Bytes

Contents

class CreateSubjectHasClassifications < ActiveRecord::Migration
  def self.up
    create_table :subject_has_classifications do |t|
      t.references :subject, :polymorphic => true
      t.integer :classification_id, :null => false

      t.timestamps
    end
    add_index :subject_has_classifications, :subject_id
    add_index :subject_has_classifications, :classification_id
  end

  def self.down
    drop_table :subject_has_classifications
  end
end

Version data entries

68 entries across 68 versions & 5 rubygems

Version Path
enju_ndl-0.1.0.pre9 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.1.0.pre5 db/migrate/143_create_subject_has_classifications.rb
enju_nii-0.1.0.pre3 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_ndl-0.1.0.pre8 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_ndl-0.1.0.pre7 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_nii-0.1.0.pre2 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_nii-0.1.0.pre spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_ndl-0.1.0.pre6 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.1.0.pre4 db/migrate/143_create_subject_has_classifications.rb
enju_ndl-0.1.0.pre5 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.1.0.pre3 db/migrate/143_create_subject_has_classifications.rb
enju_ndl-0.1.0.pre4 spec/dummy/db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.1.0.pre2 db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.1.0.pre db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.0.18 db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.0.17 db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.0.16 db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.0.15 db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.0.14 db/migrate/143_create_subject_has_classifications.rb
enju_subject-0.0.13 db/migrate/143_create_subject_has_classifications.rb