Skip to content

Commit

Permalink
Expose support for transactional DDL or lack thereof
Browse files Browse the repository at this point in the history
Clients may need that information, notably in the context of SQL
migrations.
  • Loading branch information
greg0ire committed Jan 14, 2021
1 parent ee6d126 commit 5f085e7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Platforms/AbstractPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -3118,6 +3118,14 @@ public function supportsTransactions()
return true;
}

/**
* Whether it is safe to wrap DDL statements in transactions
*/
public function supportsTransactionalDDL(): bool
{
return true;
}

/**
* Whether the platform supports savepoints.
*
Expand Down
8 changes: 8 additions & 0 deletions src/Platforms/MySQLPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,14 @@ public function supportsColumnCollation()
return true;
}

/**
* @see https://dev.mysql.com/doc/internals/en/transactions-current-situation.html
*/
public function supportsTransactionalDDL(): bool
{
return false;
}

/**
* {@inheritDoc}
*/
Expand Down

0 comments on commit 5f085e7

Please sign in to comment.