From c4861bcb6abedf4fd8fa801d12886b6ed2f175a1 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Wed, 19 Apr 2023 09:48:28 +0200 Subject: [PATCH] fix(devmanual): Drop outdated database.xml information Signed-off-by: Christoph Wurst --- .../basics/storage/migrations.rst | 37 ++----------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/developer_manual/basics/storage/migrations.rst b/developer_manual/basics/storage/migrations.rst index f9432eca4..9058726dd 100644 --- a/developer_manual/basics/storage/migrations.rst +++ b/developer_manual/basics/storage/migrations.rst @@ -4,48 +4,17 @@ Migrations ========== -In the past, apps had a `appinfo/database.xml`-file which holds their database schema -for installation and update and was a functional method for installing apps which -had some trouble with upgrading apps (e.g. apps were not able to rename columns -without losing the data stored in the original column): - -.. code-block:: php - - - - *dbname* - true - false - utf8 - - *dbprefix*twofactor_backupcodes - - - id - integer - 1 - 0 - true - 4 - - ... - - -The limitations of this method will be bypassed with migrations. A migration can -consist of 3 different methods: +Migrations change the database schema and operate in three steps: * Pre schema changes -* Actual schema changes +* Schema changes * Post schema changes Apps can have multiple migrations, which allows a way more flexible updating process. For example, you can rename a column while copying all the content with 3 steps packed in 2 migrations. -After creating migrations for your current database and installation routine, -in order to make use of migrations, you need to delete the old `appinfo/database.xml` -file. The Nextcloud updater logic only allows to use one or the other. -But as soon as the `database.xml` file is gone, it will look for your migration +The Nextcloud updater logic will look for your migration files in the apps `lib/Migration` folder. .. note:: While in theory you can run any code in the pre- and post-steps, we