Question re database manager

Quick question please as i just don’t seem to be also to work this out.

Not used the internal DB manager before but really want to get to grips with it.

I have a development server (WAMP) and a remote live server.

I create a database on my local WAMP server and connect through the DB manager, no problems.

I create a table and apply the changes to that local database

All good to now

I also have remote (live) target defined and another database connection set up to the remote DB.

So far, so good

Now the question, how do i replicate the structure of the local database to the live server?

1 Like

Very good question. Still trying to wrap my head around the db manager as well. Keep ending back up in Navicat. Would like to eventually get the hang of the db manager.

I love Navicat but i am writing training material and want, if possible, to be 100% Wappler

1 Like

Just change the target to the live target and right click on the changes branch and choose apply.

That’s all!

For more details maybe check the video where I was explaining exactly that:

Did check that out George but changes are not showing in the live target. See video

Not sure where you have the mixup - but you really don’t have to make separate connections for live and local!

Just make a single connection - and by switching the targets - give it different connection properties.

Then when working on the local and editing tables - changes will be collected that you can apply to the local database.

Then switch target and you should see the changes as not applied yet - and just apply them.

It is really pretty straight forward …

Actually that is the root of your problem - you have different connection names per target …
and everything is connection name based. So we store the changes per connection name.

Actually those changes are stored just as files, under .wappler/migrations/_connection_name

image

Then when you switch targets the database manager just checks what of those changes has being applied to the remote database - and allows you to apply the rest.

So everything is much easier that you think :slight_smile: all settings are now correctly stored automatically per target and db connection names. No need for any hacks from the past to duplicate db connection settings .

Thanks George, that sorted it

What confused me is, firstly the database setup bit is not in the video as it used docker I suppose
Secondly, in the video from the gathering you can clearly see two different connection names which led me to believe that was necessary.

image

1 Like

for info, Getting 500 error trying to mark the above as a solution

Yes seems a small forum bug but it all works fine