Generator


  -----  
Author Message

JaCk
Member

Mon Apr 02, 2007 3:04 am   Post subject: Generator
I'm having some problems using the db_update generator uninstall option...with all the notices and stuff, i'm never quite sure if i'm doing it correctly.
Could u provide me with a walk through when creating uninstall scripts?

let's say for these queries:

Code:

CREATE TABLE `phpbb_captcha_config` (
  `config_name` varchar(255) NOT NULL default '',
  `config_value` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`config_name`)
) TYPE=MyISAM;

INSERT INTO `phpbb_captcha_config` VALUES ('width', '350');
INSERT INTO `phpbb_captcha_config` VALUES ('height', '90');
INSERT INTO `phpbb_captcha_config` VALUES ('exsample_code', 'SAMPLE');
INSERT INTO `phpbb_captcha_config` VALUES ('background_color', '#E5ECF9');
INSERT INTO `phpbb_captcha_config` VALUES ('jpeg', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('jpeg_quality', '50');
INSERT INTO `phpbb_captcha_config` VALUES ('pre_letters', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('pre_letters_great', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('font', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('trans_letters', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('chess', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('ellipses', '1');
INSERT INTO `phpbb_captcha_config` VALUES ('arcs', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('lines', '1');
INSERT INTO `phpbb_captcha_config` VALUES ('image', '0');
INSERT INTO `phpbb_captcha_config` VALUES ('bg_transition', '25');
INSERT INTO `phpbb_captcha_config` VALUES ('gammacorrect', '0.8');
INSERT INTO `phpbb_captcha_config` VALUES ('foreground_lattice_x', '15');
INSERT INTO `phpbb_captcha_config` VALUES ('foreground_lattice_y', '15');
INSERT INTO `phpbb_captcha_config` VALUES ('lattice_color', '#FFFFFF');
INSERT INTO `phpbb_captcha_config` VALUES ('avc_version', '1.2.0');

ALTER TABLE `phpbb_confirm` CHANGE `code` `code` CHAR(10) NOT NULL;


TIA
 

Thoul
Administrator

Tue Apr 03, 2007 1:56 pm   Post subject: Re: Generator
To make an uninstall script for that, you would follow these steps:
  1. Copy and paste that SQL into the Install SQL box that appears when the generator page first loads.
  2. Click "Advanced Options"
  3. Check the box next to "Attempt to parse Install SQL into Uninstall SQL"
  4. Fill in the hack name, etc, if you want. All of that is optional.
  5. Click the Generate button


That's all there is to it. The generator will look at the queries you put in and convert them to uninstall queries as best it can. In this case, the only thing that is needed is a DROP TABLE query, which it will add to the script for uninstall.

I'm glad you brought this up, though. It showed me that the uninstall generator was having problems with table names enclosed in backticks, like `phpbb_captcha_config` in those queries. That is fixed now.

Thanks. Smile
 

JaCk
Member

Tue Apr 03, 2007 5:36 pm   Post subject: Re: Generator
Awesome...that did it..many thanks Thoul..

p.s. gald to know i helped
 

Page 1 of 1
Display posts from previous: