when update database ruby on rails it goes down code example
Example 1: ruby on rails db migrate
rails db:migrate
Example 2: update a database in ruby
def update
sql = <<-SQL
UPDATE dogs SET name = ?, breed = ? WHERE id = ?
SQL
DB[:conn].execute(sql, self.name, self.breed, self.id)
end