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