[solved] extrange rbac console problem.

I have the following system console message:


C:\Projects\carlos\protected>yiic shell ../protected/config/main.php


Yii Interactive Tool v1.1 (based on Yii v1.1.6)

Please type 'help' for help. Type 'exit' to quit.

>> rbac

This command will create three roles: Owner, Member, and Reader and the followin

g premissions:

create, read, update and delete user

create, read, update and delete project

create, read, update and delete issue

Would you like to continue? [Yes|No] yes

exception 'CDbException' with message 'CDbCommand fall├│ al ejecutar la sentenci

a SQL: SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 10.0][SQL Server]El

 nombre de objeto 'AuthAssignment' no es válido.' in C:\Projects\yii-1.1.6

.r2877\framework\db\CDbCommand.php:316

Stack trace:

#0 C:\Projects\yii-1.1.6.r2877\framework\web\auth\CDbAuthManager.php(513):

 CDbCommand->execute()

#1 C:\Projects\yii-1.1.6.r2877\framework\web\auth\CDbAuthManager.php(503):

 CDbAuthManager->clearAuthAssignments()

#2 C:\Projects\carlos\protected\commands\shell\RbacCommand.php(41):

CDbAuthManager->clearAll()

#3 C:\Projects\yii-1.1.6.r2877\framework\cli\commands\ShellCommand.php(147

): RbacCommand->run(Array)

#4 C:\Projects\yii-1.1.6.r2877\framework\cli\commands\ShellCommand.php(99)

: ShellCommand->runShell()

#5 C:\Projects\yii-1.1.6.r2877\framework\console\CConsoleCommandRunner.php

(63): ShellCommand->run(Array)

#6 C:\Projects\yii-1.1.6.r2877\framework\console\CConsoleApplication.php(8

<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='8)' />: CConsoleCommandRunner->run(Array)

#7 C:\Projects\yii-1.1.6.r2877\framework\base\CApplication.php(155): CCons

oleApplication->processRequest()

#8 C:\Projects\yii-1.1.6.r2877\framework\yiic.php(33): CApplication->run()


#9 C:\Projects\carlos\protected\yiic.php(7): require_once('C:\Projec

ts\...')

#10 {main}

>>

I dont create the MS SQL DATABASE before run the rbac command, i attach the MS SQL SCRIPT to the RBAC DATABASES:




create table AuthItem (	

name varchar(64) not null,	

type integer not null,	

description text,	

bizrule text,	

data text,	

primary key (name) );  


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 no action on update no action );  


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 );  


create table Rights ( 	

itemname varchar(64) not null, 	

type integer not null, 	

weight integer not null, 	primary key (itemname), 	

foreign key (itemname) references AuthItem (name) on delete cascade on update cascade );



after to the db creation, the rbac command run perfect!