Unable to rename primary key field within Database manager

Wappler Version :3.4.1
Operating System :windows 10
Platform: PHP 7.4

Expected behavior

What do you think should happen?

field should be renamed

Actual behavior

error - see video

When trying to rename a primary key field within the Database manager an error is thrown. In this case i try to rename the primary key field from "pan360" to "photos360"

image

See video

Do you not have to first delete the constraint to rename/replace the primary key?

That would be a workaround (i just used navicat) but if that is necessary then you should not have the ability to try to rename a primary key.
I am trying to prepare training material for new learners and finding lots of “quirks” like this which are just going to lead to confusion

Is it not the same in navicat if you tried to do the same, ie an error would be thrown? I know in dbForge we would see an error, and am sure in Workbench also? Quite a standard error from what I can see. Not necessarily a Wappler issue?

Nope, can do it directly in Navicat.

The point I make is that Wappler is supposed to be a visual designer and needs to be new user friendly
If renaming primary keys cannot be performed then it should be disabled or a message informing the user to delete and recreate should be shown, not an error message which many would not understand

I’m sure the team will make it so (immortal words of Captain Picard). But for me its a fundamental behavior of MySQL and helps protect the integrity of the database. Its great to make things easy for the user but on the flip side dissuades from allowing those same users to understand the basics of RDBs. The knock on issues of renaming PKs is (could-be) huge so maybe the user needs to be made aware of any radical effects that could arise from making such changes…?

I agree but there needs to be an explanation of that, not an error message

1 Like