Skip to content

Commit da1385e

Browse files
committed
Added test case
1 parent f4889ff commit da1385e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Propel/Generator/Platform/Util/AlterTableStatementMerger.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
namespace Propel\Generator\Platform\Util;
1010

1111
use Propel\Generator\Model\Table;
12+
use Propel\Generator\Util\SqlParser;
1213

1314
/**
1415
* Merges several ALTER TABLE statements when creating migrations.
@@ -67,6 +68,10 @@ public function __construct(Table $table)
6768
public function mergeStatements(string $sql): string
6869
{
6970
$statements = explode(';', $sql);
71+
// $sqlParser = new SqlParser();
72+
// $sqlParser->setSQL($sql);
73+
// $statements = $sqlParser->explodeIntoStatements();
74+
7075
$blocks = [];
7176
$currentBlock = [];
7277

tests/Propel/Tests/Generator/Platform/PlatformMigrationTestProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function providerForTestGetModifyTableDDL()
107107
<table name="foo">
108108
<column name="id" primaryKey="true" type="INTEGER" autoIncrement="true"/>
109109
<column name="bar1" type="INTEGER"/>
110-
<column name="baz" type="VARCHAR" size="12" required="false"/>
110+
<column name="baz" type="VARCHAR" size="12" required="false" defaultValue="pdf;jpg;png;doc;docx;xls;xlsx;txt"/>
111111
<column name="baz3" type="LONGVARCHAR"/>
112112
<foreign-key name="foo1_fk_1" foreignTable="foo2">
113113
<reference local="bar1" foreign="bar"/>

0 commit comments

Comments
 (0)