class UpdateWorksFromArchitecture < ActiveRecord::Migration[8.1] def change change_table :works do |t| # Add defaults for boolean fields t.change_default :organized, false # Make title required t.change_null :title, false end # Add indexes as specified in architecture add_index :works, :title add_index :works, [:title, :year], unique: true add_index :works, :organized end end