the default generated migration table with its "version" column set to varchar(180), but when we create a long alter table column migration, it will drop some characters, such as the following one:
m170726_070258_add_reqm_source_column_temp_theme_column_baselib_config_column_deploy_date_column_pass_review_column_pass_test_column_rollback_time_column_regular_check_column_to_task
right migration apply result
migration want to re-apply old ones
workaround:
issue SQL "alter table migration modify version varchar(360);"
| Q | A
| ---------------- | ---
| Yii version | 2.0.12
| PHP version | 5.6.30
| Operating system |Mac os 10.9.5
I think need to limit name and mb truncate migration name during creating migration instead increasing length in DB.
Probably.
yep, migrate controller should validate migration names before inserting into db, not only on create, but in general, to avoid people creating too long names manually.
then how do we implement such "long column change" migration requirement ? by split it into multiple steps to fit the length limit ? one line deal to multiple? i don't think it is a good idea. besides the original column length is not enough, by changing its type to "text" is not a big move.
How about naming it shorter?
i also can't create file longer then 255 symbols through file_put_contents on MacOs
Most helpful comment
How about naming it shorter?