You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1056,21 +1057,31 @@ We could also modify a column to be nullable:
1056
1057
> The following column types can be modified: `bigInteger`, `binary`, `boolean`, `char`, `date`, `dateTime`, `dateTimeTz`, `decimal`, `double`, `integer`, `json`, `longText`, `mediumText`, `smallInteger`, `string`, `text`, `time`, `tinyText`, `unsignedBigInteger`, `unsignedInteger`, `unsignedSmallInteger`, and `uuid`. To modify a `timestamp` column type a [Doctrine type must be registered](#prerequisites).
1057
1058
1058
1059
<aname="renaming-columns"></a>
1059
-
####Renaming Columns
1060
+
### Renaming Columns
1060
1061
1061
-
To rename a column, you may use the `renameColumn` method provided by the schema builder blueprint. Before renaming a column, ensure that you have installed the `doctrine/dbal` library via the Composer package manager:
1062
+
To rename a column, you may use the `renameColumn` method provided by the schema builder:
1062
1063
1063
1064
Schema::table('users', function (Blueprint $table) {
1064
1065
$table->renameColumn('from', 'to');
1065
1066
});
1066
1067
1067
-
> **Warning**
1068
-
> Renaming an `enum` column is not currently supported.
If you are running a database installation older than one of the following releases, you should ensure that you have installed the `doctrine/dbal` library via the Composer package manager before renaming a column:
1072
+
1073
+
<divclass="content-list"markdown="1">
1074
+
1075
+
- MySQL < `8.0.3`
1076
+
- MariaDB < `10.5.2`
1077
+
- SQLite < `3.25.0`
1078
+
1079
+
</div>
1069
1080
1070
1081
<aname="dropping-columns"></a>
1071
1082
### Dropping Columns
1072
1083
1073
-
To drop a column, you may use the `dropColumn` method on the schema builder blueprint. If your application is utilizing an SQLite database, you must install the `doctrine/dbal` package via the Composer package manager before the `dropColumn` method may be used:
1084
+
To drop a column, you may use the `dropColumn` method on the schema builder:
1074
1085
1075
1086
Schema::table('users', function (Blueprint $table) {
1076
1087
$table->dropColumn('votes');
@@ -1082,8 +1093,11 @@ You may drop multiple columns from a table by passing an array of column names t
If you are running a version of SQLite prior to `3.35.0`, you must install the `doctrine/dbal` package via the Composer package manager before the `dropColumn` method may be used. Dropping or modifying multiple columns within a single migration while using this package is not supported.
1087
1101
1088
1102
<aname="available-command-aliases"></a>
1089
1103
#### Available Command Aliases
@@ -1167,6 +1181,9 @@ To rename an index, you may use the `renameIndex` method provided by the schema
1167
1181
1168
1182
$table->renameIndex('from', 'to')
1169
1183
1184
+
> **Warning**
1185
+
> If your application is utilizing an SQLite database, you must install the `doctrine/dbal` package via the Composer package manager before the `renameIndex` method may be used.
0 commit comments