core
core copied to clipboard
rename attribute column without delete+new
rename attribute column without delete old column (with all values!) and add a new column
with "delete+new" we lost different other things e.g. filter settings
We should keep an eye on this one if #1267 also fixes this.
with new schema manager its the same
I change from Test to Test2
* ALTER TABLE mm_test DROP Test
* ALTER TABLE mm_test ADD Test2 VARCHAR(255) DEFAULT NULL
same at tables - this is how Doctrine works things out - but, you can copy the data between the two splats/tables between each query:
/usr/bin/php8.1 vendor/bin/contao-console doctrine:query:sql 'UPDATE mm_test SET col_neu=col_alt'
/usr/bin/php8.1 vendor/bin/contao-console doctrine:query:sql 'INSERT mm_test_neu SELECT * FROM mm_test_alt'