mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
chore: unique
This commit is contained in:
parent
08d46bc242
commit
0308d36e41
3 changed files with 2 additions and 7 deletions
|
|
@ -8,7 +8,7 @@ use Livewire\Component;
|
|||
|
||||
class Create extends Component
|
||||
{
|
||||
#[Validate('required|string|max:255')]
|
||||
#[Validate('required|string|max:255|unique:docker_registries,name')]
|
||||
public string $name = '';
|
||||
|
||||
#[Validate('required|string')]
|
||||
|
|
|
|||
|
|
@ -25,9 +25,4 @@ class DockerRegistry extends Model
|
|||
'custom' => 'Custom Registry'
|
||||
];
|
||||
}
|
||||
|
||||
public function applications(): HasMany
|
||||
{
|
||||
return $this->hasMany(Application::class, 'docker_registry_id', 'id');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ return new class extends Migration {
|
|||
{
|
||||
Schema::create('docker_registries', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('name')->unique();
|
||||
$table->string('type'); // docker_hub, gcr, ghcr, quay, custom
|
||||
$table->string('url')->nullable();
|
||||
$table->string('username')->nullable();
|
||||
|
|
|
|||
Loading…
Reference in a new issue