1 2 3 4 5 6 7 8 9 10 11 12
class CreateAgents < ActiveRecord::Migration[6.0] def change create_table :agents do |t| t.string :name t.uuid :uuid t.timestamps end add_index :agents, [:name], unique: true add_index :agents, [:uuid], unique: true end end