Revision 3eb3d1b1
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/Unit.pm | ||
---|---|---|
9 | 9 |
__PACKAGE__->meta->table('units'); |
10 | 10 |
|
11 | 11 |
__PACKAGE__->meta->columns( |
12 |
name => { type => 'varchar', length => 20, not_null => 1 }, |
|
13 | 12 |
base_unit => { type => 'varchar', length => 20 }, |
14 | 13 |
factor => { type => 'numeric', precision => 5, scale => 20 }, |
15 |
type => { type => 'varchar', length => 20 }, |
|
16 |
sortkey => { type => 'integer', not_null => 1 }, |
|
17 | 14 |
id => { type => 'serial', not_null => 1 }, |
15 |
name => { type => 'varchar', length => 20, not_null => 1 }, |
|
16 |
sortkey => { type => 'integer', not_null => 1 }, |
|
17 |
type => { type => 'varchar', length => 20 }, |
|
18 | 18 |
); |
19 | 19 |
|
20 | 20 |
__PACKAGE__->meta->primary_key_columns([ 'name' ]); |
... | ... | |
28 | 28 |
}, |
29 | 29 |
); |
30 | 30 |
|
31 |
# __PACKAGE__->meta->initialize; |
|
32 |
|
|
33 | 31 |
1; |
34 | 32 |
; |
Auch abrufbar als: Unified diff
MetaSetup: Spalten- und Fremdschlüsselnamen alphabetisch sortieren