feat: Add nullable constraint to 'fingerprint' column in private_keys table
This commit is contained in:
@@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Models\PrivateKey;
|
||||||
use Illuminate\Database\Migrations\Migration;
|
use Illuminate\Database\Migrations\Migration;
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use App\Models\PrivateKey;
|
|
||||||
|
|
||||||
class AddSshKeyFingerprintToPrivateKeysTable extends Migration
|
class AddSshKeyFingerprintToPrivateKeysTable extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('private_keys', function (Blueprint $table) {
|
Schema::table('private_keys', function (Blueprint $table) {
|
||||||
$table->string('fingerprint')->after('private_key')->unique();
|
$table->string('fingerprint')->after('private_key')->nullable();
|
||||||
});
|
});
|
||||||
|
|
||||||
PrivateKey::whereNull('fingerprint')->each(function ($key) {
|
PrivateKey::whereNull('fingerprint')->each(function ($key) {
|
||||||
|
|||||||
Reference in New Issue
Block a user