yii2

Форк
1
/
schema-mysql.sql 
57 строк · 1.8 Кб
1
/**
2
 * Database schema required by \yii\rbac\DbManager.
3
 *
4
 * @author Qiang Xue <qiang.xue@gmail.com>
5
 * @author Alexander Kochetov <creocoder@gmail.com>
6
 * @link https://www.yiiframework.com/
7
 * @copyright 2008 Yii Software LLC
8
 * @license https://www.yiiframework.com/license/
9
 * @since 2.0
10
 */
11

12
drop table if exists `auth_assignment`;
13
drop table if exists `auth_item_child`;
14
drop table if exists `auth_item`;
15
drop table if exists `auth_rule`;
16

17
create table `auth_rule`
18
(
19
   `name`                 varchar(64) not null,
20
   `data`                 blob,
21
   `created_at`           integer,
22
   `updated_at`           integer,
23
    primary key (`name`)
24
) engine InnoDB;
25

26
create table `auth_item`
27
(
28
   `name`                 varchar(64) not null,
29
   `type`                 smallint not null,
30
   `description`          text,
31
   `rule_name`            varchar(64),
32
   `data`                 blob,
33
   `created_at`           integer,
34
   `updated_at`           integer,
35
   primary key (`name`),
36
   foreign key (`rule_name`) references `auth_rule` (`name`) on delete set null on update cascade,
37
   key `type` (`type`)
38
) engine InnoDB;
39

40
create table `auth_item_child`
41
(
42
   `parent`               varchar(64) not null,
43
   `child`                varchar(64) not null,
44
   primary key (`parent`, `child`),
45
   foreign key (`parent`) references `auth_item` (`name`) on delete cascade on update cascade,
46
   foreign key (`child`) references `auth_item` (`name`) on delete cascade on update cascade
47
) engine InnoDB;
48

49
create table `auth_assignment`
50
(
51
   `item_name`            varchar(64) not null,
52
   `user_id`              varchar(64) not null,
53
   `created_at`           integer,
54
   primary key (`item_name`, `user_id`),
55
   foreign key (`item_name`) references `auth_item` (`name`) on delete cascade on update cascade,
56
   key `auth_assignment_user_id_idx` (`user_id`)
57
) engine InnoDB;
58

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.