Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CDbException
- CDbCommand failed to execute the SQL statement: 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 'COLLATE=' at line 8. The SQL statement executed was: CREATE TABLE `craft_matrixcontent_asdfsdfsdfasdf` (
- `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
- `elementId` INT(11) NOT NULL,
- `locale` CHAR(12) NOT NULL,
- `dateCreated` datetime NOT NULL,
- `dateUpdated` datetime NOT NULL,
- `uid` CHAR(36) NOT NULL DEFAULT 0
- ) ENGINE=InnoDb DEFAULT CHARSET= COLLATE=
- /sites/thales_website/craft/app/framework/db/CDbCommand.php(358)
- 346 {
- 347 if($this->_connection->enableProfiling)
- 348 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute');
- 349
- 350 $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
- 351 $message=$e->getMessage();
- 352 Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',
- 353 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
- 354
- 355 if(YII_DEBUG)
- 356 $message.='. The SQL statement executed was: '.$this->getText().$par;
- 357
- 358 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
- 359 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
- 360 }
- 361 }
- 362
- 363 /**
- 364 * Executes the SQL statement and returns query result.
- 365 * This method is for executing an SQL query that returns result set.
- 366 * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative
- 367 * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing
- 368 * them in this way can improve the performance. Note that if you pass parameters in this way,
- 369 * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.
- 370 * Please also note that all values are treated as strings in this case, if you need them to be handled as
- Stack Trace
- #0
- + /sites/thales_website/craft/app/framework/db/CDbCommand.php(1352): CDbCommand->execute()
- #1
- – /sites/thales_website/craft/app/etc/db/DbCommand.php(507): CDbCommand->createTable("craft_matrixcontent_asdfsdfsdfasdf", array("id" => "pk", "elementId" => "INT(11) NOT NULL", "locale" => "CHAR(12) NOT NULL", "dateCreated" => "datetime NOT NULL", ...), null)
- 502 {
- 503 $columns[$col] = DbHelper::generateColumnDefinition($settings);
- 504 }
- 505
- 506 // Create the table
- 507 return parent::createTable($table, $columns, $options);
- 508 }
- 509
- 510 /**
- 511 * @param $table
- 512 * @param $newName
- #2
- – /sites/thales_website/craft/app/services/MatrixService.php(1073): Craft\DbCommand->createTable("matrixcontent_asdfsdfsdfasdf", array("elementId" => array("column" => "integer", "null" => false), "locale" => array("column" => "locale", "null" => false)))
- 1068 private function _createContentTable($name)
- 1069 {
- 1070 craft()->db->createCommand()->createTable($name, array(
- 1071 'elementId' => array('column' => ColumnType::Int, 'null' => false),
- 1072 'locale' => array('column' => ColumnType::Locale, 'null' => false)
- 1073 ));
- 1074
- 1075 craft()->db->createCommand()->createIndex($name, 'elementId,locale', true);
- 1076 craft()->db->createCommand()->addForeignKey($name, 'elementId', 'elements', 'id', 'CASCADE', null);
- 1077 craft()->db->createCommand()->addForeignKey($name, 'locale', 'locales', 'locale', 'CASCADE', 'CASCADE');
- 1078 }
- #3
- – /sites/thales_website/craft/app/services/MatrixService.php(535): Craft\MatrixService->_createContentTable("matrixcontent_asdfsdfsdfasdf")
- 530 {
- 531 MigrationHelper::renameTable($oldContentTable, $newContentTable);
- 532 }
- 533 else
- 534 {
- 535 $this->_createContentTable($newContentTable);
- 536 }
- 537 }
- 538
- 539 // Delete the old block types first, in case there's a handle conflict with one of the new ones
- 540 $oldBlockTypes = $this->getBlockTypesByFieldId($matrixField->id);
- #4
- + /sites/thales_website/craft/app/fieldtypes/MatrixFieldType.php(152): Craft\MatrixService->saveSettings(Craft\MatrixSettingsModel, false)
- #5
- + /sites/thales_website/craft/app/services/FieldsService.php(646): Craft\MatrixFieldType->onAfterSave()
- #6
- + /sites/thales_website/craft/app/controllers/FieldsController.php(122): Craft\FieldsService->saveField(Craft\FieldModel)
- #7
- + /sites/thales_website/craft/app/framework/web/actions/CInlineAction.php(49): Craft\FieldsController->actionSaveField()
- #8
- + /sites/thales_website/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams(array("p" => "admin/settings/fields/new"))
- #9
- + /sites/thales_website/craft/app/framework/web/CController.php(286): CController->runAction(CInlineAction)
- #10
- + /sites/thales_website/craft/app/framework/web/CController.php(265): CController->runActionWithFilters(CInlineAction, array())
- #11
- + /sites/thales_website/craft/app/framework/web/CWebApplication.php(282): CController->run("saveField")
- #12
- + /sites/thales_website/craft/app/etc/web/WebApp.php(815): CWebApplication->runController("fields/saveField")
- #13
- + /sites/thales_website/craft/app/etc/web/WebApp.php(285): Craft\WebApp->_processActionRequest()
- #14
- + /sites/thales_website/craft/app/framework/base/CApplication.php(185): Craft\WebApp->processRequest()
- #15
- + /sites/thales_website/craft/app/index.php(62): CApplication->run()
- #16
- + /sites/thales_website/public/index.php(21): require_once("/sites/thales_website/craft/app/index.php")
- 2016-03-17 08:19:16 Apache/2.4.16 (Unix) PHP/5.6.17 / Craft 2.6.2776
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement