Commit 02ebb8ac authored by Mahmoud Aglan's avatar Mahmoud Aglan

Fix messaging_channels credentials column: jsonb -> text for encrypted data

PostgreSQL rejects encrypted (base64) strings in jsonb columns. The
encrypted:array cast produces non-JSON output that must be stored as text.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 00668114
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::table('messaging_channels', function (Blueprint $table) {
$table->text('credentials')->default('')->change();
});
}
public function down(): void
{
Schema::table('messaging_channels', function (Blueprint $table) {
$table->jsonb('credentials')->default('{}')->change();
});
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment