Sha256: c7750b83db1abf5fa991c981699263e15ddff5a797f97deeda9795949ea9937b

Contents?: true

Size: 951 Bytes

Versions: 4

Compression:

Stored size: 951 Bytes

Contents

class CreateSisCoreIdentificationPatterns < ActiveRecord::Migration[6.0]
  def change
    create_table :sis_core_identification_patterns do |t|
      t.references :programme_level,
                   null: false,
                   index: { name: 'pl_on_ident_pttr' },
                   foreign_key: { to_table: :sis_core_lookups }
      t.references :programme_type,
                   null: false,
                   index: { name: 'pt_on_ident_pttr' },
                   foreign_key: { to_table: :sis_core_lookups }
      t.references :programme,
                   null: false,
                   index: { name: 'pr_on_ident_pttr' },
                   foreign_key: { to_table: :sis_core_programmes }
      t.string :id_pattern, null: false

      t.timestamps
    end
    add_index :sis_core_identification_patterns, %i[programme_id programme_level_id programme_type_id],
              unique: true, name: 'unq_cons_on_ident_pattern'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sis_core-1.0.20 db/migrate/20210504115132_create_sis_core_identification_patterns.rb
sis_core-1.0.19 db/migrate/20210504115132_create_sis_core_identification_patterns.rb
sis_core-1.0.18 db/migrate/20210504115132_create_sis_core_identification_patterns.rb
sis_core-1.0.17 db/migrate/20210504115132_create_sis_core_identification_patterns.rb