Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b99d067d

Von Jan Büren vor mehr als 2 Jahren hinzugefügt

  • ID b99d067d4b1cacc81fb8ce2505da23c160f9465b
  • Vorgänger 6587b90e
  • Nachfolger 7a778ade

Rose-DB OrderVersion - Hilfstabelle zum Versionisieren von Orders

Unterschiede anzeigen:

SL/DB/Helper/Mappings.pm
162 162
  notes                          => 'note',
163 163
  orderitems                     => 'order_item',
164 164
  oe                             => 'order',
165
  oe_version                     => 'order_version',
165 166
  parts                          => 'part',
166 167
  partsgroup                     => 'parts_group',
167 168
  part_classifications           => 'PartClassification',
SL/DB/Manager/OrderVersion.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::OrderVersion;
5

  
6
use strict;
7

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

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

  
12
__PACKAGE__->make_manager_methods;
13

  
14
1;
SL/DB/MetaSetup/OrderVersion.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::OrderVersion;
4

  
5
use strict;
6

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

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

  
11
__PACKAGE__->meta->columns(
12
  email_journal_id => { type => 'integer' },
13
  file_id          => { type => 'integer' },
14
  itime            => { type => 'timestamp', default => 'now()' },
15
  mtime            => { type => 'timestamp' },
16
  oe_id            => { type => 'integer', not_null => 1 },
17
  version          => { type => 'integer', not_null => 1 },
18
);
19

  
20
__PACKAGE__->meta->primary_key_columns([ 'oe_id', 'version' ]);
21

  
22
__PACKAGE__->meta->allow_inline_column_values(1);
23

  
24
__PACKAGE__->meta->foreign_keys(
25
  email_journal => {
26
    class       => 'SL::DB::EmailJournal',
27
    key_columns => { email_journal_id => 'id' },
28
  },
29

  
30
  file => {
31
    class       => 'SL::DB::File',
32
    key_columns => { file_id => 'id' },
33
  },
34

  
35
  oe => {
36
    class       => 'SL::DB::Order',
37
    key_columns => { oe_id => 'id' },
38
  },
39
);
40

  
41
1;
42
;
SL/DB/OrderVersion.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::OrderVersion;
5

  
6
use strict;
7

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

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
sql/Pg-upgrade2/oe_version.sql
1
-- @tag: oe_version
2
-- @description: Hilfstabelle für Versionierungen von Angeboten und Aufträgen
3
-- @depends: release_3_6_0
4
-- @ignore: 0
5
      CREATE TABLE oe_version (
6
        oe_id                   integer,
7
        version                 integer,
8
        email_journal_id        integer,
9
        file_id                 integer,
10
        itime                   TIMESTAMP      DEFAULT now(),
11
        mtime                   TIMESTAMP,
12
        PRIMARY KEY (oe_id, version),
13
        FOREIGN KEY (oe_id)                    REFERENCES oe (id),
14
        FOREIGN KEY (email_journal_id)         REFERENCES email_journal (id),
15
        FOREIGN KEY (file_id)                  REFERENCES files (id));

Auch abrufbar als: Unified diff