[+] добавлены файлы миграций
This commit is contained in:
1 parent
c8374f1c7b
commit
1fb5f8382c
8 files changed
+264
No files matched your search
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Phinx\Migration\AbstractMigration;
|
||||
|
||||
final class UserMeta extends AbstractMigration
|
||||
{
|
||||
public function init(): void
|
||||
{
|
||||
$this->table = 'd_user_meta';
|
||||
}
|
||||
|
||||
public function change(): void
|
||||
{
|
||||
$table = $this->table($this->table);
|
||||
$table->addColumn('user_id', 'integer')
|
||||
->addColumn('name', 'string', ['limit' => 255, 'default' => null])
|
||||
->addColumn('value', 'text', ['default' => null])
|
||||
->addIndex(['user_id'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user