Revision 3eb3d1b1
Von Moritz Bunkus vor mehr als 11 Jahren hinzugefügt
SL/DB/MetaSetup/FollowUp.pm | ||
---|---|---|
9 | 9 |
__PACKAGE__->meta->table('follow_ups'); |
10 | 10 |
|
11 | 11 |
__PACKAGE__->meta->columns( |
12 |
id => { type => 'integer', not_null => 1, sequence => 'follow_up_id' }, |
|
13 |
follow_up_date => { type => 'date', not_null => 1 }, |
|
12 |
created_by => { type => 'integer', not_null => 1 }, |
|
14 | 13 |
created_for_user => { type => 'integer', not_null => 1 }, |
15 | 14 |
done => { type => 'boolean', default => 'false' }, |
16 |
note_id => { type => 'integer', not_null => 1 },
|
|
17 |
created_by => { type => 'integer', not_null => 1 },
|
|
15 |
follow_up_date => { type => 'date', not_null => 1 },
|
|
16 |
id => { type => 'integer', not_null => 1, sequence => 'follow_up_id' },
|
|
18 | 17 |
itime => { type => 'timestamp', default => 'now()' }, |
19 | 18 |
mtime => { type => 'timestamp' }, |
19 |
note_id => { type => 'integer', not_null => 1 }, |
|
20 | 20 |
); |
21 | 21 |
|
22 | 22 |
__PACKAGE__->meta->primary_key_columns([ 'id' ]); |
... | ... | |
26 | 26 |
__PACKAGE__->meta->foreign_keys( |
27 | 27 |
employee => { |
28 | 28 |
class => 'SL::DB::Employee', |
29 |
key_columns => { created_for_user => 'id' },
|
|
29 |
key_columns => { created_by => 'id' },
|
|
30 | 30 |
}, |
31 | 31 |
|
32 | 32 |
employee_obj => { |
33 | 33 |
class => 'SL::DB::Employee', |
34 |
key_columns => { created_by => 'id' },
|
|
34 |
key_columns => { created_for_user => 'id' },
|
|
35 | 35 |
}, |
36 | 36 |
|
37 | 37 |
note => { |
... | ... | |
40 | 40 |
}, |
41 | 41 |
); |
42 | 42 |
|
43 |
# __PACKAGE__->meta->initialize; |
|
44 |
|
|
45 | 43 |
1; |
46 | 44 |
; |
Auch abrufbar als: Unified diff
MetaSetup: Spalten- und Fremdschlüsselnamen alphabetisch sortieren