CDbException

Die Tabelle "{{notifications}}" für die ActiveRecord-Klasse "UniqueNotification" kann nicht in der Datenbank gefunden werden.

/var/www/html/survey/framework/db/ar/CActiveRecord.php(2387)

2375 
2376     /**
2377      * Constructor.
2378      * @param CActiveRecord $model the model instance
2379      * @throws CDbException if specified table for active record class cannot be found in the database
2380      */
2381     public function __construct($model)
2382     {
2383         $this->_modelClassName=get_class($model);
2384 
2385         $tableName=$model->tableName();
2386         if(($table=$model->getDbConnection()->getSchema()->getTable($tableName))===null)
2387             throw new CDbException(Yii::t('yii','The table "{table}" for active record class "{class}" cannot be found in the database.',
2388                 array('{class}'=>$this->_modelClassName,'{table}'=>$tableName)));
2389                 
2390         if(($modelPk=$model->primaryKey())!==null || $table->primaryKey===null)
2391         {
2392             $table->primaryKey=$modelPk;
2393             if(is_string($table->primaryKey) && isset($table->columns[$table->primaryKey]))
2394                 $table->columns[$table->primaryKey]->isPrimaryKey=true;
2395             elseif(is_array($table->primaryKey))
2396             {
2397                 foreach($table->primaryKey as $name)
2398                 {
2399                     if(isset($table->columns[$name]))

Stack Trace

#2
+
 /var/www/html/survey/application/models/Notification.php(40): CActiveRecord->__construct()
35             return;
36         }
37         else
38         {
39             // Why not Zoidberg? (\/) (°,,,°) (\/)
40             parent::__construct();
41         }
42 
43         $options = $this->checkShortcuts($options);
44 
45         $this->checkMandatoryFields($options, array(
#3
+
 /var/www/html/survey/application/models/UniqueNotification.php(31): Notification->__construct(array("title" => "New update available (Current version: 170124)", "markAsNew" => false, "message" => "Ein Sicherheitsupdate steht zur Verfügung.<a href=/survey/index...", "user_id" => "1"))
26      * As parent constructor but with markAsUndread
27      * @return UniqueNotification
28      */
29     public function __construct($options = null)
30     {
31         parent::__construct($options);
32 
33         if (isset($options['markAsNew']))
34         {
35             $this->markAsNew = $options['markAsNew'];
36         }
#4
+
 /var/www/html/survey/application/models/UniqueNotification.php(97): UniqueNotification->__construct(array("title" => "New update available (Current version: 170124)", "markAsNew" => false, "message" => "Ein Sicherheitsupdate steht zur Verfügung.<a href=/survey/index...", "user_id" => "1"))
092             $users = User::model()->findAll();
093         }
094 
095         foreach ($users as $user) {
096             $options['user_id'] = $user->uid;
097             $not = new UniqueNotification($options);
098             $not->save();
099         }
100     }
101 }
2017-01-31 17:03:18 Apache/2.4.10 (Raspbian) Yii Framework/1.1.17