Convert Table To Wappler

If this is possible could we have a convert table feature in the database builder. I like to build my tables with phpmyadmin and they get imported to my local host docker great but when trying to copy this over to the target remote I have to copy the backup file which is only doable until the site starts getting data.

It would be great if we could for example right click convert to Wappler table and then when we apply the changes on the target it would copy over the table structure as it does with tables built in Wappler

I’m not sure I follow this. The database tables aren’t in any special Wappler-style format, they are just databases which Wappler connects to. There isn’t any conversion needed. Or have I completely misunderstood?

1 Like

Only Wappler created tables transfer to the remote target there must be something that needs editing? unless im missing something to allow it to transfer if I create a table in Wappler they transfer over when changes are applied in the changes area the tables created outside of Wappler are left behind unless im doing something wrong?

Are you referring to migrations? That can only be done in Wappler.

migrations as in transferring the database tables from local development to remote target? If I create a database table in Wappler then when I save the changes it shows up in the changes section of the database builder, then when Im on the target and apply the changes the table if transferred onto the remote target.

But if the tables are created outside of Wappler like phpmyadmin etc Wappler on local can read the table etc and save the applied changes on local but then when switching to target to apply the changes to the remote target they don’t get picked up and transferred (unless im doing something wrong here)

Yeah. Migrations only work when using Wappler’s Database Manager.

Unfortunately what you are asking in this request is technically impossible.

In that case is it planned for some updates on things like enum values and relations etc I couldn’t find things like this which is why I went with phpmyadmin. for example with enum I couldn’t find the options to set the allowed values unless im using the feature incorrectly?

Actually this is not impossible for Wappler if a few new features were added in a new version of Wappler.

I guess the problem is that Wappler would have to know that the “finished” table that Wappler reads correctly in your local project must now be OVERWRITTEN on Migration. Since you’ve been generating table changes locally those multiple queries have not been executed on the remote target.

Wappler would have to have a setting that says on Migration UPDATE Table x or Tables Y, reservations, guests (example) with specific types of UPDATE queries.

And /or then the Migration process would, for instance, rename affected tables (“guests_21_07_05”) you specify and then completely recreate a Copy of the tables you changed on your local project with the same table name.

I imagine this could even be a Wappler extension that runs ahead of the current Migration operation giving you extra choices on what happens in a Migration.

I have ways of doing that separately from Wappler but I assume you’d have to run your development LIVE to your remote target, instead of locally, so that your development queries get transmitted to your remote tables.

One way is to do a sql file export of the affected database table after you are ready to upload the Wappler files and have made all table changes in Wappler.

Then run this Update in the database manager at your remote target. Simplest is to rename the existing table and then do an Import of your sql file as a Make table and populate it with a query to add the same table name back into your remote databse with all the matching schema changes your Wappler code expects.