Skip to content

Commit 8dcdf5c

Browse files
committed
prepare unit tests for all other platforms
1 parent c4d9ade commit 8dcdf5c

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

src/Propel/Generator/Platform/PgsqlPlatform.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,8 @@ public function getDropIndexDDL(Index $index)
683683
{
684684
if ($index instanceof Unique) {
685685
$pattern = "
686-
ALTER TABLE %s DROP CONSTRAINT %s;
687-
";
686+
ALTER TABLE %s DROP CONSTRAINT %s;
687+
";
688688

689689
return sprintf($pattern,
690690
$this->quoteIdentifier($index->getTable()->getName()),

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,12 @@ public function testGetModifyTableIndicesDDL($tableDiff)
175175
$expected = "
176176
DROP INDEX `bar_fk` ON `foo`;
177177
178+
DROP INDEX `bax_unique` ON `foo`;
179+
178180
CREATE INDEX `baz_fk` ON `foo` (`baz`);
179181
182+
CREATE UNIQUE INDEX `bax_bay_unique` ON `foo` (`bax`, `bay`);
183+
180184
DROP INDEX `bar_baz_fk` ON `foo`;
181185
182186
CREATE INDEX `bar_baz_fk` ON `foo` (`id`, `bar`, `baz`);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,12 @@ public function testGetModifyTableIndicesDDL($tableDiff)
184184
$expected = "
185185
DROP INDEX `bar_fk` ON `foo`;
186186
187+
DROP INDEX `bax_unique` ON `foo`;
188+
187189
CREATE INDEX `baz_fk` ON `foo` (`baz`);
188190
191+
CREATE UNIQUE INDEX `bax_bay_unique` ON `foo` (`bax`, `bay`);
192+
189193
DROP INDEX `bar_baz_fk` ON `foo`;
190194
191195
CREATE INDEX `bar_baz_fk` ON `foo` (`id`, `bar`, `baz`);

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,12 @@ public function testGetModifyTableIndicesDDL($tableDiff)
164164
$expected = "
165165
DROP INDEX bar_fk;
166166
167+
DROP INDEX bax_unique;
168+
167169
CREATE INDEX baz_fk ON foo (baz);
168170
171+
CREATE UNIQUE INDEX bax_bay_unique ON foo (bax,bay);
172+
169173
DROP INDEX bar_baz_fk;
170174
171175
CREATE INDEX bar_baz_fk ON foo (id,bar,baz);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function testGetModifyTableIndicesDDL($tableDiff)
155155
156156
DROP INDEX "bar_fk";
157157
158-
ALTER TABLE "foo" DROP CONSTRAINT "bax_unique";
158+
ALTER TABLE "foo" DROP CONSTRAINT "bax_unique";
159159
160160
CREATE INDEX "baz_fk" ON "foo" ("baz");
161161

0 commit comments

Comments
 (0)