mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-25 18:30:23 -06:00
Use named args to avoid passing default values for args
This commit is contained in:
parent
c91a534d1a
commit
c1e88c3e83
@ -30,7 +30,7 @@ return static function (ClassMetadata $metadata, array $emConfig): void {
|
||||
->build();
|
||||
|
||||
$builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class)
|
||||
->addJoinColumn('short_url_id', 'id', false, false, 'CASCADE')
|
||||
->addJoinColumn('short_url_id', 'id', nullable: false, onDelete: 'CASCADE')
|
||||
->build();
|
||||
|
||||
$builder->createManyToMany('conditions', RedirectRule\Entity\RedirectCondition::class)
|
||||
|
@ -36,6 +36,6 @@ return static function (ClassMetadata $metadata, array $emConfig): void {
|
||||
->build();
|
||||
|
||||
$builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class)
|
||||
->addJoinColumn('short_url_id', 'id', false, false, 'CASCADE')
|
||||
->addJoinColumn('short_url_id', 'id', nullable: false, onDelete: 'CASCADE')
|
||||
->build();
|
||||
};
|
||||
|
@ -76,18 +76,18 @@ return static function (ClassMetadata $metadata, array $emConfig): void {
|
||||
|
||||
$builder->createManyToMany('tags', Tag\Entity\Tag::class)
|
||||
->setJoinTable(determineTableName('short_urls_in_tags', $emConfig))
|
||||
->addInverseJoinColumn('tag_id', 'id', true, false, 'CASCADE')
|
||||
->addJoinColumn('short_url_id', 'id', true, false, 'CASCADE')
|
||||
->addInverseJoinColumn('tag_id', 'id', onDelete: 'CASCADE')
|
||||
->addJoinColumn('short_url_id', 'id', onDelete: 'CASCADE')
|
||||
->setOrderBy(['name' => 'ASC'])
|
||||
->build();
|
||||
|
||||
$builder->createManyToOne('domain', Domain\Entity\Domain::class)
|
||||
->addJoinColumn('domain_id', 'id', true, false, 'RESTRICT')
|
||||
->addJoinColumn('domain_id', 'id', onDelete: 'RESTRICT')
|
||||
->cascadePersist()
|
||||
->build();
|
||||
|
||||
$builder->createManyToOne('authorApiKey', ApiKey::class)
|
||||
->addJoinColumn('author_api_key_id', 'id', true, false, 'SET NULL')
|
||||
->addJoinColumn('author_api_key_id', 'id', onDelete: 'SET NULL')
|
||||
->build();
|
||||
|
||||
$builder->addUniqueConstraint(['short_code', 'domain_id'], 'unique_short_code_plus_domain');
|
||||
|
@ -49,11 +49,11 @@ return static function (ClassMetadata $metadata, array $emConfig): void {
|
||||
->build();
|
||||
|
||||
$builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class)
|
||||
->addJoinColumn('short_url_id', 'id', true, false, 'CASCADE')
|
||||
->addJoinColumn('short_url_id', 'id', onDelete: 'CASCADE')
|
||||
->build();
|
||||
|
||||
$builder->createManyToOne('visitLocation', Visit\Entity\VisitLocation::class)
|
||||
->addJoinColumn('visit_location_id', 'id', true, false, 'Set NULL')
|
||||
->addJoinColumn('visit_location_id', 'id', onDelete: 'Set NULL')
|
||||
->cascadePersist()
|
||||
->build();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user