From 86ef281d8f2929a1d8114b6fc7975d6db56fa724 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Wed, 21 Mar 2012 11:53:38 +1300 Subject: [PATCH] BUGFIX: #7019 Fix SQL error when building database after adding a Member DataExtension in non-dev mode --- security/Security.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/security/Security.php b/security/Security.php index 61ff93635..671f9f62a 100644 --- a/security/Security.php +++ b/security/Security.php @@ -809,6 +809,10 @@ class Security extends Controller { foreach($requiredTables as $table) { // if any of the tables aren't created in the database if(!ClassInfo::hasTable($table)) return false; + + // HACK: DataExtensions aren't applied until a class is instantiated for + // the first time, so create an instance here. + singleton($table); // if any of the tables don't have all fields mapped as table columns $dbFields = DB::fieldList($table);