Commit a30e8816 authored by Steve Müller's avatar Steve Müller

add more assertions for partial index test case

parent fe169520
......@@ -363,6 +363,15 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
$comparator = new Schema\Comparator();
$this->assertFalse($comparator->diffTable($offlineTable, $onlineTable));
$this->assertTrue($onlineTable->hasIndex('simple_partial_index'));
$this->assertTrue($onlineTable->hasIndex('complex_partial_index'));
$this->assertTrue($onlineTable->getIndex('simple_partial_index')->hasOption('where'));
$this->assertTrue($onlineTable->getIndex('complex_partial_index')->hasOption('where'));
$this->assertSame('(id IS NULL)', $onlineTable->getIndex('simple_partial_index')->getOption('where'));
$this->assertSame(
'(((id IS NOT NULL) AND (name IS NULL)) AND (email IS NULL))',
$onlineTable->getIndex('complex_partial_index')->getOption('where')
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment