__PACKAGE__->meta->columns(
account_number => { type => 'varchar', length => 100 },
bank => { type => 'text' },
+ bank_account_id => { type => 'varchar' },
bank_code => { type => 'varchar', length => 100 },
bic => { type => 'varchar', length => 100 },
chart_id => { type => 'integer', not_null => 1 },
reconciliation_starting_balance => { type => 'numeric', precision => 15, scale => 5 },
reconciliation_starting_date => { type => 'date' },
sortkey => { type => 'integer', not_null => 1 },
+ use_for_qrbill => { type => 'boolean', default => 'false', not_null => 1 },
use_for_zugferd => { type => 'boolean', default => 'false', not_null => 1 },
);
--- /dev/null
+-- @tag: bank_account_information_for_swiss_qrbill
+-- @description: Bankkonto Informationen für Swiss QR-Bill hinzufügen
+-- @depends: release_3_5_6_1
+ALTER TABLE bank_accounts ADD COLUMN use_for_qrbill BOOLEAN;
+ALTER TABLE bank_accounts ADD COLUMN bank_account_id VARCHAR;
+
+UPDATE bank_accounts SET use_for_qrbill = (
+ SELECT COUNT(*)
+ FROM bank_accounts
+ ) = 1;
+
+ALTER TABLE bank_accounts
+ ALTER COLUMN use_for_qrbill SET DEFAULT FALSE,
+ ALTER COLUMN use_for_qrbill SET NOT NULL;