[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?
> 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:
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "session_pkey" for table "session"
ERROR: column "chart_id" contains null values
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?