Revision b8b112a3
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/MakeModel.pm | ||
---|---|---|
6 | 6 |
|
7 | 7 |
use base qw(SL::DB::Object); |
8 | 8 |
|
9 |
__PACKAGE__->meta->setup( |
|
10 |
table => 'makemodel', |
|
11 |
|
|
12 |
columns => [ |
|
13 |
parts_id => { type => 'integer' }, |
|
14 |
model => { type => 'text' }, |
|
15 |
itime => { type => 'timestamp', default => 'now()' }, |
|
16 |
mtime => { type => 'timestamp' }, |
|
17 |
lastcost => { type => 'numeric', precision => 5, scale => 15 }, |
|
18 |
lastupdate => { type => 'date' }, |
|
19 |
sortorder => { type => 'integer' }, |
|
20 |
make => { type => 'integer' }, |
|
21 |
id => { type => 'serial', not_null => 1 }, |
|
22 |
], |
|
23 |
|
|
24 |
primary_key_columns => [ 'id' ], |
|
25 |
|
|
26 |
allow_inline_column_values => 1, |
|
9 |
__PACKAGE__->meta->table('makemodel'); |
|
10 |
|
|
11 |
__PACKAGE__->meta->columns( |
|
12 |
parts_id => { type => 'integer' }, |
|
13 |
model => { type => 'text' }, |
|
14 |
itime => { type => 'timestamp', default => 'now()' }, |
|
15 |
mtime => { type => 'timestamp' }, |
|
16 |
make => { type => 'integer' }, |
|
17 |
id => { type => 'serial', not_null => 1 }, |
|
18 |
lastcost => { type => 'numeric', precision => 5, scale => 15 }, |
|
19 |
lastupdate => { type => 'date' }, |
|
20 |
sortorder => { type => 'integer' }, |
|
27 | 21 |
); |
28 | 22 |
|
23 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
|
24 |
|
|
25 |
__PACKAGE__->meta->allow_inline_column_values(1); |
|
26 |
|
|
27 |
# __PACKAGE__->meta->initialize; |
|
28 |
|
|
29 | 29 |
1; |
30 | 30 |
; |
Auch abrufbar als: Unified diff
MetaSetup neu generiert