Skip to content

Commit

Permalink
Added test case
Browse files Browse the repository at this point in the history
  • Loading branch information
vol4onok committed Mar 28, 2024
1 parent f4889ff commit da1385e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Propel\Generator\Platform\Util;

use Propel\Generator\Model\Table;
use Propel\Generator\Util\SqlParser;

/**
* Merges several ALTER TABLE statements when creating migrations.
Expand Down Expand Up @@ -67,6 +68,10 @@ public function __construct(Table $table)
public function mergeStatements(string $sql): string
{
$statements = explode(';', $sql);
// $sqlParser = new SqlParser();
// $sqlParser->setSQL($sql);
// $statements = $sqlParser->explodeIntoStatements();

$blocks = [];
$currentBlock = [];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function providerForTestGetModifyTableDDL()
<table name="foo">
<column name="id" primaryKey="true" type="INTEGER" autoIncrement="true"/>
<column name="bar1" type="INTEGER"/>
<column name="baz" type="VARCHAR" size="12" required="false"/>
<column name="baz" type="VARCHAR" size="12" required="false" defaultValue="pdf;jpg;png;doc;docx;xls;xlsx;txt"/>
<column name="baz3" type="LONGVARCHAR"/>
<foreign-key name="foo1_fk_1" foreignTable="foo2">
<reference local="bar1" foreign="bar"/>
Expand Down

0 comments on commit da1385e

Please sign in to comment.