Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6b353ee1

Von Cem Aydin vor fast 3 Jahren hinzugefügt

  • ID 6b353ee1ed1d405484609e02cbb8174e45641bd1
  • Vorgänger 86e54d7f
  • Nachfolger 3008f8b7

Swiss QR-Bill: Datenbankupgrade BankAccount

- Felder bank_account_id und use_for_qrbill hinzugefügt

Unterschiede anzeigen:

SL/DB/MetaSetup/BankAccount.pm
11 11
__PACKAGE__->meta->columns(
12 12
  account_number                  => { type => 'varchar', length => 100 },
13 13
  bank                            => { type => 'text' },
14
  bank_account_id                 => { type => 'varchar' },
14 15
  bank_code                       => { type => 'varchar', length => 100 },
15 16
  bic                             => { type => 'varchar', length => 100 },
16 17
  chart_id                        => { type => 'integer', not_null => 1 },
......
21 22
  reconciliation_starting_balance => { type => 'numeric', precision => 15, scale => 5 },
22 23
  reconciliation_starting_date    => { type => 'date' },
23 24
  sortkey                         => { type => 'integer', not_null => 1 },
25
  use_for_qrbill                  => { type => 'boolean', default => 'false', not_null => 1 },
24 26
  use_for_zugferd                 => { type => 'boolean', default => 'false', not_null => 1 },
25 27
);
26 28

  
sql/Pg-upgrade2/bank_account_informations_for_swiss_qrbill.sql
1
-- @tag: bank_account_information_for_swiss_qrbill
2
-- @description: Bankkonto Informationen für Swiss QR-Bill hinzufügen
3
-- @depends: release_3_5_6_1
4
ALTER TABLE bank_accounts ADD COLUMN use_for_qrbill BOOLEAN;
5
ALTER TABLE bank_accounts ADD COLUMN bank_account_id VARCHAR;
6

  
7
UPDATE bank_accounts SET use_for_qrbill = (
8
    SELECT COUNT(*)
9
    FROM bank_accounts
10
  ) = 1;
11

  
12
ALTER TABLE bank_accounts
13
  ALTER COLUMN use_for_qrbill SET DEFAULT FALSE,
14
  ALTER COLUMN use_for_qrbill SET NOT NULL;

Auch abrufbar als: Unified diff