I stayed close to what the author did.
adding an index:
add_index :tags, :name
adding a null constraint: change_column :tags, :name, :string, null: false
validates :name, presence: true # for proper validations
https://github.com/localhostdotdev/bug/commit/3765237008c36c...