[TYPO3-dev] ext_tables, sql: Add fields only to tables that do exist
Michael Knabe
typo3 at mfkhh.de
Tue Mar 1 13:13:02 CET 2011
Hi,
I have an extension that recommends some other extensions and needs to
add a DB-Field to those extensions tables. However, if you do not
install the recommended extensions the tables should not be created. Is
there any way to say
ALTER TABLE tt_news ADD tx_myext_myfield int(1) NOT NULL default '0';
instead of
CREATE TABLE tt_news IF EXISTS (
tx_myext_myfield int(11) DEFAULT '0' NOT NULL
);
so the table does not get created if it doesn't exist.
I tried the statement above but it is not recognized by the
4.4-extension manager
Cheers,
Michael
More information about the TYPO3-dev
mailing list