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