Sha256: da8eb1dd4bae73e745c8a9d39144bcad42224e88c6e850035f40d923bf82d25b

Contents?: true

Size: 961 Bytes

Versions: 2

Compression:

Stored size: 961 Bytes

Contents

class CreateSisCoreApplications < ActiveRecord::Migration[6.0]
  def change
    create_table :sis_core_applications do |t|
      t.string :full_name, null: false
      t.string :email, null: false
      t.integer :age, null: false
      t.string :gender, null: false
      t.string :nationality, null: false
      t.string :status, null: false, default: 'Draft'
      t.boolean :payment_made, null: false, default: false
      t.string :address
      t.string :payment_information
      t.date :application_date
      t.references :applicant,
                   null: false,
                   index: { name: 'applications_on_applicant_indx' },
                   foreign_key: { to_table: :sis_core_applicants }
      t.references :academic_programme,
                   null: false,
                   index: { name: 'applications_on_ap_indx' },
                   foreign_key: { to_table: :sis_core_academic_programmes }

      t.timestamps
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sis_core-1.0.5 db/migrate/20200107094449_create_sis_core_applications.rb
sis_core-1.0.4 db/migrate/20200107094449_create_sis_core_applications.rb