PDA

View Full Version : update database from ? to newest : quote



dwax
05-03-2004, 04:23 AM
Hello everyone,

I have about 700 listings in database, but it's the oldest version,
i am not sure which one.

i would like to convert this into the newest version.

I tried this manually, but that drives me slowly mad...
So i am looking for a script which does this for me.

Is there anyone who can do this for me? Please send me
your quote for this.

regards,

derek

Mick
05-03-2004, 02:48 PM
First it'd help to know which version in particular as there are many old versions. is this an Open-realty 1.0.x series or one of Jon's old 3.x series?

Either way you should look at the /upgrade directory of the current OR distribution. There is an included upgrade script to upgrade your database to the latest version from both the 1.0.x series of OR and from Jon's old 3.0x series.

Make a backup of your entire database and site before attempting this upgrade so in case it doesn't work you can revert back to the version that works.

If you are wary about attmepting this on your own send me an email and I'll do the upgrade for you for a resonable fee.

Mick

dwax
05-06-2004, 07:01 AM
hey Mick, thanks for your reponse,

I dug a bit deeper and i suspect i have version 2.x running,
hence the updates aren't working. First i have to upgrade to
jon's 3.0.

Do you have the skills to write an update script for this?


regards,

derek

Andre
05-06-2004, 10:05 AM
According to some individuals who had 2.6, there is no way to update due to diffences from 2.6 to 3.0. I did I search on upgrade at www.jonroig.com. http://jonroig.com/freecode/phpBB/viewtopic.php?t=1839&highlight=upgrade&sid=a463658 6e2c4ae641690f32ca4006a19

Mick
05-06-2004, 02:18 PM
I have to honestly say I've never even looked at Jon's old 2.6 version so I have no idea what the database structure is like but from the looks of that post that andre linked to and that fact that nobody has done one by now I'm guessing that it'll be difficult however nothing is impossible.

Can you possibly provide a copy of a dump of your database so that I could take a look at the structure.

Fat Lizard
05-06-2004, 02:33 PM
It's impossible, that it's impossible to convert.

It may be fiddly, or tricky, or messy, or all three, without a single point 'n click script that does magic things in one go, but it would be possible.

The fact that it hasn't been done previously is either:
1. No-one has had your need to (not enough listings perhaps?)
2. They've just gone ahead and done it, and not told anyone

Narrow down on what version you're running -- there are a few flavors from both Jon's and here, and, what you're planning to upgrade to.

FL

dwax
05-07-2004, 04:13 AM
he, thanks for your replies!

here's a peek at the tables:

CREATE TABLE agents (id int NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), agent VARCHAR (30), agentpass VARCHAR (10), agenturl VARCHAR (70), agentemail VARCHAR (70), notes TEXT, agentphone VARCHAR(30), agentcell VARCHAR(30), agentfax VARCHAR (30) )
CREATE TABLE agent_tbl_Files (id_files int not null auto_increment, PRIMARY KEY (id_files), bin_data longblob not null, description tinytext, filename VARCHAR (50), filesize VARCHAR (50), filetype VARCHAR (50), agentnum int, owner int )
CREATE TABLE tbl_Files (id_files int not null auto_increment, PRIMARY KEY (id_files), bin_data longblob not null, description tinytext, filename VARCHAR (50), filesize VARCHAR (50), filetype VARCHAR (50), prop_num int, owner int)
CREATE TABLE homes (id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), title VARCHAR (250), address VARCHAR (250), city VARCHAR (50), state VARCHAR (20), zip VARCHAR (20), price int, previewdesc TEXT, fulldesc TEXT, type VARCHAR (20), imageloc VARCHAR (50), beds int, baths FLOAT, status VARCHAR (10), featured VARCHAR (1), mls VARCHAR (20), dateposted DATE, neighborhood VARCHAR (50), agent VARCHAR (30), agenturl VARCHAR (30), air VARCHAR (1), alrm VARCHAR (1), bcny VARCHAR (1), cbl VARCHAR (1), crp VARCHAR (1), dw VARCHAR (1), dsp VARCHAR (1), fire VARCHAR (1), gas VARCHAR (1), hdwd VARCHAR (1), mw VARCHAR (1), onw VARCHAR (1), pto VARCHAR (1), wadr VARCHAR (1), wc VARCHAR (1), fee VARCHAR (1), bp VARCHAR (1), boat VARCHAR (1), clb VARCHAR (1), gtd VARCHAR (1), crt VARCHAR (1), fit VARCHAR (1), ong VARCHAR (1), pw VARCHAR (1), pool VARCHAR (1), pt VARCHAR (1), spa VARCHAR (1), spo VARCHAR (1), tns VARCHAR (1), notes TEXT, agentemail VARCHAR (30), owner int, numfloors VARCHAR (30), yearbuilt int, sqfeet int, lotsize VARCHAR (30), garagesize VARCHAR (30), proptax int, country VARCHAR (30), virtualtour VARCHAR (60) )


