mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
parent
77b3e63293
commit
c919b73f22
1 changed files with 16 additions and 0 deletions
|
@ -699,6 +699,22 @@ class DboPostgresTest extends CakeTestCase {
|
|||
$this->assertEqual($result['title']['null'], false);
|
||||
|
||||
$this->db->query($this->db->dropSchema($New));
|
||||
|
||||
$New =& new CakeSchema(array(
|
||||
'connection' => 'test_suite',
|
||||
'name' => 'AlterPosts',
|
||||
'alter_posts' => array(
|
||||
'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'),
|
||||
'author_id' => array('type' => 'integer', 'null' => false),
|
||||
'title' => array('type' => 'string', 'null' => true),
|
||||
'body' => array('type' => 'text'),
|
||||
'published' => array('type' => 'string', 'length' => 1, 'default' => 'N'),
|
||||
'created' => array('type' => 'datetime'),
|
||||
'updated' => array('type' => 'datetime'),
|
||||
)
|
||||
));
|
||||
$result = $this->db->alterSchema($New->compare($Old), 'alter_posts');
|
||||
$this->assertNoPattern('/varchar\(36\) NOT NULL/i', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue