Sha256: 413d0306dce6c9d48f4ecdcd7ae5fdac6291b8095a7f56b8cc23e234e68e68dc

Contents?: true

Size: 1.51 KB

Versions: 2

Compression:

Stored size: 1.51 KB

Contents

class CreateAgents < ActiveRecord::Migration[4.2]
  def change
    create_table :agents do |t|
      t.string :last_name
      t.string :middle_name
      t.string :first_name
      t.string :last_name_transcription
      t.string :middle_name_transcription
      t.string :first_name_transcription
      t.string :corporate_name
      t.string :corporate_name_transcription
      t.string :full_name
      t.text :full_name_transcription
      t.text :full_name_alternative
      t.timestamps
      t.string :zip_code_1
      t.string :zip_code_2
      t.text :address_1
      t.text :address_2
      t.text :address_1_note
      t.text :address_2_note
      t.string :telephone_number_1
      t.string :telephone_number_2
      t.string :fax_number_1
      t.string :fax_number_2
      t.text :other_designation
      t.text :place
      t.string :postal_code
      t.text :street
      t.text :locality
      t.text :region
      t.datetime :date_of_birth
      t.datetime :date_of_death
      t.integer :language_id, default: 1, null: false
      t.integer :country_id, default: 1, null: false
      t.integer :agent_type_id, default: 1, null: false
      t.integer :lock_version, default: 0, null: false
      t.text :note
      t.integer :required_role_id, default: 1, null: false
      t.integer :required_score, default: 0, null: false
      t.text :email
      t.text :url
    end
    add_index :agents, :language_id
    add_index :agents, :country_id
    add_index :agents, :required_role_id
    add_index :agents, :full_name
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
enju_biblio-0.4.0.rc.1 db/migrate/001_create_agents.rb
enju_library-0.4.0.rc.1 spec/dummy/db/migrate/001_create_agents.rb