pictcode_admin / app / Config / Schema / db_acl.sql @ 5ad38a95
履歴 | 表示 | アノテート | ダウンロード (1.56 KB)
1 | 5ad38a95 | spyder1211 | # $Id$
|
---|---|---|---|
2 | #
|
||
3 | # Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||
4 | #
|
||
5 | # Licensed under The MIT License
|
||
6 | # For full copyright and license information, please see the LICENSE.txt
|
||
7 | # Redistributions of files must retain the above copyright notice.
|
||
8 | # MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||
9 | |||
10 | CREATE TABLE acos ( |
||
11 | id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
||
12 | parent_id INTEGER(10) DEFAULT NULL, |
||
13 | model VARCHAR(255) DEFAULT '', |
||
14 | foreign_key INTEGER(10) UNSIGNED DEFAULT NULL, |
||
15 | alias VARCHAR(255) DEFAULT '', |
||
16 | lft INTEGER(10) DEFAULT NULL, |
||
17 | rght INTEGER(10) DEFAULT NULL, |
||
18 | PRIMARY KEY (id) |
||
19 | ); |
||
20 | |||
21 | CREATE TABLE aros_acos ( |
||
22 | id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
||
23 | aro_id INTEGER(10) UNSIGNED NOT NULL, |
||
24 | aco_id INTEGER(10) UNSIGNED NOT NULL, |
||
25 | _create CHAR(2) NOT NULL DEFAULT 0, |
||
26 | _read CHAR(2) NOT NULL DEFAULT 0, |
||
27 | _update CHAR(2) NOT NULL DEFAULT 0, |
||
28 | _delete CHAR(2) NOT NULL DEFAULT 0, |
||
29 | PRIMARY KEY(id) |
||
30 | ); |
||
31 | |||
32 | CREATE TABLE aros ( |
||
33 | id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, |
||
34 | parent_id INTEGER(10) DEFAULT NULL, |
||
35 | model VARCHAR(255) DEFAULT '', |
||
36 | foreign_key INTEGER(10) UNSIGNED DEFAULT NULL, |
||
37 | alias VARCHAR(255) DEFAULT '', |
||
38 | lft INTEGER(10) DEFAULT NULL, |
||
39 | rght INTEGER(10) DEFAULT NULL, |
||
40 | PRIMARY KEY (id) |
||
41 | ); |
||
42 | |||
43 | /* this indexes will improve acl perfomance */
|
||
44 | CREATE INDEX idx_acos_lft_rght ON `acos` (`lft`, `rght`); |
||
45 | |||
46 | CREATE INDEX idx_acos_alias ON `acos` (`alias`); |
||
47 | |||
48 | CREATE INDEX idx_aros_lft_rght ON `aros` (`lft`, `rght`); |
||
49 | |||
50 | CREATE INDEX idx_aros_alias ON `aros` (`alias`); |
||
51 | |||
52 | CREATE INDEX idx_aco_id ON `aros_acos` (`aco_id`); |