mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
DB field "todos.description" was type string, which defaults to length 255 in MySQL. Model allows field to be up to 300 characters, which could cause a DB error, if user saved a description of between 255 and 300 characters.
12 lines
246 B
Ruby
12 lines
246 B
Ruby
class ChangeTodoDescription < ActiveRecord::Migration[5.2]
|
|
def up
|
|
change_table :todos do |t|
|
|
t.change :description, :text
|
|
end
|
|
end
|
|
def down
|
|
change_table :todos do |t|
|
|
t.change :description, :string
|
|
end
|
|
end
|
|
end
|