Issue #46
This commit is contained in:
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000001_create_user_table extends Migration
|
class m000000_000001_create_user_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%user}}',
|
'{{%user}}',
|
||||||
@ -41,7 +41,7 @@ class m000000_000001_create_user_table extends Migration
|
|||||||
$this->createIndex('idx_user_email', '{{%user}}', 'email', true);
|
$this->createIndex('idx_user_email', '{{%user}}', 'email', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%user}}');
|
$this->dropTable('{{%user}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000002_create_profile_table extends Migration
|
class m000000_000002_create_profile_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%profile}}',
|
'{{%profile}}',
|
||||||
@ -39,7 +39,7 @@ class m000000_000002_create_profile_table extends Migration
|
|||||||
$this->addForeignKey('fk_profile_user', '{{%profile}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
$this->addForeignKey('fk_profile_user', '{{%profile}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%profile}}');
|
$this->dropTable('{{%profile}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000003_create_social_account_table extends Migration
|
class m000000_000003_create_social_account_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%social_account}}',
|
'{{%social_account}}',
|
||||||
@ -54,7 +54,7 @@ class m000000_000003_create_social_account_table extends Migration
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%social_account}}');
|
$this->dropTable('{{%social_account}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,7 +16,7 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000004_create_token_table extends Migration
|
class m000000_000004_create_token_table extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->createTable(
|
$this->createTable(
|
||||||
'{{%token}}',
|
'{{%token}}',
|
||||||
@ -36,7 +36,7 @@ class m000000_000004_create_token_table extends Migration
|
|||||||
$this->addForeignKey('fk_token_user', '{{%token}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
$this->addForeignKey('fk_token_user', '{{%token}}', 'user_id', '{{%user}}', 'id', 'CASCADE', $restrict);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropTable('{{%token}}');
|
$this->dropTable('{{%token}}');
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,12 +15,12 @@ use yii\db\Migration;
|
|||||||
|
|
||||||
class m000000_000005_add_last_login_at extends Migration
|
class m000000_000005_add_last_login_at extends Migration
|
||||||
{
|
{
|
||||||
public function up()
|
public function safeUp()
|
||||||
{
|
{
|
||||||
$this->addColumn('{{%user}}', 'last_login_at', $this->integer());
|
$this->addColumn('{{%user}}', 'last_login_at', $this->integer());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function down()
|
public function safeDown()
|
||||||
{
|
{
|
||||||
$this->dropColumn('{{%user}}', 'last_login_at');
|
$this->dropColumn('{{%user}}', 'last_login_at');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user