Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Cannot backup table with name group #12

Open
vv12131415 opened this issue Sep 30, 2017 · 0 comments
Open

[Bug] Cannot backup table with name group #12

vv12131415 opened this issue Sep 30, 2017 · 0 comments

Comments

@vv12131415
Copy link

cli exception looks like this

Exception 'yii\db\Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 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 'group' at line 1
The SQL being executed was: SHOW CREATE TABLE group'

in /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/db/Schema.php:636

Error Info:
Array
(
    [0] => 42000
    [1] => 1064
    [2] => 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 'group' at line 1
)

Stack trace:
#0 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/db/Command.php(930): yii\db\Schema->convertException(Object(PDOException), 'SHOW CREATE TAB...')
#1 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/db/Command.php(376): yii\db\Command->queryInternal('fetch', NULL)
#2 /home/vagrant/Code/linet-admin/vendor/spanjeta/yii2-backup/helpers/MysqlBackup.php(107): yii\db\Command->queryOne()
#3 /home/vagrant/Code/linet-admin/vendor/spanjeta/yii2-backup/commands/BackupController.php(46): spanjeta\modules\backup\helpers\MysqlBackup->getColumns('group')
#4 [internal function]: spanjeta\modules\backup\commands\BackupController->actionCreate()
#5 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#6 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/base/Controller.php(156): yii\base\InlineAction->runWithParams(Array)
#7 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/console/Controller.php(128): yii\base\Controller->runAction('create', Array)
#8 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/base/Module.php(523): yii\console\Controller->runAction('create', Array)
#9 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('backup/backup/c...', Array)
#10 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('backup/backup/c...', Array)
#11 /home/vagrant/Code/linet-admin/vendor/yiisoft/yii2/base/Application.php(380): yii\console\Application->handleRequest(Object(yii\console\Request))
#12 /home/vagrant/Code/linet-admin/yii(17): yii\base\Application->run()
#13 {main}

See
https://dev.mysql.com/doc/refman/5.5/en/keywords.html for reserved keywords

@vv12131415 vv12131415 changed the title [Bug] Cannot backup table with group [Bug] Cannot backup table with name group Sep 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant