Today is a small and boring topic. I decide to add more fields to my models. But since I decided to describe all my steps, I don’t want to skip anything.

I created new migrations

class AddMoreFieldsToBikes < ActiveRecord::Migration[7.0]
  def change
    add_column :bikes, :brand, :string
    add_column :bikes, :model, :string
    add_column :bikes, :weight, :float
    add_column :bikes, :notes, :text
  end
end
class AddMoreFieldsToBikes < ActiveRecord::Migration[7.0]
  def change
    add_column :bikes, :brand, :string
    add_column :bikes, :model, :string
    add_column :bikes, :weight, :float
    add_column :bikes, :notes, :text
  end
end
class RemoveDescriptionFromComponents < ActiveRecord::Migration[7.0]
  def change
    remove_column :components, :description
  end
end

And I aligned everything in my code into these changes. Controllers, contracts, models, repositories, everything affect into this change. Especialy tests. I still don’t keep track distance of any elements, but right now it represents what I want to keep in my database. I don’t want to describe too much what I did, you can see my changes on github.