schema-cubrid.sql 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * Database schema required by CDbAuthManager.
  3. *
  4. * @author Esen Sagynov <kadishmal@gmail.com>
  5. * @link http://www.yiiframework.com/
  6. * @copyright 2008 Yii Software LLC
  7. * @license http://www.yiiframework.com/license/
  8. * @since 1.1.14
  9. */
  10. drop table if exists `AuthAssignment`;
  11. drop table if exists `AuthItemChild`;
  12. drop table if exists `AuthItem`;
  13. create table `AuthItem`
  14. (
  15. `name` varchar(64) not null,
  16. `type` integer not null,
  17. `description` varchar(65535),
  18. `bizrule` varchar(65535),
  19. `data` string,
  20. primary key (`name`)
  21. );
  22. create table `AuthItemChild`
  23. (
  24. `parent` varchar(64) not null,
  25. `child` varchar(64) not null,
  26. primary key (`parent`,`child`),
  27. foreign key (`parent`) references `AuthItem` (`name`) on delete cascade on update restrict,
  28. foreign key (`child`) references `AuthItem` (`name`) on delete cascade on update restrict
  29. );
  30. create table `AuthAssignment`
  31. (
  32. `itemname` varchar(64) not null,
  33. `userid` varchar(64) not null,
  34. `bizrule` varchar(65535),
  35. `data` string,
  36. primary key (`itemname`,`userid`),
  37. foreign key (`itemname`) references `AuthItem` (`name`) on delete cascade on update restrict
  38. );