feat(migration): add CN and alternative names to DB

This commit is contained in:
peaklabs-dev
2025-02-03 22:05:32 +01:00
parent 5f357e3d92
commit 498bf04559
2 changed files with 5 additions and 0 deletions

View File

@@ -12,7 +12,10 @@ class SslCertificate extends Model
'resource_type', 'resource_type',
'resource_id', 'resource_id',
'server_id', 'server_id',
'common_name',
'subject_alternative_names',
'valid_until', 'valid_until',
'is_ca_certificate',
]; ];
protected $casts = [ protected $casts = [

View File

@@ -15,6 +15,8 @@ return new class extends Migration
$table->string('resource_type')->nullable(); $table->string('resource_type')->nullable();
$table->unsignedBigInteger('resource_id')->nullable(); $table->unsignedBigInteger('resource_id')->nullable();
$table->unsignedBigInteger('server_id'); $table->unsignedBigInteger('server_id');
$table->text('common_name');
$table->text('subject_alternative_names')->nullable();
$table->timestamp('valid_until'); $table->timestamp('valid_until');
$table->boolean('is_ca_certificate')->default(false); $table->boolean('is_ca_certificate')->default(false);
$table->timestamps(); $table->timestamps();