failed database version upgrade
Winter CMS Build
1.2
PHP Version
8.1
Database engine
PostgreSQL
Plugins installed
Builder
Issue description
I changed the column (e.g. drop) AND change name of table and tried to apply this upgrade to other system.
But i have some view which forbid to apply patch - but the name of table was changed. This shouldn't work like this. All or nothing. If it break - it should be still old name of table.
Steps to replicate
Changed the column (e.g. drop) AND change name of table and tried to apply this upgrade to other system.
Workaround
I have to change manually name of table and apply patch again
I have absolutely no idea what you're talking about or what the issue is here that you're trying to report.
I forgot that Builder isn't part of winter - This is a problem of builder not winter itself
- table has name my_table_old_name and has three columns: id, bad_column, good_column
- In postgresql there is a view which depends on bad_column
- there's a new version of plugin - which changes name my_table_old_name to my_table_new_name and drops bad_column
- During the upgrade process sql error appears - upgrade failed because can't drop bad_column (because it is used in view).
- Column is not dropped BUT name is changed to my_table_new_name
- manualy edit view to resolve problem
- Can't upgrade because upgrade can't rename my_table_old_name to my_table_new_name...
- manualy reverse renaming - my_table_new_name to my_table_new_name
- execute upgrade - SUCCESS!!
I have been unable to replicate this with the latest version of the Builder plugin. Please feel free to re-open if the issue persists.