demo
demo copied to clipboard
SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: text
I just installed the fresh demo as per the instructions and got the following error after i login to the admin
Database Engine: Postgres
SQLSTATE[42883]: Undefined function: 7 ERROR: operator does not exist: text ->> unknown LINE 1: ...ifications"."notifiable_id" is not null and "data"->>'format... ^ HINT: No operator matches the given name and argument types. You might need to add explicit type casts.
I was able to reproduce this error by opting for PostgreSQL over the default SQLite.
In order to resolve you must modify database/migrations/2022_09_10_131605_create_notifications_table.php
public function up()
{
Schema::create('notifications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->jsonb('data'); //<-- Change type to jsonb from text
$table->timestamp('read_at')->nullable();
$table->timestamps();
});
}
Rerun your migrations and everything should work as expected
Thanks @zachsdevpit