You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

13 lines
363 B

class CreateDoctrineSubjects < ActiveRecord::Migration[6.1]
def change
create_table :doctrine_subjects do |t|
t.references :doctrine, null: false
t.references :subject, null: false
t.integer :rank, null: false, default: 1
t.timestamps
end
add_index :doctrine_subjects, %i[doctrine_id subject_id], unique: true
end
end