tag:blogger.com,1999:blog-2858328690300381570.post3433762005246352627..comments2023-11-02T02:11:46.264-07:00Comments on eSpace: Update a newly added column in a migrationSamer El Sahnhttp://www.blogger.com/profile/07314985878394159062noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-2858328690300381570.post-72550777545639719372007-05-19T09:12:00.000-07:002007-05-19T09:12:00.000-07:00mmm. for optimization issues it should be:def self...mmm. for optimization issues it should be:<BR/>def self.up<BR/> add_column :file_types, :mime_type, :string, :default=>'video/quicktime'<BR/> FileType.reset_column_information<BR/>end<BR/><BR/>I don't think there was a need to find_by_name the FileTypes. Also, there was no need to iterate on the filetypes as long as the default value was constant and not an evaluated function.Ahmed Abd-ElHaffiez Husseinhttps://www.blogger.com/profile/09563341584184001660noreply@blogger.com