Sha256: a7deb18e0f0d70dbc849bc15c8bb5edeb34aa6bfe2885599bacdea71f4701ea5

Contents?: true

Size: 767 Bytes

Versions: 229

Compression:

Stored size: 767 Bytes

Contents

class CreateSubjects < ActiveRecord::Migration
  def self.up
    create_table :subjects do |t|
      t.integer :parent_id
      t.integer :use_term_id
      t.string :term
      t.text :term_transcription
      t.integer :subject_type_id, :null => false
      t.text :scope_note
      t.text :note
      t.integer :required_role_id, :default => 1, :null => false
      t.integer :lock_version, :default => 0, :null => false
      t.datetime :created_at
      t.datetime :updated_at
      t.datetime :deleted_at
    end
    add_index :subjects, :term
    add_index :subjects, :parent_id
    add_index :subjects, :use_term_id
    add_index :subjects, :subject_type_id
    add_index :subjects, :required_role_id
  end

  def self.down
    drop_table :subjects
  end
end

Version data entries

229 entries across 228 versions & 13 rubygems

Version Path
enju_oai-0.2.0.beta.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_flower-0.1.2 spec/dummy/db/migrate/029_create_subjects.rb
enju_nii-0.2.0.beta.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_ndl-0.2.0.beta.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_subject-0.2.0.beta.1 db/migrate/029_create_subjects.rb
enju_biblio-0.2.0.beta.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_biblio-0.1.3 spec/dummy/db/migrate/029_create_subjects.rb
enju_grid-0.1.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_oai-0.1.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_bookmark-0.1.3 spec/dummy/db/migrate/029_create_subjects.rb
enju_loc-0.1.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_nii-0.1.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_flower-0.1.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_biblio-0.1.2 spec/dummy/db/migrate/029_create_subjects.rb
enju_ndl-0.1.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_subject-0.1.1 db/migrate/029_create_subjects.rb
enju_flower-0.1.0 spec/dummy/db/migrate/029_create_subjects.rb
enju_biblio-0.1.1 spec/dummy/db/migrate/029_create_subjects.rb
enju_grid-0.1.0 spec/dummy/db/migrate/029_create_subjects.rb
enju_oai-0.1.0 spec/dummy/db/migrate/029_create_subjects.rb