super
07-06-2006, 03:32 PM
how to upgrade esyndicat from 1.4 to 1.5?
Thanks!
Sergey Ten
07-06-2006, 04:34 PM
Hello super,
H-m-m... Do you use free or pro version of the eSyndiCat?
super
07-06-2006, 11:45 PM
hello sergen,
i am used free version .
Nick Collins
07-07-2006, 04:42 AM
Hello super. Unfortunately we have no sql upgrade from v1.4 to v1.5. I would advice you to install script from the beginning and then import data of some tables (basically it is "dir_categories" and "dir_links") from old DB to new. After migration of data empty your "dir_flat_structure" table and run "convert_flat.php" file which build your flat structure form the beginning (you can find content of this file in our forums). Make sure that your ROOT category has ID=0. Edit your dir_sequences table (increase value of links and categories up to actual number of links and categories). That's all.
Ive followed your upgrade instructions and have come across the following problems.
1. Which is the ROOT category, and where can i find it so i can change its id to 0
2. Which field do you make the change in to set the value of links and categories in dir_sequences table.
Thanks
Sergey Ten
08-27-2006, 06:02 PM
Hello Rob,
#1
The ROOT category is in the table "dir_categories".
This query add in your database ROOT category for version 1.2
INSERT INTO `dir12_categories` (`id`, `id_editor`, `id_parent`, `title`, `description`, `status`, `meta_description`, `meta_keywords`, `path`, `order`, `locked`, `unique_tpl`, `level`, `num_cols`, `neighbour`) VALUES (0, 0, -1, 'ROOT', '', 'active', '', '', '', 0, '0', '0', 0, NULL, 0);
#2
You have to create php file with such code and run it on your server.
<?php
require_once('includes/config.inc.php');
require_once('classes/DirDb.php');
/** use database class **/
$gDb = new Database();
$gDb->mDbhost = $gDirConfig['dbhost'];
$gDb->mDbname = $gDirConfig['dbname'];
$gDb->mDbuser = $gDirConfig['dbuser'];
$gDb->mDbpwd = $gDirConfig['dbpwd'];
$gDb->connect();
/** get max id for links **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}links`;";
$id_links = $gDb->getOne($sql);
/** get max id for categories **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}categories`;";
$id_categories = $gDb->getOne($sql);
/** get max id for editors **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}editors`;";
$id_editors = $gDb->getOne($sql);
/** get max id for admins **/
$sql = "SELECT MAX(`id`) FROM `{$gDirConfig['prefix']}admins`;";
$id_admins = $gDb->getOne($sql);
$id_links = (empty($id_links)) ? 0 : $id_links;
$id_categories = (empty($id_categories)) ? 0 : $id_categories;
$id_editors = (empty($id_editors)) ? 0 : $id_editors;
$id_admins = (empty($id_admins)) ? 0 : $id_admins;
/** update information for links **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `links`='{$id_links}';";
$gDb->query($sql);
/** update information for categories **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `categories`='{$id_categories}';";
$gDb->query($sql);
/** update information for editors **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `editors`='{$id_editors}';";
$gDb->query($sql);
/** update information for admins **/
$sql = "UPDATE `{$gDirConfig['prefix']}sequences` SET `admins`='{$id_admins}';";
$gDb->query($sql);
?>
This is script which will update information in "dir_sequences" table.
vBulletin® v3.7.0, Copyright ©2000-2013, Jelsoft Enterprises Ltd.