Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Modifying database structure

Quote Reply
Modifying database structure
What is the proper procedure for adding a few new fields to an existing database?
Since it's a MySql table, I'm sure it's not only modifying the db.cfg but there is also some MySql work to be done.
Can somebody layout the proper procedure?
Thanks,

Rodrigo

Quote Reply
Re: Modifying database structure In reply to
You could do one of the following:

1) Download and install the MySQLMan application that allows you manage your MySQL tables and databases. You will need to update your .cfg file with the new field you added.

2) Add the new field in the .cfg file and then run the setup.cgi file again to add the field.

3) Learn some SQL syntax/commands and via telnet you can INSERT new fields into your MySQL table(s).

If it was up to me, I would do the first option.

Regards,

Eliot Lee

Quote Reply
Re: Modifying database structure In reply to
Thanks.
Now, what would be the most secure method? Is there a danger of loosing data with any of those procedures?
Should I backup the data before proceding?

I guess you are talking about the nph-setup.cgi when you say setup.cgi, right?

It seems to me that modifying the db.cfg and then running nph-setup.cgi is the easier method (your option 2). Why do you recommend installing another script (MySqlMan) to do it?

Thanks a lot!

Quote Reply
Re: Modifying database structure In reply to
In Reply To:
Now, what would be the most secure method? Is there a danger of loosing data with any of those procedures?
That depends...if you've password protected your MySQL login, then the most secure is via telnet using SQL commands/functions. If you do not have it password protected, then all of them are unsecure.

In Reply To:
Should I backup the data before proceding?
You should always backup your scripts/files/tables, etc. before hacking the scripts/files/tables, etc. That is a basic activity of application development and computer use. Wink

In Reply To:
I guess you are talking about the nph-setup.cgi when you say setup.cgi, right?
Oopss...right...sorry, I was thinking of Links SQL...momentary lapse of reason.

In Reply To:
Why do you recommend installing another script (MySqlMan) to do it?
Because it allows you to view, edit, delete, import, export, and many other features. It is a time saver in terms of managing your tables. Editing scripts and then running them take more time in terms of testing and implementation.

Regards,

Eliot Lee