Is there a way to apply the db.json to a remote instance?

After changing some of the ON DELETE behavior, I was able to copy/paste the SQL from each .sql file I created for each table earlier, into the remote DB server's mysql tool successfully. I did a "Refresh Full Schema" on the remote target in Wappler and can see my tables. I'm able to View/Edit each table to see the columns created from the .sql files as well.

Before returning to my development environment, I made sure there were no "Changes" listed in the remote DB in Wappler. If there were, I would have just deleted them all.

Changing my target back to development and refreshing the DB manager view, I can see there's an issue with the "Changes" item. Clicking on the "Error listing the changes..." reveals the following:

I found this article: Migration Directory Corrupt with a supposed fix by right clicking on the "Changes" and selecting Reset History. Let's try it.

"Yes". "Changes history is reset successfully"

Now my Changes in development is blank and not reporting any issues. With both environments having no Changes history, and my remote DB server having the same DB and tables as development, let's see if a change to my development DB can be deployed to my remote DB. I'll add a test table in development using Wappler, with no references to any of the existing tables now that I know ON DELETE CASCADE is used by default in the table definitions.

I create a new table in development called "test" and it has an ID and an "information" column. I press the "Apply Database Changes" icon in Wappler, give it the description "apply test table" and press Yes/Ok. I see the message that the changes were applied successfully. My Changes now show 1 entry: Apply test table and the little blue arrow icon which I assume means that's the current step in the history of changes. Let's see if I can deploy this change to my remote DB.

I switch my Target: to my remote server and can see the Change "apply test table" with a dark orange square next to it and no blue icon. I'm going to right-click on Changes and select "Apply Latest Changes".

Wappler says: "Latest Changes Applied Successfully"

I refresh the full schema and can now see the test table in my remote environment. Let's delete the table in development and perform the same functions again. That worked and now my remote Changes steps show both the creation and deletion of the test table.

Returning to development, I see a "1" notification on the Apply Changes Icon, but after a full schema refresh, I check the Changes and it shows I'm current. That's odd. I restart Wappler rather than risk pressing the Apply Changes icon. That cleared the "1" and no changes are needing to be applied, as it should be.

At this point, I think I can return to normal development and be able to push DB changes remotely using Wappler. HTH