Global updating including Server Actions

I am not sure if I should add this as a Feature Request or if there is already an easy way to do this.

I have had a few times now where I have had to do global changes or global updates. A simple example is where the client wants a field changing from “name” to “forename” and “surname”.
So, I then need to make a change in the database (a pain if data already exists because of splitting names), then make changes on all the web pages where “name” appears in an expression or as a form input field (fairly simple process with Wappler’s global Search facility), and then the tricky part and the main reason for this post, to change and update all the Server Actions.

This last part is the most challenging. Trying to find where all the instances of “name” appear in all the queries in all the Server Actions.

I think a simple search facility to find all the instances of a table name or column name in all the queries in all Server Actions would be a great help. That could then bring up a list of all the Queries in all the Server Actions so I knew where to start making changes.

What do other people do when making these sort of changes?
Should this be a Feature Request?
Or is it a simple addition for the Team to do in an upcoming release?

As far as I can tell it already does that, if i do a search in Wappler it shows results from server actions as well as my normal html pages etc.


There is no interface as such to make the changes like the server connect tree view style UI but it does include my server actions as code, and if they have queries inside them I can change them in the code.

My procedure would normally be, click a databse connection step to update the database schema so Wappler knows about my database changes.
Do a find site wide including server actions, and adjust all code.

Maybe I am not understanding, are you saying a search that will give you the server actions type UI to make the alterations.
I also must state that I have adjusted the search excludes in my Wappler, so not sure if that is why i see them and you may not, I showed the default excludes in the Replace field of the screenshot, so you can see whats excluded by default.

Wow Paul, you’re right. The number of searches I have done, looked for exactly that and never seen it! I need to take more notice, wake up, have more coffee or something.

I think one of the BIG things that you suggest is the exclusions, that would probably remove alot of debris from my searches. I think it has been a case of “not being able to see the wood for the trees”. Cheers

1 Like

And the other thing I have are loads of saved old copies of files that I create as a quick back-up if I am trying something new on a page. None of these should be here as they all appear in the search and just fog the issue. This is simple housekeeping that I need to get on top of. Now where’s that DELETE button?

image

haha, story of my life, I do the same, to get around the extra search results, what i do is every backup i make is actually a compressed archive, so filename.zip which doesnt show up in the search results

Guys, there is that thing called Git :wink:

1 Like

Lol, i knew I was going to get in trouble for that, I still haven’t played enough with Git, I have promised myself after this deadline i will.

2 Likes

It’s a lot easier than copy-pasting files like myfile_test_4.php

Screenshot_19

And you can always go back to a smart change and discard all the “stupid” tests :slight_smile:

1 Like

That does seem like it could make life easier, will have to give it a try. Thanks Teo and sorry @JonL I know i said i would try it out.

2 Likes

Funnily enough, I knew you were going to bring this up. Like Paul, I have not ventured into that dark and mysterious world of GIT. There are plenty of other areas not yet touched as well, such as Docker and Node. Am I too old to learn these things, does that block of wood on top of my shoulders have any spare capacity to absorb such knowledge, and retain it?
:flushed: :weary:

3 Likes

Sometimes there is a real advantage in not trying to learn all the possible tools at once, and just get really good at the things that make the most sense to you and the way you think.

I’ve watched countless videos on git and it still seems really confusing to me.

I know one day when I have the need then it will make sense and I will start to use it.

But until then I will focus my energy on the most complex thing of all, which is building the functionality of my app.

1 Like

@UKRiggers @Antony I have worked in the industry for more than the 20 years and managed large tech teams and once I stopped listening to a developer trying to explain what GIT is it made perfect sense!

A layman’s explanation: its just a document manage system (version control) for managing code, that’s it! It enables you save files and folders and any changes made to those files are stored as a change including meta data such as who did what, when they did it, what they changes and how they changed it.

It also allows many people to work on the one document (substitute files and code) and files and submit changes (snapshots) and is able to merge all those changes into a one version of the “final document”.

The folder it stores it in is called a “repository” (or repo) and has the name .git.

It becomes important once your application gets complex and you have many people working on the same code and you need to make sure no one overwrites that code (including yourself).

But, like most things tech it needs to be as complex and as intimidating as possible :smiley:.

However, I have seen some nightmare scenarios and my strong advice would be at the very least set up your Wappler project to work with GitHub it’s really easy to set up and once done you can just save it to both the local and GitHub (remote files storage). Then if something should go astray (which it always does) you have a remote record of every commit (saving of the files) and you can dive into it to find your way back.

Just think about it as a secure remote backup copy of your days work!

2 Likes

It is pretty easy. Even I did it. And I’m clueless. :beers:

2 Likes