Make alias column unique.

This commit is contained in:
David Molineus
2015-01-09 17:40:50 +01:00
parent 150e3706ed
commit 023711980a
7 changed files with 24 additions and 18 deletions

View File

@@ -12,7 +12,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
( (
'keys' => array 'keys' => array
( (
'id' => 'primary' 'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
) )
) )
), ),
@@ -152,7 +154,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'search' => true, 'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''" 'sql' => "varchar(255) NOT NULL default ''"
), ),
'type' => array 'type' => array

View File

@@ -9,7 +9,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
( (
'keys' => array 'keys' => array
( (
'id' => 'primary' 'id' => 'primary',
'alias' => 'unique',
) )
) )
), ),
@@ -143,10 +144,6 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
( (
'sql' => "int(10) unsigned NOT NULL default '0'" 'sql' => "int(10) unsigned NOT NULL default '0'"
), ),
'pid' => array
(
'sql' => "int(10) unsigned NOT NULL default '0'"
),
'title' => array 'title' => array
( (
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['title'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['title'],
@@ -160,7 +157,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_icon'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['alias'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_icon']['alias'],
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''" 'sql' => "varchar(255) NOT NULL default ''"
), ),
'type' => array 'type' => array

View File

@@ -11,7 +11,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
( (
'keys' => array 'keys' => array
( (
'id' => 'primary' 'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
) )
) )
), ),
@@ -186,7 +188,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'search' => true, 'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''" 'sql' => "varchar(255) NOT NULL default ''"
), ),
'type' => array 'type' => array

View File

@@ -10,7 +10,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
( (
'keys' => array 'keys' => array
( (
'id' => 'primary' 'id' => 'primary',
'alias' => 'unique',
) )
) )
), ),
@@ -132,7 +133,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'search' => true, 'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''" 'sql' => "varchar(255) NOT NULL default ''"
), ),
'center' => array 'center' => array
@@ -346,7 +347,6 @@ $GLOBALS['TL_DCA']['tl_leaflet_map'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['options'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['options'],
'exclude' => true, 'exclude' => true,
'inputType' => 'textarea', 'inputType' => 'textarea',
'default' => true,
'eval' => array('tl_class' => 'clr lng', 'allowHtml'=>true, 'style' => 'min-height: 40px;'), 'eval' => array('tl_class' => 'clr lng', 'allowHtml'=>true, 'style' => 'min-height: 40px;'),
'sql' => "char(1) NOT NULL default ''" 'sql' => "char(1) NOT NULL default ''"
), ),

View File

@@ -13,7 +13,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
( (
'keys' => array 'keys' => array
( (
'id' => 'primary' 'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
) )
), ),
), ),
@@ -150,7 +152,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'search' => true, 'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''" 'sql' => "varchar(255) NOT NULL default ''"
), ),
'coordinates' => array 'coordinates' => array

View File

@@ -9,7 +9,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_style'] = array
( (
'keys' => array 'keys' => array
( (
'id' => 'primary' 'id' => 'primary',
'alias' => 'unique',
) )
) )
), ),

View File

@@ -12,7 +12,9 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
( (
'keys' => array 'keys' => array
( (
'id' => 'primary' 'id' => 'primary',
'pid' => 'index',
'alias' => 'unique',
) )
) )
), ),
@@ -176,7 +178,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_vector'] = array
'exclude' => true, 'exclude' => true,
'inputType' => 'text', 'inputType' => 'text',
'search' => true, 'search' => true,
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'), 'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true),
'sql' => "varchar(255) NOT NULL default ''" 'sql' => "varchar(255) NOT NULL default ''"
), ),
'type' => array 'type' => array