portal.mkgtu.ru/common/migrations/db/m151007_114924_add_session_...

23 lines
551 B
PHP
Raw Permalink Normal View History

2024-03-28 09:51:45 +03:00
<?php
use common\components\Migration\MigrationWithDefaultOptions;
class m151007_114924_add_session_table extends MigrationWithDefaultOptions
{
public function up()
{
$this->createTable('{{%session}}', [
'id' => $this->string(40)->notNull(),
'expire' => $this->integer()->defaultValue(null),
"data" => $this->binary(429496729),
]);
$this->addPrimaryKey('pk_session', '{{%session}}', 'id');
}
public function down()
{
$this->dropTable('{{%session}}');
}
}