Browse Source

Fix boolean column defaults.

Postgres gets mad when booleans get integers.
mark_story 12 years ago
parent
commit
50f90b03b2
2 changed files with 4 additions and 8 deletions
  1. 2 4
      tests/Fixture/BakeArticleFixture.php
  2. 2 4
      tests/Fixture/CounterCachePostFixture.php

+ 2 - 4
tests/Fixture/BakeArticleFixture.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * BakeArticleFixture
- *
  * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *
@@ -19,7 +17,7 @@ namespace Cake\Test\Fixture;
 use Cake\TestSuite\Fixture\TestFixture;
 
 /**
- * Short description for class.
+ * BakeArticleFixture
  *
  */
 class BakeArticleFixture extends TestFixture {
@@ -34,7 +32,7 @@ class BakeArticleFixture extends TestFixture {
 		'bake_user_id' => ['type' => 'integer', 'null' => false],
 		'title' => ['type' => 'string', 'null' => false],
 		'body' => 'text',
-		'published' => ['type' => 'boolean', 'length' => 1, 'default' => 0],
+		'published' => ['type' => 'boolean', 'length' => 1, 'default' => false],
 		'created' => 'datetime',
 		'updated' => 'datetime',
 		'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]

+ 2 - 4
tests/Fixture/CounterCachePostFixture.php

@@ -1,7 +1,5 @@
 <?php
 /**
- * Counter Cache Test Fixtures
- *
  * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  *
@@ -19,7 +17,7 @@ namespace Cake\Test\Fixture;
 use Cake\TestSuite\Fixture\TestFixture;
 
 /**
- * Short description for class.
+ * Counter Cache Test Fixtures
  *
  */
 class CounterCachePostFixture extends TestFixture {
@@ -28,7 +26,7 @@ class CounterCachePostFixture extends TestFixture {
 		'id' => ['type' => 'integer'],
 		'title' => ['type' => 'string', 'length' => 255],
 		'user_id' => ['type' => 'integer', 'null' => true],
-		'published' => ['type' => 'boolean', 'null' => false, 'default' => 0],
+		'published' => ['type' => 'boolean', 'null' => false, 'default' => false],
 		'_constraints' => ['primary' => ['type' => 'primary', 'columns' => ['id']]]
 	);