Modified main table, then database view disappears

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
konfuzion
User
Posts: 378

Modified main table, then database view disappears

Post by konfuzion »

Good thing I made a backup

I want to modify a few fields in main table, but then after I sync, the database view disappears, even worse is all the server events I custom created.

How can I modify the main table fields without losing the database view and custom server events?

All I did was rename 1 field:
from customer_id to customer_fk_id in main table, after sync, then the database view disappears.


konfuzion
User
Posts: 378

Post by konfuzion »

Solved, just as I suspected.

Before renaming the main table field, uncheck the field you want to rename in the database view by "alter view"
(so if I wanted to rename customer_id to customer_fk_id, I would need to uncheck [_] customer_id and save the view)

then go to phpmyadmin

rename the main table field from customer_id to customer_fk_id

save table

phpmaker sync db tables

check that the database view didn't disappear (yes, it is still there)

go back to that database view that I unchecked [_] customer_id

then edit "alter view"

will see the renamed field
[_] customer_fk_id

check the checkbox
[X] customer_fk_id

Save the view

check server events (all my custom code is still there)


Post Reply