I'm trying to change the datatype one of my column. My migration to create table was:
public function up()
{
Schema::create('place_ratings', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('places_id');
$table->foreign('places_id')->references('id')->on('places');
$table->integer('rating');
$table->mediumText('comments');
$table->timestamps();
});
}
I want to change the datatype of rating table from integer
to float
. I already have some data in my table and I don't want to lose them. So, how can I do that?