From 6954627f6cb740d5f3264ec558efb68f0091f543 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 21 Dec 2020 12:22:37 +0100 Subject: [PATCH] Document support for renaming database table columns via PHP API (#111) Close #105 --- pages/migration/wsc-53/migration_wsc-53_php.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pages/migration/wsc-53/migration_wsc-53_php.md b/pages/migration/wsc-53/migration_wsc-53_php.md index 6ad3ec3a..cbe5f957 100644 --- a/pages/migration/wsc-53/migration_wsc-53_php.md +++ b/pages/migration/wsc-53/migration_wsc-53_php.md @@ -52,6 +52,20 @@ For further details on these methods, please refer to the [documentation in the {% include callout.html content="Do not interact directly with the flood control database table but only via the `FloodControl` class!" type="warning" %} +## PHP Database API + +The PHP API to add and change database tables during package installations and updates in the `wcf\system\database\table` namespace now also supports renaming existing table columns with the new `IDatabaseTableColumn::renameTo()` method: + +```php +PartialDatabaseTable::create('wcf1_test') + ->columns([ + NotNullInt10DatabaseTableColumn::create('oldName') + ->renameTo('newName') + ]); +``` + +{% include callout.html content="Like with every change to existing database tables, packages can only rename columns that they installed." type="info" %} + ## Captcha The reCAPTCHA v1 implementation was completely removed. -- 2.20.1