mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-22 08:56:42 -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();
|
->build();
|
||||||
|
|
||||||
$builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class)
|
$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();
|
->build();
|
||||||
|
|
||||||
$builder->createManyToMany('conditions', RedirectRule\Entity\RedirectCondition::class)
|
$builder->createManyToMany('conditions', RedirectRule\Entity\RedirectCondition::class)
|
||||||
|
@ -36,6 +36,6 @@ return static function (ClassMetadata $metadata, array $emConfig): void {
|
|||||||
->build();
|
->build();
|
||||||
|
|
||||||
$builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class)
|
$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();
|
->build();
|
||||||
};
|
};
|
||||||
|
@ -76,18 +76,18 @@ return static function (ClassMetadata $metadata, array $emConfig): void {
|
|||||||
|
|
||||||
$builder->createManyToMany('tags', Tag\Entity\Tag::class)
|
$builder->createManyToMany('tags', Tag\Entity\Tag::class)
|
||||||
->setJoinTable(determineTableName('short_urls_in_tags', $emConfig))
|
->setJoinTable(determineTableName('short_urls_in_tags', $emConfig))
|
||||||
->addInverseJoinColumn('tag_id', 'id', true, false, 'CASCADE')
|
->addInverseJoinColumn('tag_id', 'id', onDelete: 'CASCADE')
|
||||||
->addJoinColumn('short_url_id', 'id', true, false, 'CASCADE')
|
->addJoinColumn('short_url_id', 'id', onDelete: 'CASCADE')
|
||||||
->setOrderBy(['name' => 'ASC'])
|
->setOrderBy(['name' => 'ASC'])
|
||||||
->build();
|
->build();
|
||||||
|
|
||||||
$builder->createManyToOne('domain', Domain\Entity\Domain::class)
|
$builder->createManyToOne('domain', Domain\Entity\Domain::class)
|
||||||
->addJoinColumn('domain_id', 'id', true, false, 'RESTRICT')
|
->addJoinColumn('domain_id', 'id', onDelete: 'RESTRICT')
|
||||||
->cascadePersist()
|
->cascadePersist()
|
||||||
->build();
|
->build();
|
||||||
|
|
||||||
$builder->createManyToOne('authorApiKey', ApiKey::class)
|
$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();
|
->build();
|
||||||
|
|
||||||
$builder->addUniqueConstraint(['short_code', 'domain_id'], 'unique_short_code_plus_domain');
|
$builder->addUniqueConstraint(['short_code', 'domain_id'], 'unique_short_code_plus_domain');
|
||||||
|
@ -49,11 +49,11 @@ return static function (ClassMetadata $metadata, array $emConfig): void {
|
|||||||
->build();
|
->build();
|
||||||
|
|
||||||
$builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class)
|
$builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class)
|
||||||
->addJoinColumn('short_url_id', 'id', true, false, 'CASCADE')
|
->addJoinColumn('short_url_id', 'id', onDelete: 'CASCADE')
|
||||||
->build();
|
->build();
|
||||||
|
|
||||||
$builder->createManyToOne('visitLocation', Visit\Entity\VisitLocation::class)
|
$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()
|
->cascadePersist()
|
||||||
->build();
|
->build();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user