Add before method to the migrations #48887
Unanswered
elisonkaloshi
asked this question in
Ideas
Replies: 2 comments 2 replies
-
It's funny but I always just assumed, there was already one ^^ Checked the docs and the code and nope, you're right. Weird. Yeah, would absolutely make sense to have it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That is because MySQL doesn't support this, it only supports
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
It is possible to add the
before
method to the migrations in LaravelFor example:
I have a table with 10 columns and it will be easier and faster to just use before('created_at'), rather search who is the last column before the created_at column.
$table->string('description')->after('client_name')->nullable();
$table->string('description')->before('created_at')->nullable();
Beta Was this translation helpful? Give feedback.
All reactions