class CreateProblemSchema < ActiveRecord::Migration
  def change

    create_table :problems do |t|
      t.column :number,      :decimal, precision: 7, scale: 2
      t.column :chapter_id,  :integer
      t.column :title,       :string
      t.column :question,    :text
      t.column :solution_id, :integer
    end


    create_table :solutions do |t|
      t.column :problem_id,  :integer
      t.column :code,        :string
      t.column :explanation, :string
    end
  end
end
