mirror of
https://github.com/elyby/accounts.git
synced 2024-12-05 21:19:04 +05:30
22 lines
579 B
PHP
22 lines
579 B
PHP
|
<?php
|
||
|
|
||
|
use console\db\Migration;
|
||
|
|
||
|
class m160422_230911_mojang_account_collisions extends Migration {
|
||
|
|
||
|
public function safeUp() {
|
||
|
$this->createTable('{{%mojang_usernames}}', [
|
||
|
'username' => $this->string()->notNull(),
|
||
|
'uuid' => $this->string(32)->notNull(),
|
||
|
'last_pulled_at' => $this->integer()->unsigned()->notNull(),
|
||
|
], $this->tableOptions);
|
||
|
|
||
|
$this->addPrimaryKey('username', '{{%mojang_usernames}}', 'username');
|
||
|
}
|
||
|
|
||
|
public function safeDown() {
|
||
|
$this->dropTable('{{%mojang_usernames}}');
|
||
|
}
|
||
|
|
||
|
}
|