Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 68525bb1

Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt

  • ID 68525bb179b59bf35362e7a9e482bc17ebfd32c8
  • Vorgänger 19de3c72
  • Nachfolger 024d2c29

acc_trans enthält bereits eine Primärschlüsselspalte

Der war nur bisher noch nicht als solcher markiert.

Hinzu kommt, dass RDBO acc_trans_id beim Anlegen von Einträgen in
acc_trans nicht automatisch befüllt; genauer: explizit auf NULL
setzt. Das wiederum verwirrt andere Bereiche von Lx-Office.

Weiterhin gibt es einige Queries, die nicht darauf vorbereitet sind,
dass acc_trans plötzlich eine Spalte namens "id"
enthält (z.B. Reporting).

Unterschiede anzeigen:

SL/DB/MetaSetup/AccTransaction.pm
table => 'acc_trans',
columns => [
acc_trans_id => { type => 'bigint', sequence => 'acc_trans_id_seq' },
acc_trans_id => { type => 'bigint', not_null => 1, sequence => 'acc_trans_id_seq' },
trans_id => { type => 'integer', not_null => 1 },
chart_id => { type => 'integer', not_null => 1 },
amount => { type => 'numeric', precision => 5, scale => 15 },
......
taxkey => { type => 'integer' },
itime => { type => 'timestamp', default => 'now()' },
mtime => { type => 'timestamp' },
id => { type => 'integer', not_null => 1, sequence => 'acc_trans_id_seq1' },
],
primary_key_columns => [ 'id' ],
primary_key_columns => [ 'acc_trans_id' ],
allow_inline_column_values => 1,
sql/Pg-upgrade2/schema_normalization_3.sql
-- @tag: schema_normalization_3
-- @description: Datenbankschema Normalisierungen Teil 3
-- @depends: schema_normalization_2
ALTER TABLE acc_trans DROP COLUMN id;
ALTER TABLE acc_trans ADD PRIMARY KEY (acc_trans_id);

Auch abrufbar als: Unified diff