reevoo/sapience-rb

View on GitHub
test_apps/rails_3_2/db/migrate/20170202105223_create_todos.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true
class CreateTodos < ActiveRecord::Migration
  def change
    create_table :todos do |t|
      t.string :name, null: false
      t.belongs_to :list, null: false

      t.timestamps
    end

    add_index :todos, :list_id, name: "todos_on_list_id_idx"
  end
end