thedevdojo / voyager

Voyager - The Missing Laravel Admin
https://voyager.devdojo.com
MIT License
11.78k stars 2.67k forks source link

Changed column name is not changed in the data_rows table. #3633

Open BoFiaZ opened 5 years ago

BoFiaZ commented 5 years ago

Version information

Description

If the column name of any table is changed, the name changes in the table, but not in the data_rows table.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to Tools > Database
  2. Click on Edit any table
  3. Change the name of a table column
  4. Click on Update Table
  5. In the data_rows table, look for the changed column name

Expected behavior

The changed column name must also be changed in the data_rows table.

DrudgeRajen commented 5 years ago

Did you try by updating the Bread after updating and saving the table? After updating the table column, to make it in effect you need to update the bread as well.

emptynick commented 5 years ago

Those two things (database and bread) are independent from each other. Thats why updating a table won't update the bread-settings. Even if we would do that in any way, one could still rename the column through a DBMS.

fletch3555 commented 5 years ago

I want to say we should make the database editor update the BREAD (via events so it remains very loosely coupled). But at the same time, it's possible we may drop the database editor for 2.0, so I don't want to put too much effort into it.