The main problem, as i see it, is the fact that the images are saved in mysql. The reason to migrate to the newest version are:

1. images in mysql are inefficient and slow.
2. two sites have to use the same db in the future,
one is allready running the newest version of OR.
3. the newest version is easier to use for admin and visitor.

looking forward to hear from you all.

derek

Fat Lizard
05-07-2004, 07:58 AM
he, thanks for your replies!

The main problem, as i see it, is the fact that the images are saved in mysql. The reason to migrate to the newest version are:

1. images in mysql are inefficient and slow.
2. two sites have to use the same db in the future,
one is allready running the newest version of OR.
3. the newest version is easier to use for admin and visitor.

looking forward to hear from you all.

derek

Sounds like the beginning of a plan, and yes, the images stored in the Db will begin to slow things down, and some hosts get a bit upset when the load begins to be noticable.

Somewhere along the way, you'd need to iterate through all the existing records, writing the image(s), and thumbnails, to disk, probably using the name it's given from the db ( tbl_Files.filename )
Make a small test script to extract a single record, with image saved to disk.

Got that record ok?
Now all you need is to iterate through all the records, doing the same thing.
Then you've got the listing id, and the image name.
A phpMyAdmin dump of the old table, edited to replace the image with a file reference, and imported back, so
tbl_Files.filename
maps to
default_listingsImages.file_name

and so on ...

dwax
05-07-2004, 08:54 AM
you're absolutely right there, the images together make 150 mb!
nobody likes that, making backups is terrible, and putting them
back is almost undo-able (max upload in my phpadmin is 2mb).

even pulling a thumbnail from the db is slow.

But when i installed this version, it was the best (free) solution.
And it suited me well the past years.

After upgrading, i also have to melt two databases to one, would this
also be a problem? I can imagine that the ID's are conflicting.

Oh man, this is a nightmare, sometimes i long the days when i just
could make sites with pure HTML. Straightforward, easy, what-you-see-is-what-you-get... No databases, strings, headache, dizziness and dynamic content...

Fat Lizard
06-06-2004, 11:39 AM
According to some individuals who had 2.6, there is no way to update due to diffences from 2.6 to 3.0. I did I search on upgrade at www.jonroig.com. http://jonroig.com/freecode/phpBB/viewtopic.php?t=1839&highlight=upgrade&sid=a463658 6e2c4ae641690f32ca4006a19

[shameless self-promotion]

Upgrade/conversion script done

[/shameless self-promotion]

RealtyOne
06-06-2004, 06:08 PM
[shameless self-promotion]

Upgrade/conversion script done

[/shameless self-promotion]
:lol: As another "impossible" task bites the dust !

earla12
10-31-2005, 05:19 PM
Is there a conversion script for converting from 1.15x to 2.08b?

My client around 200 records with information that I need to transfer to the 2.08b version.

Manually is definately a pain.

Earl

pbflash
10-31-2005, 06:02 PM
There is an upgrade option when you install 2.08.