Revision 3eb3d1b1
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/Employee.pm | ||
---|---|---|
9 | 9 |
__PACKAGE__->meta->table('employee'); |
10 | 10 |
|
11 | 11 |
__PACKAGE__->meta->columns( |
12 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
13 |
login => { type => 'text' }, |
|
14 |
startdate => { type => 'date', default => 'now' }, |
|
15 |
enddate => { type => 'date' }, |
|
16 |
notes => { type => 'text' }, |
|
17 |
sales => { type => 'boolean', default => 'true' }, |
|
18 |
itime => { type => 'timestamp', default => 'now()' }, |
|
19 |
mtime => { type => 'timestamp' }, |
|
20 |
name => { type => 'text' }, |
|
21 | 12 |
addr1 => { type => 'text' }, |
22 | 13 |
addr2 => { type => 'text' }, |
23 | 14 |
addr3 => { type => 'text' }, |
24 | 15 |
addr4 => { type => 'text' }, |
16 |
deleted => { type => 'boolean', default => 'false' }, |
|
17 |
enddate => { type => 'date' }, |
|
25 | 18 |
homephone => { type => 'text' }, |
19 |
id => { type => 'integer', not_null => 1, sequence => 'id' }, |
|
20 |
itime => { type => 'timestamp', default => 'now()' }, |
|
21 |
login => { type => 'text' }, |
|
22 |
mtime => { type => 'timestamp' }, |
|
23 |
name => { type => 'text' }, |
|
24 |
notes => { type => 'text' }, |
|
25 |
sales => { type => 'boolean', default => 'true' }, |
|
26 |
startdate => { type => 'date', default => 'now' }, |
|
26 | 27 |
workphone => { type => 'text' }, |
27 |
deleted => { type => 'boolean', default => 'false' }, |
|
28 | 28 |
); |
29 | 29 |
|
30 | 30 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
... | ... | |
33 | 33 |
|
34 | 34 |
__PACKAGE__->meta->allow_inline_column_values(1); |
35 | 35 |
|
36 |
# __PACKAGE__->meta->initialize; |
|
37 |
|
|
38 | 36 |
1; |
39 | 37 |
; |
Auch abrufbar als: Unified diff
MetaSetup: Spalten- und Fremdschlüsselnamen alphabetisch sortieren