Skip to content

Commit

Permalink
fix(Table): support for index declared with single field as string
Browse files Browse the repository at this point in the history
  • Loading branch information
alquerci committed Apr 12, 2024
1 parent 931eef1 commit 64c8117
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/Table/IndexesUsingSingleFieldStringTestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

class Doctrine_Table_IndexesUsingSingleFieldString_TestCase extends Doctrine_UnitTestCase
{
public function prepareTables()
{
$this->tables = array('IndexesUsingSingleFieldStringTestCase');

parent::prepareTables();
}

public function testSupportIndexesUsingSingleFieldString()
{
}
}

class IndexDeclaredWithSingleFieldStringRecord extends Doctrine_Record
{
public function setTableDefinition()
{
$this->hasColumn('some_column_name', 'string', 255);

$this->index('single_field_index_as_string', array(
'fields' => 'some_column_name',
));
}
}
1 change: 1 addition & 0 deletions tests/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
$core->addTestCase(new Doctrine_Table_TestCase());
$core->addTestCase(new Doctrine_Table_RemoveColumn_TestCase());
$core->addTestCase(new Doctrine_Table_NamedQuery_TestCase());
$core->addTestCase(new Doctrine_Table_IndexesUsingSingleFieldString_TestCase());
$core->addTestCase(new Doctrine_UnitOfWork_TestCase());
$core->addTestCase(new Doctrine_Collection_TestCase());
$core->addTestCase(new Doctrine_Collection_Snapshot_TestCase());
Expand Down

0 comments on commit 64c8117

Please sign in to comment.