Skip to content

Tags: cakephp/migrations

Tags

5.0.4

Toggle 5.0.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix checkSync() to only consider migrations from current context (#1061)

When using the unified `cake_migrations` table, `BakeMigrationDiffCommand::checkSync()`
was comparing the last migrated version (from ALL contexts including plugins) against
the last migration file in the current context (app or specific plugin).

This caused false "not in sync" errors when a plugin had more recent migrations
than the app being baked.

The fix filters migrated versions to only consider those that have corresponding
files in the current context before comparing.

Fixes #1060

5.0.3

Toggle 5.0.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix LONGTEXT columns becoming TEXT in generated migrations (#1050)

The issue was a mismatch between CakePHP's LENGTH_LONG constant (4294967295)
and migrations' TEXT_LONG constant (2147483647).

When using `bake migration_diff`, CakePHP's schema reflection returns
LENGTH_LONG for LONGTEXT columns, but MysqlAdapter expected TEXT_LONG.

This fix:
1. MigrationHelper: Convert LENGTH_LONG to TEXT_LONG when generating migrations
2. MysqlAdapter: Accept both constants for backward compatibility with existing
   migrations that have the wrong value

Fixes #1029

5.0.2

Toggle 5.0.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Add TYPE_BIT constant to AdapterInterface (#1013)

* Add TYPE_BIT constant to AdapterInterface

Adds the TYPE_BIT constant mapping to TableSchemaInterface::TYPE_BIT
for consistency with the core BIT type support added in cakephp/cakephp#19223.

This allows migration users to reference AdapterInterface::TYPE_BIT
when defining BIT columns in MySQL migrations.

* Bump cakephp/database constraint to ^5.3.2 for TYPE_BIT support

4.9.6

Toggle 4.9.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #1025 from cakephp/fix/uuid-collation-workaround

Fix column collation not applied for uuid type

5.0.1

Toggle 5.0.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Docs: Add version header and What's New section (#1019)

Adds "5.x" to the main documentation title and a prominent
"What's New in 5.x" section highlighting key features.

This helps users understand which version the documentation
covers, reducing confusion when following v5-specific features
while using v4.x.

Refs #1018

5.0.0

Toggle 5.0.0's commit message
Merge branch '4.x' into 5.x

4.9.5

Toggle 4.9.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Backport bug fixes from 5.x branch (#1005)

This backports several important bug fixes from recent 5.x PRs:

**From PR #1001 (Fix release readiness issues for 5.x):**

- Fix copy-paste bug in Migrator::shouldDropTables() using $messages['down']
  instead of $messages['missing']
- Fix uninitialized $command property in Migrations.php
- Fix weak equality in Table::saveData() (use !== instead of !=)
- Replace assert() with explicit RuntimeException in BaseSeed for
  production safety
- Fix DumpCommand using non-existent $io->error() method (should be $io->err())
- Replace unsafe addslashes() with proper driver escaping (schemaValue())
  for column comments in MysqlAdapter::getRenameColumnInstructions()

**From PR #1002 (Quote database names in PostgreSQL and SQL Server adapters):**

- PostgresAdapter: Quote database name and charset in createDatabase()
- PostgresAdapter: Quote database name in dropDatabase()
- SqlserverAdapter: Use quoteSchemaName() instead of manual brackets in
  createDatabase() and dropDatabase()
- SqlserverAdapter: Fix SQL injection vulnerability in dropDatabase()

**From PR #1003 (Improve SQL quoting and fix docblock issues):**

- SqlserverAdapter: Use quoteString() for sp_rename parameters in
  getRenameTableInstructions() and getRenameColumnInstructions()
- PostgresAdapter/SqlserverAdapter: Use quoteColumnName() for foreign key
  column definitions instead of hard-coded double quotes

4.9.4

Toggle 4.9.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Merge pull request #1000 from cakephp/binary-column-mysql

Fix small binary column creation

4.9.3

Toggle 4.9.3's commit message
Remove redundant teardown

4.9.2

Toggle 4.9.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix error running migrations with type `timestamptimezone` (#979)

Add test capturing the generation of snapshots using `timestamptimezone`

This is a cakephp/database abstract type, which is fine with the
built-in backend.

* Fix running migrations with timestamptimezone type. We generate 
  migrations with this type which is a cakephp/database type.
  It should be allowed in platforms that support it.
* Make behavior generic as all backends support this type.