From c6fdcea3aac0ebc5207292683d51a0db18ce1c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edgaras=20Janu=C5=A1auskas?= Date: Thu, 17 Dec 2015 22:38:35 +0200 Subject: [PATCH] Clear model cache after schema update. --- lib/Cake/Console/Command/SchemaShell.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 8589d1238..a2ddfcc0a 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -403,6 +403,9 @@ class SchemaShell extends AppShell { $this->out(); $this->out(__d('cake_console', 'Updating Database...')); $this->_run($contents, 'update', $Schema); + + Configure::write('Cache.disable', false); + Cache::clear(false, '_cake_model_'); } $this->out(__d('cake_console', 'End update.'));