From 5c4074d0180a644b013320c814e68727c52eb565 Mon Sep 17 00:00:00 2001 From: Kender2 Date: Sat, 29 Oct 2016 11:06:04 +0200 Subject: [PATCH] Document unchangeable column types. As suggested by @GrahamCampbell in issue [#9636](https://github.com/laravel/framework/issues/9636) --- migrations.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/migrations.md b/migrations.md index 46c31bececc..3af9877884b 100644 --- a/migrations.md +++ b/migrations.md @@ -283,7 +283,7 @@ Before modifying a column, be sure to add the `doctrine/dbal` dependency to your #### Updating Column Attributes -The `change` method allows you to modify an existing column to a new type or modify the column's attributes. For example, you may wish to increase the size of a string column. To see the `change` method in action, let's increase the size of the `name` column from 25 to 50: +The `change` method allows you to modify some existing column types to a new type or modify the column's attributes. For example, you may wish to increase the size of a string column. To see the `change` method in action, let's increase the size of the `name` column from 25 to 50: Schema::table('users', function ($table) { $table->string('name', 50)->change(); @@ -294,6 +294,8 @@ We could also modify a column to be nullable: Schema::table('users', function ($table) { $table->string('name', 50)->nullable()->change(); }); + +> {note} These column types can _NOT_ be changed in this way: `char, double, enum, mediumInteger, timestamp, tinyInteger, ipAddress, json, jsonb, macAddress, mediumIncrements, morphs, nullableTimestamps, softDeletes, timeTz, timestampTz, timestamps, timestampsTz, unsignedMediumInteger, unsignedTinyInteger, uuid`. > {note} Modifying any column in a table that also has a column of type `enum` is not currently supported.