diff --git a/contao/dca/tl_calendar.php b/contao/dca/tl_calendar.php index 59912a8..0fc077d 100644 --- a/contao/dca/tl_calendar.php +++ b/contao/dca/tl_calendar.php @@ -38,14 +38,14 @@ 'inputType' => 'text', 'exclude' => true, 'eval' => ['maxlength' => 6, 'multiple' => true, 'size' => 2, 'colorpicker' => true, 'isHexColor' => true, 'decodeEntities' => true, 'tl_class' => 'w50 wizard'], - 'sql' => "varchar(64) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 64, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar']['fields']['fg_color'] = [ 'inputType' => 'text', 'exclude' => true, 'eval' => ['maxlength' => 6, 'multiple' => true, 'size' => 2, 'colorpicker' => true, 'isHexColor' => true, 'decodeEntities' => true, 'tl_class' => 'w50 wizard'], - 'sql' => "varchar(64) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 64, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar']['fields']['isHolidayCal'] = [ @@ -53,7 +53,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['submitOnChange' => true, 'tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar']['fields']['allowEvents'] = [ @@ -61,7 +61,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar']['fields']['uniqueEvents'] = [ @@ -69,5 +69,5 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; diff --git a/contao/dca/tl_calendar_events.php b/contao/dca/tl_calendar_events.php index f776376..54b6e49 100644 --- a/contao/dca/tl_calendar_events.php +++ b/contao/dca/tl_calendar_events.php @@ -78,7 +78,7 @@ 'options' => [1, 2, 3, 4, 5, 6, 0], 'reference' => &$GLOBALS['TL_LANG']['DAYS'], 'eval' => ['multiple' => true, 'tl_class' => 'w50'], - 'sql' => "varchar(128) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 128, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['repeatFixedDates'] = [ @@ -89,7 +89,7 @@ 'buttons' => ['up' => false, 'down' => false, 'move' => false], 'minCount' => 0, ], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['ignoreEndTime'] = [ @@ -97,21 +97,21 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'long clr'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['useExceptions'] = [ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['submitOnChange' => true, 'tl_class' => 'long clr'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['showOnFreeDay'] = [ 'exclude' => true, 'filter' => false, 'inputType' => 'checkbox', - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['weekday'] = [ @@ -120,7 +120,7 @@ 'inputType' => 'select', 'options' => [0, 1, 2, 3, 4, 5, 6], 'reference' => &$GLOBALS['TL_LANG']['DAYS'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['hideOnWeekend'] = [ @@ -128,14 +128,14 @@ 'filter' => false, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['recurringExt'] = [ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['submitOnChange' => true, 'tl_class' => 'long clr'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_name'] = [ @@ -143,7 +143,7 @@ 'search' => true, 'inputType' => 'text', 'eval' => ['maxlength' => 255, 'tl_class' => 'w50'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_str'] = [ @@ -151,7 +151,7 @@ 'search' => true, 'inputType' => 'text', 'eval' => ['maxlength' => 255, 'tl_class' => 'w50'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_plz'] = [ @@ -159,7 +159,7 @@ 'search' => true, 'inputType' => 'text', 'eval' => ['rgxp' => 'digit', 'maxlength' => 10, 'tl_class' => 'w50'], - 'sql' => "varchar(10) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 10, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_ort'] = [ @@ -167,7 +167,7 @@ 'search' => true, 'inputType' => 'text', 'eval' => ['maxlength' => 255, 'tl_class' => 'w50'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_link'] = [ @@ -175,7 +175,7 @@ 'search' => true, 'inputType' => 'text', 'eval' => ['rgxp' => 'url', 'maxlength' => 255, 'tl_class' => 'long'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_contact'] = [ @@ -183,7 +183,7 @@ 'search' => true, 'inputType' => 'text', 'eval' => ['maxlength' => 255, 'tl_class' => 'w50'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_mail'] = [ @@ -191,7 +191,7 @@ 'search' => true, 'inputType' => 'text', 'eval' => ['rgxp' => 'email', 'maxlength' => 255, 'decodeEntities' => true, 'tl_class' => 'w50'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; // new repeat options for events @@ -204,7 +204,7 @@ ], 'reference' => &$GLOBALS['TL_LANG']['tl_calendar_events'], 'eval' => ['mandatory' => true, 'tl_class' => 'w50'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; // added submitOnChange to recurrences @@ -212,7 +212,7 @@ 'exclude' => true, 'inputType' => 'text', 'eval' => ['mandatory' => true, 'rgxp' => 'digit', 'submitOnChange' => true, 'tl_class' => 'w50'], - 'sql' => "smallint(5) unsigned NOT NULL default '0'", + 'sql' => ['type' => 'smallint', 'length' => 5, 'unsigned' => true, 'default' => 0], ]; // list of exceptions @@ -223,7 +223,7 @@ 'columnsCallback' => ['calendar_extended.mcw.callbacks', 'listMultiExceptions'], 'buttons' => ['up' => false, 'down' => false], ], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; // list of exceptions @@ -234,7 +234,7 @@ 'columnsCallback' => ['calendar_extended.mcw.callbacks', 'listMultiExceptions'], 'buttons' => ['up' => false, 'down' => false], ], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; // list of exceptions @@ -245,15 +245,15 @@ 'columnsCallback' => ['calendar_extended.mcw.callbacks', 'listMultiExceptions'], 'buttons' => ['up' => false, 'down' => false], ], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['allRecurrences'] = [ - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['exceptionList'] = [ - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 65535, 'notnull' => false], ]; // display the end of the recurrences (read only) @@ -261,5 +261,5 @@ 'exclude' => true, 'inputType' => 'text', 'eval' => ['readonly' => true, 'rgxp' => 'date', 'tl_class' => 'clr'], - 'sql' => "int(10) unsigned NOT NULL default '0'", + 'sql' => ['type' => 'integer', 'length' => 10, 'unsigned' => true, 'default' => 0], ]; diff --git a/contao/dca/tl_module.php b/contao/dca/tl_module.php index 03e750b..89cf67a 100644 --- a/contao/dca/tl_module.php +++ b/contao/dca/tl_module.php @@ -63,7 +63,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['showOnlyNext'] = [ @@ -71,7 +71,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['use_horizontal'] = [ @@ -79,7 +79,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['use_navigation'] = [ @@ -87,7 +87,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['showDate'] = [ @@ -95,7 +95,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['linkCurrent'] = [ @@ -103,7 +103,7 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['hideEmptyDays'] = [ @@ -111,14 +111,14 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['cal_times'] = [ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; // list of exceptions @@ -130,7 +130,7 @@ 'columnsCallback' => ['calendar_extended.module.callbacks', 'getTimeRange'], 'buttons' => ['up' => false, 'down' => false, 'copy' => false], ], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 1000, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['cellheight'] = [ @@ -138,7 +138,7 @@ 'exclude' => true, 'inputType' => 'text', 'eval' => ['tl_class' => 'clr w50'], - 'sql' => "varchar(10) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 10, 'default' => ''], ]; /* @@ -148,21 +148,21 @@ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'clr m12 w50', 'submitOnChange' => true], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['weekNumbers'] = [ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'm12 w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['weekNumbersWithinDays'] = [ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'm12 w50'], - 'sql' => "char(1) NOT NULL default ''", + 'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['cal_fcFormat'] = [ @@ -171,14 +171,14 @@ 'options' => ['cal_fc_month', 'cal_fc_week', 'cal_fc_day', 'cal_fc_list'], 'reference' => &$GLOBALS['TL_LANG']['tl_module'], 'eval' => ['tl_class' => 'clr w50'], - 'sql' => "varchar(32) COLLATE ascii_bin NOT NULL default 'cal_fc_week'", + 'sql' => ['type' => 'string', 'length' => 32, 'default' => 'cal_fc_week', 'customSchemaOptions' => ['collation' => 'ascii_bin']], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['filter_fields'] = [ 'exclude' => true, 'inputType' => 'checkbox', 'eval' => ['tl_class' => 'long', 'multiple' => true], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 1000, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['businessDays'] = [ @@ -186,19 +186,19 @@ 'options' => [1, 2, 3, 4, 5, 6, 0], 'reference' => &$GLOBALS['TL_LANG']['DAYS'], 'eval' => ['multiple' => true, 'tl_class' => 'clr w50'], - 'sql' => 'text NULL', + 'sql' => ['type' => 'text', 'length' => 1000, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['businessDayStart'] = [ 'inputType' => 'text', 'eval' => ['rgxp' => 'time', 'mandatory' => true, 'datepicker' => true, 'tl_class' => 'clr w50 wizard'], - 'sql' => 'bigint(20) NULL', + 'sql' => ['type' => 'bigint', 'length' => 20, 'notnull' => false], ]; $GLOBALS['TL_DCA']['tl_module']['fields']['businessDayEnd'] = [ 'inputType' => 'text', 'eval' => ['rgxp' => 'time', 'mandatory' => true, 'datepicker' => true, 'tl_class' => 'w50 wizard'], - 'sql' => 'bigint(20) NULL', + 'sql' => ['type' => 'bigint', 'length' => 20, 'notnull' => false], ];