T
T
Timur Valitov2018-02-06 11:04:30
Laravel
Timur Valitov, 2018-02-06 11:04:30

How to update migration in laravel?

Good afternoon!
There is migration. Suppose I need to change the default value of a column. Is there a way to migrate to laravel without losing data in the database?
Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
J
JhaoDa, 2018-02-06
@JhaoDa

Try reading the documentation .

R
RidgeA, 2018-02-06
@RidgeA

The question is not clear. Why ALTER TABLE with a default value change should break the table if the arms are straight?

A
Alex Wells, 2018-02-06
@Alex_Wells

Exist. Add another migration.
But if the project is still in development, then it is easier to change the existing one (NOT SUITABLE for sale).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question