Release 2.0.25 (#4066)
* added support for hourly rate column in detail table * allow to register icon in extension * allow to show QR code secret * new translations * bump theme and packages * fix validation for invoice-document-filenames with uppercase character * max upload size 1MB * fix last month in daterange-picker in certain situations, more years in quick-select * remove unused package-versions-deprecated * link preferences from contract warning message * added page_setup page layout * prevent DROP TABLE in addSQL() and replace drop table with schema call * added azuyalabs/yasumi
This commit is contained in:
@@ -64,4 +64,20 @@ abstract class AbstractMigration extends BaseAbstractMigration
|
||||
{
|
||||
$this->addSql('#prevent empty warning - no SQL to execute');
|
||||
}
|
||||
|
||||
/**
|
||||
* I don't know how often I accidentally dropped database tables,
|
||||
* because a generated "left-over" migration was executed.
|
||||
*
|
||||
* @param mixed[] $params
|
||||
* @param mixed[] $types
|
||||
*/
|
||||
protected function addSql(string $sql, array $params = [], array $types = []): void
|
||||
{
|
||||
if (str_starts_with($sql, 'DROP TABLE ')) {
|
||||
throw new \InvalidArgumentException('Cannot use addSql() with DROP TABLE');
|
||||
}
|
||||
|
||||
parent::addSql($sql, $params, $types);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user