I am new to PHP and laravel platform,need your help to resolve PDOException on run the migration task to alter table column type from number to string.
...
public function up()
{
Schema::table('BuildTable', function (Blueprint $table) {
$table->string('snapshot_id')->change();
});
}
....
getting PDOException on run the migration task
Doctrine\DBAL\Driver\PDOException::("SQLSTATE[0A000]: Feature not supported: 7 ERROR: unimplemented: type conversion from INT8 to VARCHAR(255) requires overwriting existing values which is not yet implemented
HINT: You have attempted to use a feature that is not yet implemented.
Existing table structure was created using
Schema::create(
$this->tablename,
function (Blueprint $table) {
$table->increments('id');
$table->integer('account_id')->unsigned();
$table->integer('snapshot_id')->unsigned();
$table->timestamps(6);
$table->softDeletes('deleted_at', 6)->default(null);
}
);
The existing table already have data in snapshot_id
Php version is 7.3.20 running on linux mint OS , Database - cockroachDB