Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
5
Erster Beitrag:
vor 3 Jahren
Letzter Beitrag:
vor 3 Jahren
Beteiligte Autoren:
Gianni Spano, DerekT, Allard

[WD18] How to modify (ALTERing) tables in a database at runtime [SOLVED]

Startbeitrag von Gianni Spano am 07.06.2015 16: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

Antworten:

Re: [WD18] How to modify (ALTERing) tables in a database at runtime

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

von Allard - am 07.06.2015 17:10

Re: [WD18] How to modify (ALTERing) tables in a database at runtime

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

von Gianni Spano - am 07.06.2015 19:01
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

von Gianni Spano - am 08.06.2015 11:37
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.

von DerekT - am 08.06.2015 12:13
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.