CDbCommand failed to execute the SQL statement: SQLSTATE[42S02]: Base table or view not found: 1146 Table '.authassignment'
Primary tabs
ошибка возникает как только мы добавили в конфигурацию:
/*настройки для работы с ролями пользователей*/ 'authManager'=>array( 'class'=>'CDbAuthManager', 'connectionID'=>'db', ),
возможно - есть какой-то умный способ автоматического создания таблиц (на основе файла-схемы), которые необходимы модулю, но
пока что я просто открыл файл =
\framework\web\auth\schema-mysql.sql
и в phpmyadmin выполнил команды взятые из этого файла:
drop table if exists `AuthAssignment`; drop table if exists `AuthItemChild`; drop table if exists `AuthItem`; create table `AuthItem` ( `name` varchar(64) not null, `type` integer not null, `description` text, `bizrule` text, `data` text, primary key (`name`) ) engine InnoDB; create table `AuthItemChild` ( `parent` varchar(64) not null, `child` varchar(64) not null, primary key (`parent`,`child`), foreign key (`parent`) references `AuthItem` (`name`) on delete cascade on update cascade, foreign key (`child`) references `AuthItem` (`name`) on delete cascade on update cascade ) engine InnoDB; create table `AuthAssignment` ( `itemname` varchar(64) not null, `userid` varchar(64) not null, `bizrule` text, `data` text, primary key (`itemname`,`userid`), foreign key (`itemname`) references `AuthItem` (`name`) on delete cascade on update cascade ) engine InnoDB;
- Log in to post comments
- 3581 reads