Sha256: d77254c2a8f6fe195941cd90764a21d5fc63f2350149e96098daa035bd5e5b8c

Contents?: true

Size: 839 Bytes

Versions: 1

Compression:

Stored size: 839 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 :work_has_subjects_count, :default => 0, :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

1 entries across 1 versions & 1 rubygems

Version Path
enju_trunk_subject-1.0.4 db/migrate/029_create_subjects.rb