After phpartisanmigrate is executed in laravel, data is inserted in the database. However, I want to modify the structure of the object. for example, if I want to add a default value of 0 to the title field, the data will be lost. modify the data table ps (I tried to add one... execute in laravel
Php artisan migrateData is also inserted in the database.
But now I want to modify the object structure, for example
TitleThe default value 0 is added to the field.
If the data is withdrawn, how can we ensure that the database data can be modified again?
Ps (I have tried to create another migration if I add a field, but I cannot modify the field information)
Reply content:
Execute in laravelPhp artisan migrateData is also inserted in the database.
But now I want to modify the object structure, for exampleTitleThe default value 0 is added to the field.
If the data is withdrawn, how can we ensure that the database data can be modified again?
Ps (I have tried to create another migration if I add a field, but I cannot modify the field information)
Schema: table ('users', function ($ table) {$ table-> string ('title')-> default ('1 ') -> change ();});
Https://laravel-china.org/doc...