Skip to content

Commit

Permalink
fix: use Doctrine Schema Representation for db columns
Browse files Browse the repository at this point in the history
  • Loading branch information
cgoIT committed Dec 3, 2024
1 parent 429f008 commit 93b3faa
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 46 deletions.
10 changes: 5 additions & 5 deletions contao/dca/tl_calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,36 +38,36 @@
'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'] = [
'default' => 0,
'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'] = [
'default' => 0,
'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'] = [
'default' => 0,
'exclude' => true,
'inputType' => 'checkbox',
'eval' => ['tl_class' => 'w50'],
'sql' => "char(1) NOT NULL default ''",
'sql' => ['type' => 'string', 'length' => 1, 'fixed' => true, 'default' => ''],
];
46 changes: 23 additions & 23 deletions contao/dca/tl_calendar_events.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] = [
Expand All @@ -89,29 +89,29 @@
'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'] = [
'default' => 0,
'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'] = [
Expand All @@ -120,78 +120,78 @@
'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'] = [
'exclude' => true,
'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'] = [
'exclude' => true,
'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'] = [
'exclude' => true,
'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'] = [
'exclude' => true,
'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'] = [
'exclude' => true,
'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'] = [
'exclude' => true,
'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'] = [
'exclude' => true,
'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'] = [
'exclude' => true,
'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
Expand All @@ -204,15 +204,15 @@
],
'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
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['recurrences'] = [
'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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -245,21 +245,21 @@
'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)
$GLOBALS['TL_DCA']['tl_calendar_events']['fields']['repeatEnd'] = [
'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],
];
36 changes: 18 additions & 18 deletions contao/dca/tl_module.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,62 +63,62 @@
'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'] = [
'default' => 0,
'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'] = [
'default' => 0,
'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'] = [
'default' => 1,
'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'] = [
'default' => 1,
'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'] = [
'default' => 1,
'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'] = [
'default' => 1,
'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
Expand All @@ -130,15 +130,15 @@
'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'] = [
'default' => 60,
'exclude' => true,
'inputType' => 'text',
'eval' => ['tl_class' => 'clr w50'],
'sql' => "varchar(10) NOT NULL default ''",
'sql' => ['type' => 'string', 'length' => 10, 'default' => ''],
];

/*
Expand All @@ -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'] = [
Expand All @@ -171,34 +171,34 @@
'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'] = [
'inputType' => 'checkbox',
'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],
];

0 comments on commit 93b3faa

Please sign in to comment.