Sources
This commit is contained in:
@ -20,13 +20,19 @@ final class CreateSources extends AbstractMigration
|
||||
{
|
||||
$this->table('sources', [
|
||||
'id' => false,
|
||||
'primary_key' => ['currency_id', 'url'],
|
||||
'primary_key' => ['id'],
|
||||
'engine' => 'InnoDB',
|
||||
'encoding' => 'utf8mb4',
|
||||
'collation' => 'utf8mb4_general_ci',
|
||||
'comment' => '',
|
||||
'row_format' => 'DYNAMIC',
|
||||
])
|
||||
->addColumn('id', 'integer', [
|
||||
'null' => false,
|
||||
'limit' => '10',
|
||||
'signed' => false,
|
||||
'identity' => 'enable',
|
||||
])
|
||||
->addColumn('currency_id', 'integer', [
|
||||
'null' => false,
|
||||
'limit' => '10',
|
||||
@ -47,6 +53,10 @@ final class CreateSources extends AbstractMigration
|
||||
'encoding' => 'utf8mb4',
|
||||
'after' => 'url',
|
||||
])
|
||||
->addIndex(['currency_id'], [
|
||||
'name' => 'currency_id',
|
||||
'unique' => false,
|
||||
])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user