forked from scnu-socoding/scnuoj
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f7e48fc
commit 803156f
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
use yii\db\Migration; | ||
|
||
/** | ||
* Class m241114_082321_create_session | ||
*/ | ||
class m241114_082321_create_session extends Migration | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeUp() | ||
{ | ||
$this->createTable('session', [ | ||
'id' => $this->char(40)->notNull(), | ||
'expire' => $this->integer(), | ||
'data' => $this->binary(), | ||
]); | ||
$this->addPrimaryKey('pk_session_id', 'session', 'id'); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function safeDown() | ||
{ | ||
$this->dropTable('session'); | ||
} | ||
|
||
/* | ||
// Use up()/down() to run migration code without a transaction. | ||
public function up() | ||
{ | ||
} | ||
public function down() | ||
{ | ||
echo "m241114_082321_create_session cannot be reverted.\n"; | ||
return false; | ||
} | ||
*/ | ||
} |