Welcome, Guest
Please Login or Register.    Lost Password?

Upgrading Owl-0.72 to Owl-0.95
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Upgrading Owl-0.72 to Owl-0.95
#140
Upgrading Owl-0.72 to Owl-0.95 1 Year, 10 Months ago Karma: 0
I finally got some time to make the upgrade from the v0.72 to the Owl-0.95.

I've read all the documentation and followed this steps:
1. backup the mysql databases mysqldump ...
2. created a new database mysqladmin create
3. imported the backup to the new database mysql kb < owl.sql

Everything goes fine until I try to make the upgrade with mysql kb < mysql-from-0.72.sql

I get this error:
ERROR 1060 (42S21) at line 211: Duplicate column name 'expand_disp_updated'

That line #211 looks like:
ALTER TABLE prefs add column expand_disp_updated int(4) default NULL;

I continued with the installation, but when I try to access to the webpage, I receive this error:
: Invalid SQL: SELECT user_offset, firstdir, homedir, buttonstyle from users WHERE id = '2'
: 1054 (Unknown column 'user_offset' in 'field list')
Session halted.


If I start it over but instead of upgrading, importing the fresh database mysql kb < mysql-tables.sql eveything works fine (but, of course, I loose all the users, comments, history, statistics and any other database-related information).

What should I do, in order to sucessfully upgrade the database?
Thank you in advance for reading this.
Federico Ponce de Leon
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#141
Re:Upgrading Owl-0.72 to Owl-0.95 1 Year, 10 Months ago Karma: 28
Hi,

what you do is run: mysql-from-0.72.sql

Until you get the error.

I get this error:
ERROR 1060 (42S21) at line 211: Duplicate column name 'expand_disp_updated'

Edit mysql-from-0.72.sql

remove all lines upto and including:

ALTER TABLE prefs add column expand_disp_updated int(4) default NULL;

Run the rest, and repeat until the script runs without any errors.

B0zz
Owl DEV Team
Moderator
Posts: 2225
graph
User Offline Click here to see the profile of this user
Gender: Male b0zzit Location: Ottawa, Ontario, Canada
The administrator has disabled public write access.
 
#142
Re:Upgrading Owl-0.72 to Owl-0.95 1 Year, 10 Months ago Karma: 0
Thank you for your fast answer, dear Bozz.

I followed your recommendations, and continued with the installation, but when I try to access to the webpage, I receive this error:
: Invalid SQL: SELECT user_offset, firstdir, homedir, buttonstyle from users WHERE id = '2'
: 1054 (Unknown column 'user_offset' in 'field list')
Session halted.


I created those columns in the users database, but some other errors related with database structure occurred.

Since I'm able to sacrifice some database information :) I finally decided to work with a fresh database.

... But I would like to know some trick to import username, name, password and e-mail address from the users v0.72 table to the v0.95

Is there some way to export 0.72 users table to csv in some way I can import it from the v0.95 ?
Federico Ponce de Leon
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#143
Re:Upgrading Owl-0.72 to Owl-0.95 1 Year, 10 Months ago Karma: 28
The following SQL will generate INSERT statements.

so create a x.sql with the following code in it:

select concat("INSERT INTO users (username, name, password) values ('", trim(username) , "','" , trim(name) , "','" , trim(password) , "');") from users;


mysql -u root oldintranet < x.sql > out.sql

out.sql now contains the needed INSERT statement... the example only deals with 3 columns but COULD be extended to any number.

Hope this helps.

B0zz
Owl DEV Team
Moderator
Posts: 2225
graph
User Offline Click here to see the profile of this user
Gender: Male b0zzit Location: Ottawa, Ontario, Canada
The administrator has disabled public write access.
 
#144
Re:Upgrading Owl-0.72 to Owl-0.95 1 Year, 10 Months ago Karma: 0
Thank you for you suggestion

I was also looking for some way to export those columns from the old version to the new one.

with
Code:

 SELECT username, name, password, email FROM kb.users where disabled=0 ORDER BY ID INTO OUTFILE 'out.file' FIELDS TERMINATED BY '|'; 
I was able to export users list.

With
Code:

LOAD DATA LOCAL INFILE 'out.file' INTO TABLE kb.users FIELDS TERMINATED BY '|' (username,name,password,email);
I was able to import those registers to the new database.

I needed to remove my own username and the admin user from the out.file to avoid confussion.

Now I'm making some bulk changes in the database to define maxquota and other things.

It seems like the most difficult part is ready.

Thank you very much for your support.
Keep improving this great tools, you are doing a great job.
Federico Ponce de Leon
Fresh Boarder
Posts: 10
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#145
Re:Upgrading Owl-0.72 to Owl-0.95 1 Year, 10 Months ago Karma: 28
Thanks for Posting your solution :)

B0zz
Owl DEV Team
Moderator
Posts: 2225
graph
User Offline Click here to see the profile of this user
Gender: Male b0zzit Location: Ottawa, Ontario, Canada
The administrator has disabled public write access.
 
Go to topPage: 1

Ad Block