<?php
use yii\db\Migration;
/**
* Class m190423_135654_add_archive_column_user_table
*/
class m190423_135654_add_archive_column_user_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->execute("ALTER TABLE `user`
ADD `archive` int(11) NULL;");
$this->execute("ALTER TABLE `user`
ADD `archive_сomment` text NULL;");
$this->execute("ALTER TABLE `user`
ADD `reason_archive` int(11) NULL;");
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
echo "m190423_135654_add_archive_column_user_table cannot be reverted.\n";
return false;
}
/*
// Use up()/down() to run migration code without a transaction.
public function up()
{
}
public function down()
{
echo "m190423_135654_add_archive_column_user_table cannot be reverted.\n";
return false;
}
*/
}
[42000][1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(PARTITION BY ticket.user_id ORDER BY ticket.created_at DESC) AS rn FROM ' at line 2