PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD18] How to modify (ALTERing) tables in a database at runtime
[WD18] How to modify (ALTERing) tables in a database at runtime
Iniciado por guest, 07,jun. 2015 18:48 - 4 respuestas
Publicado el 07,junio 2015 - 18:48
Hello to all

I think this is not the first post about the argument, but i would think that someone found a solution or a workaround.

Is there a way to avoid manually modifies of the fields in some tables in a databases??

I need to add (ALTER) some new fields in a customer database and i would like to avoid to remember which are the new fields added at runtime.
Is there a function that checks for new modificatons between the analisys and the customer database and then update it? Is it possible?

Or, do i need to record these new fields in a .sql file and then run the script at the time the application runs?

Tips and tricks are welcome.

Gianni
Publicado el 07,junio 2015 - 19:10
Hi,

Yes there is . It is an out of the box feature.

If you make in installer that places the applicaion on the web then automaicly an application update feature is availeble.

You make changes to your app . place the new modified application on the net. Then when customar starts his application he gets a message that there is a new version availeble and he can update to the new version. When he does update the update programm runs a check on the new analisis verus the anlisis on the clients machine and makes the nessisari changes.

Cool works like a charm

Regards
allard

PS onley if you use hypeerfile though. If you use and other db then i guess you have to run your own
Publicado el 07,junio 2015 - 21:01
Hi Allard

Yes...i know this is possible with HF files, but, unfortunately, i'm using MySql...

I think the easy solution is to record somewhere the changes you made manually on the database used for development and then update your analisys.
Once your customer install/download the new version, a .sql file, that contains the script to execute, will run making all the modifications you made on the dev database and update the new customer db.
Only my thought.

Just a question: Windev store every modifications you made on the analisys, then why the new modifications are not stored somewhere and then be readable at runtime?

Gianni
Publicado el 08,junio 2015 - 13:37
Hello to All

I found the solution to synchronize the schema of two MySql databases.

The solution is SqlYog, a MySql tool, that has a "Schema Syncronization Tool" that compare two mysql db (source and target), showing you (after a test compare) which tables are different in their schema or if the table does'nt exist in the target, it will create it for you.

Problem solved with this great tools.

Regards

Gianni
Publicado el 08,junio 2015 - 14:13
Gianni

So does MySQL Workbench (which is free) if you download and install the Utilities.

Not sure how either would answer your original question as you will still need to update your analysis and issue a new exe which itself will not have any knowledge of the DB changes.