[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: upgrade from sql-ledger 2.8



On Mon, Mar 9, 2009 at 6:45 AM, Maanus Kask <..hidden..> wrote:
> Hi,
>
> On Fri, 6 Mar 2009 08:52:52 -0800
> Chris Travers <..hidden..> wrote:
>
>> The first question is what functionality you use in SQL-Ledger 2.8.
>> If you use vouchers/batches, you are better off waiting until 1.3.
>
> I do not use them.
>
>> This means you can migrate to LSMB 1.2 if you have not added
>> customizations to do this.
>
> Great.
>
>> If this is the case, I think you could probably add some views to
>> emulate the older data and then run the old migration scripts.  To do
>> this, rename the customer and vendor tables, and make views joining
>> their records to the address table.
>
> I am not that home with SQL. Is there any good howto for doing these
> kind of stuff?

Hmmm... better to do a select into....

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.
>
> Where do I find these scripts I should run?

sql/legacy/

I would run them starting at the upgrade script from 2.6.16
>
>> Also you will need to do some minor alteration of the defaults table
>> (renaming columns) to match our model (setting_key, value).  Also make
>> sure the currency setting is 'curr' and not 'currency.'
>
> This is doable.
>
Best Wishes,
Chris Travers