[FOLLOWUP][BUGFIX] Fix sys_log table on strict database 70/49270/3
authorSteffen Müller <typo3@t3node.com>
Fri, 29 Jul 2016 15:34:11 +0000 (17:34 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 30 Jul 2016 00:05:00 +0000 (02:05 +0200)
The column details must have a default value
because of NOT NULL.

Resolves: #77306
Releases: master
Change-Id: I5b564f8d3c20cc8c7164045201bb2ee5797cbeb6
Reviewed-on: https://review.typo3.org/49270
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/core/Classes/Log/Writer/DatabaseWriter.php
typo3/sysext/core/Tests/Functional/Log/Writer/DatabaseWriterTest.php
typo3/sysext/core/ext_tables.sql

index 156bb1c..7916e91 100644 (file)
@@ -76,8 +76,7 @@ class DatabaseWriter extends AbstractWriter
             'component' => $record->getComponent(),
             'level' => $record->getLevel(),
             'message' => $record->getMessage(),
-            'data' => $data,
-            'details' => ''
+            'data' => $data
         );
 
         GeneralUtility::makeInstance(ConnectionPool::class)
index d49d837..33030b0 100644 (file)
@@ -37,8 +37,7 @@ class DatabaseWriterTest extends FunctionalTestCase
             'component' => 'aComponent',
             'level' => LogLevel::DEBUG,
             'message' => 'aMessage',
-            'data' => '',
-            'details' => ''
+            'data' => ''
         );
         $logRecord = new LogRecord(
             $logRecordData['component'],
index 5105373..0de38dd 100644 (file)
@@ -601,7 +601,7 @@ CREATE TABLE sys_log (
        tablename varchar(255) DEFAULT '' NOT NULL,
        recpid int(11) DEFAULT '0' NOT NULL,
        error tinyint(4) unsigned DEFAULT '0' NOT NULL,
-       details text NOT NULL,
+       details text,
        tstamp int(11) unsigned DEFAULT '0' NOT NULL,
        type tinyint(3) unsigned DEFAULT '0' NOT NULL,
        details_nr tinyint(3) DEFAULT '0' NOT NULL,