Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/en/advanced/integration-and-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ the application code becomes active.
After running migrations, remember to clear the ORM cache so it renews the
column metadata of your tables. Otherwise, you might end up with errors about
columns not existing when performing operations on those new columns. The
CakePHP core includes a [Schema Cache Shell](https://book.cakephp.org/5/en/console-and-shells/schema-cache.html) that you can use:
CakePHP core includes a [Schema Cache Shell](https://book.cakephp.org/5/console-commands/schema-cache.html) that you can use:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt it https://book.cakephp.org/5.x/console-commands/schema-cache.html etc?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the other links were in that format, so I left it as is since it redirects to 5.x I can change it to explicitly do 5.x if you prefer

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know what @LordSimal or @josbeir would recommend here, lets wait for them.
Great initiative!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both /5/ and /5.x/ are valid and work.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5.x is the "correct" version here as we have a redirect for 5 => 5.x or basically any version as you can see here


```bash
bin/cake migrations migrate
Expand Down
2 changes: 1 addition & 1 deletion docs/en/getting-started/creating-migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class CreateProducts extends BaseMigration
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/writing-migrations.html#the-change-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-change-method
* @return void
*/
public function change(): void
Expand Down
4 changes: 2 additions & 2 deletions docs/en/guides/seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class MyNewSeed extends BaseSeed
* Write your database seed using this method.
*
* More information on writing seeds is available here:
* https://book.cakephp.org/migrations/5/en/seeding.html
* https://book.cakephp.org/migrations/5/guides/seeding.html
*/
public function run() : void
{
Expand Down Expand Up @@ -88,7 +88,7 @@ return new class extends BaseSeed
* Write your database seeder using this method.
*
* More information on writing seeds is available here:
* https://book.cakephp.org/migrations/5/en/seeding.html
* https://book.cakephp.org/migrations/5/guides/seeding.html
*/
public function run(): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/Command/BakeMigrationCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function templateData(Arguments $arguments): array
$action = $this->detectAction($className);

if (!$action && count($fields)) {
$this->io->abort('When applying fields the migration name should start with one of the following prefixes: `Create`, `Drop`, `Add`, `Remove`, `Alter`. See: https://book.cakephp.org/migrations/5/en/index.html#migrations-file-name');
$this->io->abort('When applying fields the migration name should start with one of the following prefixes: `Create`, `Drop`, `Add`, `Remove`, `Alter`. See: https://book.cakephp.org/migrations/5/getting-started/creating-migrations.html#migration-file-names');
}

if (!$action) {
Expand Down
2 changes: 1 addition & 1 deletion templates/bake/Seed/seed-anonymous.twig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ return new class extends BaseSeed
* Write your database seeder using this method.
*
* More information on writing seeds is available here:
* https://book.cakephp.org/migrations/5/en/seeding.html
* https://book.cakephp.org/migrations/5/guides/seeding.html
*
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/bake/Seed/seed.twig
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class {{ name }}Seed extends BaseSeed
* Write your database seeder using this method.
*
* More information on writing seeds is available here:
* https://book.cakephp.org/migrations/5/en/seeding.html
* https://book.cakephp.org/migrations/5/guides/seeding.html
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions templates/bake/config/diff.twig
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class {{ name }} extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -118,7 +118,7 @@ not empty %}
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion templates/bake/config/skeleton-anonymous.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ return new class extends BaseMigration
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-change-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-change-method
* @return void
*/
public function change(): void
Expand Down
2 changes: 1 addition & 1 deletion templates/bake/config/skeleton.twig
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class {{ name }} extends BaseMigration
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-change-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-change-method
*
* @return void
*/
Expand Down
6 changes: 3 additions & 3 deletions templates/bake/config/snapshot.twig
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class {{ name }} extends BaseMigration
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-change-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-change-method
*
* @return void
*/
Expand All @@ -52,7 +52,7 @@ class {{ name }} extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand All @@ -69,7 +69,7 @@ class {{ name }} extends BaseMigration
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Create/TestCreateChange.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestCreateChange extends BaseMigration
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-change-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-change-method
* @return void
*/
public function change(): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffAddRemoveMysql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -41,7 +41,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffAddRemovePgsql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand All @@ -33,7 +33,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class InitialDecimalChangeMysql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand All @@ -29,7 +29,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffDecimalChangeMysql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand All @@ -36,7 +36,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/comparisons/Diff/default/the_diff_default_mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffDefaultMysql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -139,7 +139,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/comparisons/Diff/default/the_diff_default_pgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffDefaultPgsql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -126,7 +126,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/comparisons/Diff/simple/the_diff_simple_mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffSimpleMysql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -81,7 +81,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/comparisons/Diff/simple/the_diff_simple_pgsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffSimplePgsql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -62,7 +62,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TheDiffWithAutoIdCompatibleSignedPrimaryKeysMysql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand All @@ -25,7 +25,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TheDiffWithAutoIdIncompatibleSignedPrimaryKeysMysql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand All @@ -35,7 +35,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TheDiffWithAutoIdIncompatibleUnsignedPrimaryKeysMysql extends BaseMigratio
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand All @@ -35,7 +35,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TestSnapshotAutoIdDisabledPgsql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -409,7 +409,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestSnapshotNotEmptyPgsql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -349,7 +349,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestSnapshotPluginBlogPgsql extends BaseMigration
* Up Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-up-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-up-method
*
* @return void
*/
Expand Down Expand Up @@ -349,7 +349,7 @@ public function up(): void
* Down Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-down-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-down-method
*
* @return void
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class TestSnapshotWithChangePgsql extends BaseMigration
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/migrations/5/en/migrations.html#the-change-method
* https://book.cakephp.org/migrations/5/guides/writing-migrations/migration-methods.html#the-change-method
*
* @return void
*/
Expand Down
Loading
Loading