[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: upgrade from sql-ledger 2.8
- Subject: Re: upgrade from sql-ledger 2.8
- From: Maanus Kask <..hidden..>
- Date: Wed, 11 Mar 2009 09:23:37 +0200
On Mon, 9 Mar 2009 07:20:31 -0800
Chris Travers <..hidden..> wrote:
> something like:
> ALTER TABLE customers RENAME TO sl_customers;
>
> SELECT [column_list] INTO customers c join address a on (c.id =
> a.trans_id); The column list should match the columns in
> sql/Pg-database.sql of the LSMB instance.
I completed my first SELECT clause :-) I ended up with:
ALTER TABLE customer RENAME TO sl_customers;
SELECT sl_customers.id, name, address1, address2, city, state, zipcode, country, contact, phone, fax, email, notes, discount, taxincluded, creditlimit, terms, customernumber, cc, bcc, business_id, taxnumber, sic_code, iban, bic, employee_id, language_code, pricegroup_id, curr, startdate, enddate INTO customer FROM sl_customers join address on (sl_customers.id = address.trans_id);
In the beginning it complained "column reference "id" is ambiguous", so I
added sl_customers to it, would that be correct?
> sql/legacy/
>
> I would run them starting at the upgrade script from 2.6.16
ok the script Pg-upgrade-2.6.12-2.6.17.sql gives me:
-------------
CREATE SEQUENCE
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "session_pkey" for table "session"
CREATE TABLE
ERROR: column "chart_id" contains null values
ALTER TABLE
UPDATE 12586
ALTER TABLE
ALTER TABLE
ERROR: column "version" of relation "defaults" does not exist
-------------
chart_id indeed contains NULL's. What is this acc_trans and what
can I do with NULL values?
pg_dump shows me that there is a row with:
INSERT INTO "defaults" VALUES ('version', '2.8.7');
but this upgrade script wants to update a column "version" instead?
greetings
Maanus Kask