Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3a83d463

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

  • ID 3a83d463cbe5330668715fed59d02e8b0842fc78
  • Vorgänger 761f4a3f
  • Nachfolger b8c7ffdf

Titel von Ansprechpersonen in eigene Tabelle: DB-Upgrade und Rose

Unterschiede anzeigen:

SL/DB/ContactTitle.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::ContactTitle;
5

  
6
use strict;
7

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

  
11
__PACKAGE__->meta->initialize;
12

  
13
1;
SL/DB/Helper/ALL.pm
27 27
use SL::DB::Business;
28 28
use SL::DB::Chart;
29 29
use SL::DB::Contact;
30
use SL::DB::ContactTitle;
30 31
use SL::DB::CsvImportProfile;
31 32
use SL::DB::CsvImportProfileSetting;
32 33
use SL::DB::CsvImportReport;
SL/DB/Helper/Mappings.pm
110 110
  bin                            => 'bin',
111 111
  business                       => 'business',
112 112
  chart                          => 'chart',
113
  contact_titles                 => 'contact_title',
113 114
  contacts                       => 'contact',
114 115
  customer                       => 'customer',
115 116
  csv_import_profiles            => 'csv_import_profile',
SL/DB/Manager/ContactTitle.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::ContactTitle;
5

  
6
use strict;
7

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

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

  
12
__PACKAGE__->make_manager_methods;
13

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

  
5
use strict;
6

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

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

  
11
__PACKAGE__->meta->columns(
12
  description => { type => 'text', not_null => 1 },
13
  id          => { type => 'serial', not_null => 1 },
14
);
15

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

  
18
__PACKAGE__->meta->unique_keys([ 'description' ]);
19

  
20
1;
21
;
sql/Pg-upgrade2/contact_titles_own_table.sql
1
-- @tag: contact_titles_own_table
2
-- @description: Eigene Tabelle für Titel bei Ansprechpersonen
3
-- @depends: release_3_5_5
4

  
5
CREATE TABLE contact_titles (
6
  id          SERIAL,
7
  description TEXT      NOT NULL,
8
  PRIMARY KEY (id),
9
  UNIQUE (description)
10
);
11

  
12
UPDATE contacts SET cp_title = trim(cp_title) WHERE cp_title NOT LIKE trim(cp_title);
13

  
14
INSERT INTO contact_titles (description)
15
  SELECT DISTINCT cp_title FROM contacts WHERE cp_title IS NOT NULL AND cp_title NOT LIKE '' ORDER BY cp_title;

Auch abrufbar als: Unified diff