Sha256: 5b810ecee58ea63c3d69b2c308706aa873f0c203ebafbf9858d92a4c92a16232

Contents?: true

Size: 372 Bytes

Versions: 10

Compression:

Stored size: 372 Bytes

Contents

class CreateEnrollmentsTable < ActiveRecord::Migration
  def change
    create_table :gaku_enrollments do |t|
      t.references :student
      t.references :enrollmentable, polymorphic: true
    end

    add_index :gaku_enrollments, :student_id
    add_index :gaku_enrollments, [:enrollmentable_id, :enrollmentable_type], name: :gaku_enrollments_enrollmentable
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gaku-0.2.4 core/db/migrate/20140423093155_create_enrollments_table.rb
gaku_core-0.2.4 db/migrate/20140423093155_create_enrollments_table.rb
gaku-0.2.3 core/db/migrate/20140423093155_create_enrollments_table.rb
gaku_core-0.2.3 db/migrate/20140423093155_create_enrollments_table.rb
gaku-0.2.2 core/db/migrate/20140423093155_create_enrollments_table.rb
gaku_core-0.2.2 db/migrate/20140423093155_create_enrollments_table.rb
gaku-0.2.1 core/db/migrate/20140423093155_create_enrollments_table.rb
gaku_core-0.2.1 db/migrate/20140423093155_create_enrollments_table.rb
gaku-0.2.0 core/db/migrate/20140423093155_create_enrollments_table.rb
gaku_core-0.2.0 db/migrate/20140423093155_create_enrollments_table.rb