Erstellt vor 10 Jahren
Zuletzt geändert vor 9 Jahren
#147 closed Fehler (wont-fix)
Update der Datenbank schlägt fehl
| Erstellt von: | s.mindorf@… | Verantwortlicher: | p.reetz@… |
|---|---|---|---|
| Priorität: | hoch | Meilenstein: | |
| Komponente: | kivitendo ERP | Version: | 2.1.1 |
| Schweregrad: | normal | Stichworte: | Migration |
| Beobachter: |
Beschreibung
Hallo,
Update über die alte installation entpackt und dann angemeldet, anschl.
tritt folgender Fehler auf:
Error!
alter table invoice drop column unitold
ERROR: parser: parse error at or near ""
System wurde autom. gesperrt.
Als Admin angemeldet und "Datenbank aktualisieren" gewählt alle Datenbanken
ausgewählt, anschl. selber Fehler.
System freigegeben, jetzt tritt folgender Fehler aus:
Upgrading Dataset lx-office ...
Error!
alter table customer add column department_1 varchar(75)
ERROR: ALTER TABLE: column name "department_1" already exists in table
"customer"
Gruß
Sören
Änderungshistorie (8)
comment:1 Geändert vor 10 Jahren durch p.reetz@…
comment:2 Geändert vor 10 Jahren durch s.mindorf@…
Versionsupdate von 2.0.1
psql --quiet -t -A -U postgres lx-office < Pg-upgrade-2.1.0-2.1.1.sql
ERROR: ALTER TABLE: column name "department_1" already exists in table
"customer"
ERROR: ALTER TABLE: column name "department_2" already exists in table
"customer"
ERROR: ALTER TABLE: column name "c_vendor_id" already exists in table
"customer"
ERROR: ALTER TABLE: column name "department_1" already exists in table "vendor"
ERROR: ALTER TABLE: column name "department_2" already exists in table "vendor"
ERROR: ALTER TABLE: column name "v_customer_id" already exists in table
"vendor"
ERROR: renameatt: attribute "unitold" exists
ERROR: ALTER TABLE: column name "unit" already exists in table "invoice"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
ERROR: parser: parse error at or near ";"
comment:3 Geändert vor 10 Jahren durch s.mindorf@…
Soll natürlich 2.1.0 heißen. ;)
comment:4 Geändert vor 10 Jahren durch p.reetz@…
Welche Distribution wird verwendet mit welcher Postgres-Version?
comment:5 Geändert vor 10 Jahren durch s.mindorf@…
Distribution: SuSE SLES 8
Version: postgresql-7.2.2
comment:6 Geändert vor 10 Jahren durch p.reetz@…
könntest du bitte die einzelnen SQL-Anweisungen mal separat auf eine neue
2.1.0 Datenbank loslassen.
Insbesondere die alter table statements scheinen probleme zu machen.
Eventuell liegt es an der alten Postgres-Version
comment:7 Geändert vor 10 Jahren durch s.mindorf@…
Ok, folgendes habe ich ausprobiert:
test-bug01=# alter table customer add column department_1 varchar(75);
ALTER
test-bug01=# alter table customer add column department_2 varchar(75);
ALTER
test-bug01=# alter table customer add column c_vendor_id text;
ALTER
test-bug01=# alter table vendor add column department_1 varchar(75);
ALTER
test-bug01=# alter table vendor add column department_2 varchar(75);
ALTER
test-bug01=# alter table vendor add column v_customer_id text;
ALTER
test-bug01=# alter table invoice rename column unit to unitold;
ALTER
test-bug01=# alter table invoice add column unit varchar(10);
ALTER
test-bug01=# update invoice set unit=unitold;
UPDATE 0
test-bug01=# alter table invoice drop column unitold;
ERROR: parser: parse error at or near ";"
test-bug01=# alter table orderitems rename column unit to unitold;
ALTER
test-bug01=# alter table orderitems add column unit varchar(10);
ALTER
test-bug01=# update orderitems set unit=unitold;
UPDATE 0
test-bug01=# alter table orderitems drop column unitold;
ERROR: parser: parse error at or near ";"
Gruß
Sören
comment:8 Geändert vor 10 Jahren durch p.reetz@…
Aus der Postgresql-Dokumentation:
SQL92 specifies some additional capabilities for ALTER TABLE statement
which are not yet directly supported by PostgreSQL:
ALTER TABLE table DROP [ COLUMN ] column { RESTRICT | CASCADE }
Eventuell hilft anlegen einer neuen Datenbank mit 2.1.1 und einspielen der
alten Daten oder Update auf Postgresql > 7.3.0

Kann die Datei manuell per psql eingespielt werden?
Von welcher Version wurde geupdatet?
2.0.2
2.1.0RC?
2.1.0