Episodes
Olaoluwa Afolabi said about 3 years ago on Working with Large Data :
Okay, so something like this will do: ``` class CreateEntries < ActiveRecord::Migration[6.0] def change create_table :entries, primary_key: :user_id, id: false do |t| t.bigint :user_id, null: false, foreign_key: true t.string :purpose, null: false t.datetime :time_in t.datetime :time_out t.timestamps end add_index :entries, %i[user_id purpose time_in time_out] end end ```