Migrations for sources
This commit is contained in:
@ -43,7 +43,7 @@ class CreateValues extends Phinx\Migration\AbstractMigration
|
|||||||
'unique' => false,
|
'unique' => false,
|
||||||
])
|
])
|
||||||
->create();
|
->create();
|
||||||
$this->table('currencies', [
|
/*$this->table('currencies', [
|
||||||
'id' => false,
|
'id' => false,
|
||||||
'primary_key' => ['id'],
|
'primary_key' => ['id'],
|
||||||
'engine' => 'InnoDB',
|
'engine' => 'InnoDB',
|
||||||
@ -72,6 +72,6 @@ class CreateValues extends Phinx\Migration\AbstractMigration
|
|||||||
'encoding' => 'utf8mb4',
|
'encoding' => 'utf8mb4',
|
||||||
'after' => 'code',
|
'after' => 'code',
|
||||||
])
|
])
|
||||||
->create();
|
->create();*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
58
db/migrations/20210320020631_create_sources.php
Normal file
58
db/migrations/20210320020631_create_sources.php
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class CreateSources extends AbstractMigration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Change Method.
|
||||||
|
*
|
||||||
|
* Write your reversible migrations using this method.
|
||||||
|
*
|
||||||
|
* More information on writing migrations is available here:
|
||||||
|
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
|
||||||
|
*
|
||||||
|
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||||
|
* with the Table class.
|
||||||
|
*/
|
||||||
|
public function change(): void
|
||||||
|
{
|
||||||
|
$this->table('sources', [
|
||||||
|
'id' => false,
|
||||||
|
'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',
|
||||||
|
'signed' => false,
|
||||||
|
'after' => 'id',
|
||||||
|
])
|
||||||
|
->addColumn('url', 'string', [
|
||||||
|
'null' => false,
|
||||||
|
'limit' => 255,
|
||||||
|
'collation' => 'utf8mb4_general_ci',
|
||||||
|
'encoding' => 'utf8mb4',
|
||||||
|
'after' => 'currency_id',
|
||||||
|
])
|
||||||
|
->addColumn('frecuency', 'string', [
|
||||||
|
'null' => false,
|
||||||
|
'limit' => 100,
|
||||||
|
'collation' => 'utf8mb4_general_ci',
|
||||||
|
'encoding' => 'utf8mb4',
|
||||||
|
'after' => 'url',
|
||||||
|
])
|
||||||
|
->create();
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user