Skip to content

Commit

Permalink
Transferred sql settings to the dca settings
Browse files Browse the repository at this point in the history
  • Loading branch information
baumannsven committed Mar 28, 2018
1 parent 08d210b commit 949c7d4
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 46 deletions.
41 changes: 0 additions & 41 deletions contao/config/database.sql

This file was deleted.

6 changes: 4 additions & 2 deletions contao/dca/tl_metamodel_attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of MetaModels/attribute_tabletext.
*
* (c) 2012-2016 The MetaModels team.
* (c) 2012-2018 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -17,7 +17,8 @@
* @author David Maack <david.maack@arcor.de>
* @author David Greminger <david.greminger@1up.io>
* @author Ingolf Steinhardt <info@e-spin.de>
* @copyright 2012-2016 The MetaModels team.
* @author Sven Baumann <baumann.sv@gmail.com>
* @copyright 2012-2018 The MetaModels team.
* @license https://github.com/MetaModels/attribute_tabletext/blob/master/LICENSE LGPL-3.0
* @filesource
*/
Expand Down Expand Up @@ -51,4 +52,5 @@
),
'tl_class' => 'clr',
),
'sql' => 'blob NULL'
);
8 changes: 5 additions & 3 deletions contao/dca/tl_metamodel_rendersetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* This file is part of MetaModels/attribute_tabletext.
*
* (c) 2012-2016 The MetaModels team.
* (c) 2012-2018 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -17,7 +17,8 @@
* @author David Maack <david.maack@arcor.de>
* @author David Greminger <david.greminger@1up.io>
* @author Ingolf Steinhardt <info@e-spin.de>
* @copyright 2012-2016 The MetaModels team.
* @author Sven Baumann <baumann.sv@gmail.com>
* @copyright 2012-2018 The MetaModels team.
* @license https://github.com/MetaModels/attribute_tabletext/blob/master/LICENSE LGPL-3.0
* @filesource
*/
Expand All @@ -36,5 +37,6 @@
'eval' => array
(
'tl_class' => 'clr w50'
)
),
'sql' => 'varchar(1) NOT NULL default \'0\''
);
70 changes: 70 additions & 0 deletions contao/dca/tl_metamodel_tabletext.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

/**
* This file is part of MetaModels/attribute_tabletext.
*
* (c) 2012-2018 The MetaModels team.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This project is provided in good faith and hope to be usable by anyone.
*
* @package MetaModels
* @subpackage AttributeTableText
* @author Sven Baumann <baumann.sv@gmail.com>
* @copyright 2012-2018 The MetaModels team.
* @license https://github.com/MetaModels/attribute_tabletext/blob/master/LICENSE LGPL-3.0
* @filesource
*/

/**
* Table tl_metamodel_tabletext
*/
$GLOBALS['TL_DCA']['tl_metamodel_tabletext'] = array
(
// Config
'config' => array
(
'sql' => array
(
'keys' => array
(
'id' => 'primary',
'att_id,item_id,row,col' => 'index',
)
)
),
// Fields
'fields' => array
(
'id' => array
(
'sql' => 'int(10) unsigned NOT NULL auto_increment'
),
'tstamp' => array
(
'sql' => 'int(10) unsigned NOT NULL default \'0\''
),
'att_id' => array
(
'sql' => 'int(10) unsigned NOT NULL default \'0\''
),
'item_id' => array
(
'sql' => 'int(10) unsigned NOT NULL default \'0\''
),
'row' => array
(
'sql' => 'int(5) unsigned NOT NULL default \'0\''
),
'col' => array
(
'sql' => 'int(5) unsigned NOT NULL default \'0\''
),
'value' => array
(
'sql' => 'varchar(255) NOT NULL default \'\''
)
)
);

0 comments on commit 949c7d4

Please sign in to comment.