Skip to content

Commit 0e0ba8b

Browse files
[11.x] Remove Doctrine DBAL (#9251)
1 parent 7873578 commit 0e0ba8b

File tree

2 files changed

+2
-51
lines changed

2 files changed

+2
-51
lines changed

dusk.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,6 @@ The `DatabaseMigrations` trait will run your database migrations before each tes
173173
<a name="reset-truncation"></a>
174174
#### Using Database Truncation
175175

176-
Before using the `DatabaseTruncation` trait, you must install the `doctrine/dbal` package using the Composer package manager:
177-
178-
```shell
179-
composer require --dev doctrine/dbal
180-
```
181-
182176
The `DatabaseTruncation` trait will migrate your database on the first test in order to ensure your database tables have been properly created. However, on subsequent tests, the database's tables will simply be truncated - providing a speed boost over re-running all of your database migrations:
183177

184178
<?php

migrations.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -960,14 +960,14 @@ Modifier | Description
960960
`->after('column')` | Place the column "after" another column (MySQL).
961961
`->autoIncrement()` | Set INTEGER columns as auto-incrementing (primary key).
962962
`->charset('utf8mb4')` | Specify a character set for the column (MySQL).
963-
`->collation('utf8mb4_unicode_ci')` | Specify a collation for the column (MySQL/PostgreSQL/SQL Server).
963+
`->collation('utf8mb4_unicode_ci')` | Specify a collation for the column.
964964
`->comment('my comment')` | Add a comment to a column (MySQL/PostgreSQL).
965965
`->default($value)` | Specify a "default" value for the column.
966966
`->first()` | Place the column "first" in the table (MySQL).
967967
`->from($integer)` | Set the starting value of an auto-incrementing field (MySQL / PostgreSQL).
968968
`->invisible()` | Make the column "invisible" to `SELECT *` queries (MySQL).
969969
`->nullable($value = true)` | Allow NULL values to be inserted into the column.
970-
`->storedAs($expression)` | Create a stored generated column (MySQL / PostgreSQL).
970+
`->storedAs($expression)` | Create a stored generated column (MySQL / PostgreSQL / SQLite).
971971
`->unsigned()` | Set INTEGER columns as UNSIGNED (MySQL).
972972
`->useCurrent()` | Set TIMESTAMP columns to use CURRENT_TIMESTAMP as default value.
973973
`->useCurrentOnUpdate()` | Set TIMESTAMP columns to use CURRENT_TIMESTAMP when a record is updated (MySQL).
@@ -1032,28 +1032,6 @@ When modifying a column, you must explicitly include all of the modifiers you wa
10321032
$table->integer('votes')->unsigned()->default(1)->comment('my comment')->change();
10331033
});
10341034

1035-
<a name="modifying-columns-on-sqlite"></a>
1036-
#### Modifying Columns on SQLite
1037-
1038-
If your application is utilizing an SQLite database, you must install the `doctrine/dbal` package using the Composer package manager before modifying a column. The Doctrine DBAL library is used to determine the current state of the column and to create the SQL queries needed to make the requested changes to your column:
1039-
1040-
composer require doctrine/dbal
1041-
1042-
If you plan to modify columns created using the `timestamp` method, you must also add the following configuration to your application's `config/database.php` configuration file:
1043-
1044-
```php
1045-
use Illuminate\Database\DBAL\TimestampType;
1046-
1047-
'dbal' => [
1048-
'types' => [
1049-
'timestamp' => TimestampType::class,
1050-
],
1051-
],
1052-
```
1053-
1054-
> [!WARNING]
1055-
> When using the `doctrine/dbal` package, 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`, `ulid`, and `uuid`.
1056-
10571035
<a name="renaming-columns"></a>
10581036
### Renaming Columns
10591037

@@ -1063,19 +1041,6 @@ To rename a column, you may use the `renameColumn` method provided by the schema
10631041
$table->renameColumn('from', 'to');
10641042
});
10651043

1066-
<a name="renaming-columns-on-legacy-databases"></a>
1067-
#### Renaming Columns on Legacy Databases
1068-
1069-
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:
1070-
1071-
<div class="content-list" markdown="1">
1072-
1073-
- MySQL < `8.0.3`
1074-
- MariaDB < `10.5.2`
1075-
- SQLite < `3.25.0`
1076-
1077-
</div>
1078-
10791044
<a name="dropping-columns"></a>
10801045
### Dropping Columns
10811046

@@ -1091,11 +1056,6 @@ You may drop multiple columns from a table by passing an array of column names t
10911056
$table->dropColumn(['votes', 'avatar', 'location']);
10921057
});
10931058

1094-
<a name="dropping-columns-on-legacy-databases"></a>
1095-
#### Dropping Columns on Legacy Databases
1096-
1097-
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.
1098-
10991059
<a name="available-command-aliases"></a>
11001060
#### Available Command Aliases
11011061

@@ -1176,9 +1136,6 @@ To rename an index, you may use the `renameIndex` method provided by the schema
11761136

11771137
$table->renameIndex('from', 'to')
11781138

1179-
> [!WARNING]
1180-
> 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.
1181-
11821139
<a name="dropping-indexes"></a>
11831140
### Dropping Indexes
11841141

0 commit comments

Comments
 (0)