From 816ff5bb807887608d518dfbf02065ad76096f7f Mon Sep 17 00:00:00 2001 From: Zoli06 Date: Sat, 17 Oct 2026 16:07:06 +0200 Subject: [PATCH] Remove warning about composite primary key adjustment in articles_tags migration --- .../en/tutorials-and-examples/cms/database.md | 23 +------------------ 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/docs/en/tutorials-and-examples/cms/database.md b/docs/en/tutorials-and-examples/cms/database.md index 32b1d38543..7570a22fa3 100644 --- a/docs/en/tutorials-and-examples/cms/database.md +++ b/docs/en/tutorials-and-examples/cms/database.md @@ -96,28 +96,7 @@ class CreateArticles extends BaseMigration ::: -::: warning Composite Primary Key Adjustment -The `articles_tags` migration will need manual adjustment. The generated migration sets both columns to auto-increment: - -```php -$table->addColumn('article_id', 'integer', [ - 'autoIncrement' => true, // [!code --] - 'default' => null, - 'limit' => 11, - 'null' => false, -]); -$table->addColumn('tag_id', 'integer', [ - 'autoIncrement' => true, // [!code --] - 'default' => null, - 'limit' => 11, - 'null' => false, -]); -``` - -Remove the `autoIncrement` lines before running the migration to prevent foreign key problems. -::: - -Once the `articles_tags` migration is corrected, run the migrations to create the tables: +Run the migrations to create the tables: ```bash bin/cake migrations migrate