views:

11

answers:

1

Suppose that I have a table Attendances (id(integer), login_date(date), login_time(time),logout_time (time)). Now I have to change the data type of logout_time from time to datetime. So how it can be possible in Migration ? Because i Tried this statement in new migration.

change_column(attendances, logout_time, time, datetime)

Please suggest me ???

Thanks

A: 

This is very basic question. Should try this

change_column :attendances, :logout_time, :datetime
Dinesh Atoliya
Really, this statement works.. Thanks
Rahul Patil