[TYPO3-core] RFC #16912: Bug: Install complains about default values in ext_tables.sql

Christian Futterlieb christian at futterlieb.ch
Mon Feb 28 09:58:00 CET 2011


Reminder

On 02/11/2011 10:17 AM, Christian Futterlieb wrote:
> Hi core list.
>
> This is an SVN patch request.
>
> Type: Bugfix
>
> Bugtracker references:
> http://http://bugs.typo3.org/view.php?id=16912
>
> Branches:
> trunk
> TYPO3-4.5
> TYPO3-4.4
>
> Problem:
> When a field with a datatype which is not blob or text has NULL as
> default value, install treats the default value as ''.
>
> Solution:
> Add a check for default field value is not NULL.
>
> How to test:
> 1. Create a field with a definition like this in ext_tables.sql:
>
> my_nullvalue int(11)
>
> 2. Compare database will add the field correctly:
>
> ALTER TABLE my_table ADD my_nullvalue int(11);
>
> 3. Re-comparing database will report:
>
> ALTER TABLE my_table CHANGE my_nullvalue my_nullvalue int(11);
> Current value: int(11) default ''
>
> 4. Apply the patch
>
> 5. Re-compare database
> The field my_nullvalue should not appear anymore in 'changing fields'
>
> Notes:
> First: I'm not sure if this bugfix raises any unwished influences?
> Second: this patch only suppresses unneeded output in install. IMO
> install should know about NULL values and handle those sql statements
> correctly. I'll try to come up with another patch for fixing this in
> general.
>
> Best regards
>
> Christian


More information about the TYPO3-team-core mailing list