[TYPO3-english] cooluri bug

Jigal van Hemert jigal at xs4all.nl
Sun Dec 18 11:51:47 CET 2011


Hi,

On 18-12-2011 6:40, Markus Klein wrote:
>
> closer look at the sql files now. It would be sufficient to move the
> CREATE TABLE statements from ext_tables_static+adt.sql (which is the
> only content) into ext_tables.sql and they would be accepted.
> (Without any TCA definition)

ext_tables.sql should contain the table definitions and 
ext_tables_static+adt.sql can contain statements that will be executed 
when the extension is installed (static data, etc.).

> Trying to solve these issues requires some insignificant changes to
> the field definitions. As image [2] illustrates, it is not possible
> to get rid of all issues, as the default value reporting of mysql
> (SHOW COLUMNS...) maps the default values ['', CURRENT_TIMESTAMP,
> NULL] to NULL. So the Installer's COMPARE function cannot distinguish
> between these default values and therefore compares them to default
> ''.

That is because the those current_timestamp constructions are not DBAL 
compatible. AFAIK it's MySQL specific and thus not supported by the 
Install Tool. crdate/tstamp values are handled by application logic and 
not by the database in TYPO3. If you use 
t3lib_TCEmain::process_datamap() to handle records tstamp fields are 
updated, crdate fields are filled, etc.
If crdatetime was called crdate (an integer) and the logic handled by 
the code, it would be completely compatible.

>>> I'd suggest introducing a new Installer setting for this purpose.
>>> If I'm not the only one who's interested I'll give it a shot and
>>> implement this feature.
>>
>> Why?? The TYPO3 Core does not need to take things into account
>> which do not follow TYPO3 conventions. -2
>
> 1.) -2 is ok, that's why I'm asking. ;-) 2.) It's totally correct
> what you say, but actually TYPO3 does. It suggests removing tables,
> which do not follow the conventions and might not be related to
> TYPO3.

Sorry, my words were a bit clumsy. TYPO3 doesn't support the presence of 
tables which are not defined in the core or in an extension. The Install 
Tool detects such a table and (rightfully) suggests to remove it.

TYPO3 uses a subset of MySQL functionality for tables, columns and 
queries to be able to support a range of DBMSs. If an extension author 
takes the trouble (which is rather simple) to follow these rules the 
extension can also work on Oracle, PostgreSQL, MSSQL and contribute to 
TYPO3 being an Enterprise level system...

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert.


More information about the TYPO3-english mailing list