From 50f90b03b2a532181f26a70843a9c8e321ad6ab0 Mon Sep 17 00:00:00 2001 From: mark_story Date: Thu, 20 Mar 2014 12:08:11 -0400 Subject: [PATCH] Fix boolean column defaults. Postgres gets mad when booleans get integers. --- tests/Fixture/BakeArticleFixture.php | 6 ++---- tests/Fixture/CounterCachePostFixture.php | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/Fixture/BakeArticleFixture.php b/tests/Fixture/BakeArticleFixture.php index 33abd26a384..b2337be6b1f 100644 --- a/tests/Fixture/BakeArticleFixture.php +++ b/tests/Fixture/BakeArticleFixture.php @@ -1,7 +1,5 @@ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @@ -19,7 +17,7 @@ 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']]] diff --git a/tests/Fixture/CounterCachePostFixture.php b/tests/Fixture/CounterCachePostFixture.php index 9018c0a782a..caf20823516 100644 --- a/tests/Fixture/CounterCachePostFixture.php +++ b/tests/Fixture/CounterCachePostFixture.php @@ -1,7 +1,5 @@ * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @@ -19,7 +17,7 @@ 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']]] );