Revision b8b112a3
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/AuthGroupRight.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'group_rights', |
|
11 |
schema => 'auth', |
|
12 |
|
|
13 |
columns => [ |
|
14 |
group_id => { type => 'integer', not_null => 1 }, |
|
15 |
right => { type => 'text', not_null => 1 }, |
|
16 |
granted => { type => 'boolean', not_null => 1 }, |
|
17 |
], |
|
18 |
|
|
19 |
primary_key_columns => [ 'group_id', 'right' ], |
|
20 |
|
|
21 |
foreign_keys => [ |
|
22 |
group => { |
|
23 |
class => 'SL::DB::AuthGroup', |
|
24 |
key_columns => { group_id => 'id' }, |
|
25 |
}, |
|
26 |
], |
|
9 |
__PACKAGE__->meta->table('group_rights'); |
|
10 |
__PACKAGE__->meta->schema('auth'); |
|
11 |
|
|
12 |
__PACKAGE__->meta->columns( |
|
13 |
group_id => { type => 'integer', not_null => 1 }, |
|
14 |
right => { type => 'text', not_null => 1 }, |
|
15 |
granted => { type => 'boolean', not_null => 1 }, |
|
27 | 16 |
); |
28 | 17 |
|
18 |
__PACKAGE__->meta->primary_key_columns([ 'group_id', 'right' ]); |
|
19 |
|
|
20 |
__PACKAGE__->meta->foreign_keys( |
|
21 |
group => { |
|
22 |
class => 'SL::DB::AuthGroup', |
|
23 |
key_columns => { group_id => 'id' }, |
|
24 |
}, |
|
25 |
); |
|
26 |
|
|
27 |
# __PACKAGE__->meta->initialize; |
|
28 |
|
|
29 | 29 |
1; |
30 | 30 |
; |
Auch abrufbar als: Unified diff
MetaSetup neu generiert