Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a744a96d

Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt

  • ID a744a96d081cb94ec1b5640884493f42ef04ac17
  • Vorgänger a51e1869
  • Nachfolger 3a6ee9e9

Zeiterfassung: Auswählbare Artikel: DB-Upgrade und Rose

Unterschiede anzeigen:

SL/DB/Helper/ALL.pm
135 135
use SL::DB::TaxZone;
136 136
use SL::DB::TaxzoneChart;
137 137
use SL::DB::TimeRecording;
138
use SL::DB::TimeRecordingArticle;
138 139
use SL::DB::TodoUserConfig;
139 140
use SL::DB::TransferType;
140 141
use SL::DB::Translation;
SL/DB/Helper/Mappings.pm
214 214
  taxkeys                        => 'tax_key',
215 215
  tax_zones                      => 'tax_zone',
216 216
  taxzone_charts                 => 'taxzone_chart',
217
  time_recording_articles        => 'time_recording_article',
217 218
  time_recordings                => 'time_recording',
218 219
  todo_user_config               => 'todo_user_config',
219 220
  transfer_type                  => 'transfer_type',
SL/DB/Manager/TimeRecordingArticle.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::TimeRecordingArticle;
5

  
6
use strict;
7

  
8
use parent qw(SL::DB::Helper::Manager);
9

  
10
sub object_class { 'SL::DB::TimeRecordingArticle' }
11

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/MetaSetup/TimeRecording.pm
17 17
  id              => { type => 'serial', not_null => 1 },
18 18
  itime           => { type => 'timestamp', default => 'now()', not_null => 1 },
19 19
  mtime           => { type => 'timestamp', default => 'now()', not_null => 1 },
20
  part_id         => { type => 'integer' },
20 21
  payroll         => { type => 'boolean', default => 'false' },
21 22
  project_id      => { type => 'integer' },
22 23
  staff_member_id => { type => 'integer', not_null => 1 },
......
38 39
    key_columns => { employee_id => 'id' },
39 40
  },
40 41

  
42
  part => {
43
    class       => 'SL::DB::Part',
44
    key_columns => { part_id => 'id' },
45
  },
46

  
41 47
  project => {
42 48
    class       => 'SL::DB::Project',
43 49
    key_columns => { project_id => 'id' },
SL/DB/MetaSetup/TimeRecordingArticle.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::TimeRecordingArticle;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('time_recording_articles');
10

  
11
__PACKAGE__->meta->columns(
12
  id       => { type => 'serial', not_null => 1 },
13
  part_id  => { type => 'integer', not_null => 1 },
14
  position => { type => 'integer', not_null => 1 },
15
);
16

  
17
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
18

  
19
__PACKAGE__->meta->unique_keys([ 'part_id' ]);
20

  
21
__PACKAGE__->meta->foreign_keys(
22
  part => {
23
    class       => 'SL::DB::Part',
24
    key_columns => { part_id => 'id' },
25
    rel_type    => 'one to one',
26
  },
27
);
28

  
29
1;
30
;
SL/DB/TimeRecordingArticle.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::TimeRecordingArticle;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::TimeRecordingArticle;
9
use SL::DB::Manager::TimeRecordingArticle;
10

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
sql/Pg-upgrade2/time_recordings_articles.sql
1
-- @tag: time_recordings_articles
2
-- @description: Zeiterfassungs-Artikel
3
-- @depends: time_recordings
4

  
5
CREATE TABLE time_recording_articles (
6
  id                 SERIAL,
7
  part_id            INTEGER  REFERENCES parts(id) UNIQUE NOT NULL,
8
  position           INTEGER  NOT NULL,
9

  
10
  PRIMARY KEY (id)
11
);
12

  
13
ALTER TABLE time_recordings ADD COLUMN part_id INTEGER REFERENCES parts(id);

Auch abrufbar als: Unified diff