Frank Cox | 24 Apr 2012 23:32
Favicon

Copying database from 1.2 to 1.3

Now that I can log in and this is apparently (at least, I can set up a new
database and so on) I want to get the data from my 1.2 installation into the
1.3 installation.

I restored my data with these commands:

createdb companyname
psql companyname < companyname-backup.sql

This appeared to work without error.

Now when I log into the setup.pl as the postgres user and specifying
companyname as the database, I get this:

Logged in as postgres
LedgerSMB 1.2 db found
Would you like to upgrade the database?

The only button is "Yes", so I click that.

I then get a screen that shows me some partnumber, description, sellprice
fields, and it appears that I can edit the partnumber field.   The button on
the bottom is "Save and Retry"

What am I expected to do here?  Just clicking the button puts me right back on
the same screen.  Do I need to somehow change those partnumbers to something
else?

One other apparently minor error.  When I created my admin user for companyname
through setup.pl, I selected ca as the locale and this error showed up on the
(Continue reading)

Frank Cox | 25 Apr 2012 00:53
Favicon

Re: Copying database from 1.2 to 1.3

Now I see what it's doing, but I don't understand why.

It gave me a list of duplicate part numbers and gave me an opportunity to
change them to unique part numbers.  There were only four on the list so I
changed them.

After doing that, it brought me to a screen of duplicated invoice numbers.  A
lot of them.

I have posted a printout of what I get here:

http://www.frankcox.ca/setup.pdf

What caused this and what is the best way to go about fixing it?  Since the 1.2
version of the program is still in use, should I have the lady who uses it fix
the problem there before I import the data "for real"?

--

-- 
MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Chris Travers | 25 Apr 2012 04:36
Picon

Re: Copying database from 1.2 to 1.3

Hi Frank;

On Tue, Apr 24, 2012 at 3:53 PM, Frank Cox
<theatre@...> wrote:
> Now I see what it's doing, but I don't understand why.
>
> It gave me a list of duplicate part numbers and gave me an opportunity to
> change them to unique part numbers.  There were only four on the list so I
> changed them.
>
> After doing that, it brought me to a screen of duplicated invoice numbers.  A
> lot of them.
>
> I have posted a printout of what I get here:
>
> http://www.frankcox.ca/setup.pdf
>
> What caused this and what is the best way to go about fixing it?  Since the 1.2
> version of the program is still in use, should I have the lady who uses it fix
> the problem there before I import the data "for real"?

A lot of this has to do with data integrity controls being tightened
up between 1.2 and 1.3.  For example, we didn't care about duplicate
part numbers or invoices before.

The best approach is to practice migrating a copy of your database.
You can create a copy of your database when it is not being used by
typing from the command line:

createdb -T old_dbname -U postgres new_dbname;
(Continue reading)

Frank Cox | 25 Apr 2012 09:11
Favicon

Re: Copying database from 1.2 to 1.3

On Tue, 24 Apr 2012 19:36:06 -0700
Chris Travers wrote:

> Note that fixing this stuff pre-migration is the only part of the
> 1.2-1.3 migration which cannot be backed out of.  If you are
> comfortable with it you can just go ahead and fix in this process.
> 1.2 will continue to function until you actually finish the migration.

The 1.2 installation is actually on a completely different computer than the
1.3 installation.  I'm setting up a new machine and thought it was a good
opportunity to upgrade to the latest version of ledgersmb (among other things),
which is where all of this started.

I assume that I can just change the invoice numbers to something unique through
the screen that I posted the print-out of, and subsequently have everything
work as it should.  Please correct me if I'm wrong about this.

Once I get this sorted out I intend to reformat the new machine again and do a
complete scratch install of ledgersmb from the rpm and document every step
along the way.  Plus I'll look into the selinux context stuff at that time as
well.  Hopefully the information gained through the process will be of use to
both me and other folks who may want to do this in the future.

And it's an interesting project, so perhaps I can make a contribution.

--

-- 
MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com
www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!

------------------------------------------------------------------------------
(Continue reading)

Chris Travers | 25 Apr 2012 09:29
Picon

Re: Copying database from 1.2 to 1.3

On Wed, Apr 25, 2012 at 12:11 AM, Frank Cox
<theatre@...> wrote:
> On Tue, 24 Apr 2012 19:36:06 -0700
> Chris Travers wrote:
>
>> Note that fixing this stuff pre-migration is the only part of the
>> 1.2-1.3 migration which cannot be backed out of.  If you are
>> comfortable with it you can just go ahead and fix in this process.
>> 1.2 will continue to function until you actually finish the migration.
>
> The 1.2 installation is actually on a completely different computer than the
> 1.3 installation.  I'm setting up a new machine and thought it was a good
> opportunity to upgrade to the latest version of ledgersmb (among other things),
> which is where all of this started.

Ok.
>
> I assume that I can just change the invoice numbers to something unique through
> the screen that I posted the print-out of, and subsequently have everything
> work as it should.  Please correct me if I'm wrong about this.

Yes.  Indeed I would recommend prefixing or suffixing the invoice numbers.
>
> Once I get this sorted out I intend to reformat the new machine again and do a
> complete scratch install of ledgersmb from the rpm and document every step
> along the way.  Plus I'll look into the selinux context stuff at that time as
> well.  Hopefully the information gained through the process will be of use to
> both me and other folks who may want to do this in the future.
>
> And it's an interesting project, so perhaps I can make a contribution.
(Continue reading)


Gmane