mirror of https://github.com/pixelfed/pixelfed
Fix Postgres backup connection and statuses nullability
parent
c002e6d466
commit
c381362b3a
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* 2018_08_12_042648_update_status_table_change_caption_to_text calls
|
||||
* `->change()` without `->nullable()`, making both columns NOT NULL.
|
||||
* DirectMessageController still writes null into caption, which errors
|
||||
* on PostgreSQL.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('statuses', function ($table) {
|
||||
$table->text('caption')->nullable()->change();
|
||||
$table->text('rendered')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue