yii2

Форк
1
/
schema-oci.sql 
60 строк · 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 "auth_assignment";
13
drop table "auth_item_child";
14
drop table "auth_item";
15
drop table "auth_rule";
16

17
-- create new auth_rule table
18
create table "auth_rule"
19
(
20
   "name"  varchar(64) not null,
21
   "data"  BYTEA,
22
   "created_at"           integer,
23
   "updated_at"           integer,
24
    primary key ("name")
25
);
26

27
-- create auth_item table
28
create table "auth_item"
29
(
30
   "name"                 varchar(64) not null,
31
   "type"                 smallint not null,
32
   "description"          varchar(1000),
33
   "rule_name"            varchar(64),
34
   "data"                 BYTEA,
35
   "updated_at"           integer,
36
        foreign key ("rule_name") references "auth_rule"("name") on delete set null,
37
        primary key ("name")
38
);
39
-- adds oracle specific index to auth_item
40
CREATE INDEX auth_type_index ON "auth_item"("type");
41

42
create table "auth_item_child"
43
(
44
   "parent"               varchar(64) not null,
45
   "child"                varchar(64) not null,
46
   primary key ("parent","child"),
47
   foreign key ("parent") references "auth_item"("name") on delete cascade,
48
   foreign key ("child") references "auth_item"("name") on delete cascade
49
);
50

51
create table "auth_assignment"
52
(
53
   "item_name"            varchar(64) not null,
54
   "user_id"              varchar(64) not null,
55
   "created_at"           integer,
56
   primary key ("item_name","user_id"),
57
   foreign key ("item_name") references "auth_item" ("name") on delete cascade
58
);
59

60
CREATE INDEX auth_assignment_user_id_idx ON "auth_assignment" ("user_id");
61

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

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

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

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