Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

2.1.6 x 2.1.7: SQL Differences

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys!!!

I upgraded my local JForum installation to the last CVS version!
However, I have my forum running!
What should I do to "transfer" the database from the old installation to the newer one, considering that I created another forum, with another name, another MySQL username, but would mantain the same tables structure...

Resuming: if there are SQL differences between 2.1.6 and 2.1.7, how should I discover them in a intelligent way, OR... what should I do?

[ ]'s
[originally posted on jforum.net by leandro_salvador]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

redhand wrote:At topic User Details DVS Bug:

As you are using MySQL db, you have plenty of tools like phpMyAdmin(if you have a php interperter) or better use SqlYog free Edition http://www.webyog.com/
else maybe I could quickly write some basic export/import tool in java like phpbb2jforum converter



TKS Guy!!!

I did it with SQLyog! Just the Enterprise Trial Edition did the job. I made the following steps to upgrade a 2.1.6 existing database to 2.1.7 database.

1. Tools / Export Database As SQL Statements...
2. Database: jforum (old source) / Export: Structure and data / Selected Table(s): All (>>) / Export to file: C:\2.1.6_to_2.1.7.sql
3. Click Export

So, using MySQL Query Browser I runned the above .sql created file:

4. File / Open Script ... / Select the file (.sql)
5. Change manually only the 2 following lines:
5.1.1. create database if not exists oldDBname;
5.1.2. create database if not exists newDBname;
5.2.1. USE oldDBname;
5.2.2. USE newDBname;
6. Query / Continue

Finally we have to create the only one real structure's difference to the already copied 2.1.6 database (using yet the software MySQL Query Browser):

7. USE newDBname;
8. ALTER TABLE jforum_users ADD user_authhash VARCHAR(32);

Now just enjoy it!!! :lol:

redhand, I think could be usefull you (or we) create some kind of tool, or SQL script (if it's possible, I don't know...) to automatically upload the database when a JForum's administrator choice to upload the main software, don't you agree? I think it would be usefull...

[ ]'s
[originally posted on jforum.net by leandro_salvador]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SQL differences could be checked by diffing on /cvs/jforum/WEB-INF/config/database/mysql/mysql_db_struct.sql

In the final version of 2.1.7 you should have a file /upgrade/hsqldb_2.1.6_to_2.1.7.sql with something like that in it :


ALTER TABLE jforum_users ADD user_authhash VARCHAR(32);



You have just to apply those statements !

Note : replace mysql by your db type

[originally posted on jforum.net by redhand]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you can see in install.htm, there is already a place to start upgrade

but this action is currently not handled in InstallAction.java

Most dadatabases administrators prefer to manually upgrade db struct on a copy of working database, however I'm sure Raphael have a look on upgrade system when 2.1.7 final would be released

With CVS's version, it's normal to apply some tweak manually to get the job
[originally posted on jforum.net by redhand]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure about automatically upgrading.

I have no final decidion yet.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic