Make columns nullable in original migration

This commit is contained in:
Jonny Barnes 2022-10-24 21:10:48 +01:00
parent d801e6f3db
commit c95d7ed58d
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
2 changed files with 6 additions and 43 deletions

View file

@ -17,12 +17,12 @@ return new class extends Migration
$table->id(); $table->id();
$table->string('uid'); $table->string('uid');
$table->string('name'); $table->string('name');
$table->string('service_name'); $table->string('service_name')->nullable();
$table->string('service_url'); $table->string('service_url')->nullable();
$table->string('service_photo'); $table->string('service_photo')->nullable();
$table->string('user_name'); $table->string('user_name')->nullable();
$table->string('user_url'); $table->string('user_url')->nullable();
$table->string('user_photo'); $table->string('user_photo')->nullable();
$table->timestamps(); $table->timestamps();
}); });
} }

View file

@ -1,37 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('syndication_targets', function (Blueprint $table) {
$table->string('service_name')->nullable()->change();
$table->string('service_url')->nullable()->change();
$table->string('service_photo')->nullable()->change();
$table->string('user_name')->nullable()->change();
$table->string('user_url')->nullable()->change();
$table->string('user_photo')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('syndication_targets', function (Blueprint $table) {
//
});
}
};