mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-22 15:13:59 -06:00
26 lines
644 B
PHP
26 lines
644 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Shlinkio\Shlink\Core;
|
|
|
|
use Doctrine\DBAL\Types\Type;
|
|
use Doctrine\ORM\Mapping\Builder\ClassMetadataBuilder;
|
|
use Doctrine\ORM\Mapping\ClassMetadata; // @codingStandardsIgnoreLine
|
|
|
|
/** @var $metadata ClassMetadata */ // @codingStandardsIgnoreLine
|
|
$builder = new ClassMetadataBuilder($metadata);
|
|
|
|
$builder->setTable('domains');
|
|
|
|
$builder->createField('id', Type::BIGINT)
|
|
->columnName('id')
|
|
->makePrimaryKey()
|
|
->generatedValue('IDENTITY')
|
|
->option('unsigned', true)
|
|
->build();
|
|
|
|
$builder->createField('authority', Type::STRING)
|
|
->unique()
|
|
->build();
|