Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b8b112a3

Von Sven Schöling vor mehr als 11 Jahren hinzugefügt

  • ID b8b112a39bd601b0bc717646d78de470631da22a
  • Vorgänger c0931303
  • Nachfolger 2d7e4203

MetaSetup neu generiert

Unterschiede anzeigen:

SL/DB/MetaSetup/CustomVariable.pm
6 6

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

  
9
__PACKAGE__->meta->setup(
10
  table   => 'custom_variables',
11

  
12
  columns => [
13
    id              => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' },
14
    config_id       => { type => 'integer', not_null => 1 },
15
    trans_id        => { type => 'integer', not_null => 1 },
16
    bool_value      => { type => 'boolean' },
17
    timestamp_value => { type => 'timestamp' },
18
    text_value      => { type => 'text' },
19
    number_value    => { type => 'numeric', precision => 5, scale => 25 },
20
    itime           => { type => 'timestamp', default => 'now()' },
21
    mtime           => { type => 'timestamp' },
22
    sub_module      => { type => 'text', default => '', not_null => 1 },
23
  ],
24

  
25
  primary_key_columns => [ 'id' ],
26

  
27
  allow_inline_column_values => 1,
28

  
29
  foreign_keys => [
30
    config => {
31
      class       => 'SL::DB::CustomVariableConfig',
32
      key_columns => { config_id => 'id' },
33
    },
34
  ],
9
__PACKAGE__->meta->table('custom_variables');
10

  
11
__PACKAGE__->meta->columns(
12
  id              => { type => 'integer', not_null => 1, sequence => 'custom_variables_id' },
13
  config_id       => { type => 'integer', not_null => 1 },
14
  trans_id        => { type => 'integer', not_null => 1 },
15
  bool_value      => { type => 'boolean' },
16
  timestamp_value => { type => 'timestamp' },
17
  text_value      => { type => 'text' },
18
  number_value    => { type => 'numeric', precision => 5, scale => 25 },
19
  itime           => { type => 'timestamp', default => 'now()' },
20
  mtime           => { type => 'timestamp' },
21
  sub_module      => { type => 'text', default => '', not_null => 1 },
35 22
);
36 23

  
24
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
25

  
26
__PACKAGE__->meta->allow_inline_column_values(1);
27

  
28
__PACKAGE__->meta->foreign_keys(
29
  config => {
30
    class       => 'SL::DB::CustomVariableConfig',
31
    key_columns => { config_id => 'id' },
32
  },
33
);
34

  
35
# __PACKAGE__->meta->initialize;
36

  
37 37
1;
38 38
;

Auch abrufbar als: Unified diff