Files
codeocean/db/migrate/20170205163247_create_exercise_collections.rb
2021-05-14 22:03:06 +02:00

16 lines
382 B
Ruby

# frozen_string_literal: true
class CreateExerciseCollections < ActiveRecord::Migration[4.2]
def change
create_table :exercise_collections do |t|
t.string :name
t.timestamps
end
create_table :exercise_collections_exercises, id: false do |t|
t.belongs_to :exercise_collection, index: true
t.belongs_to :exercise, index: true
end
end
end