[TYPO3-dam-devel] RFC: Bugfix: 6342: Length of the DB fields "file_name" and "file_path" in DB table "tx_dam" are too short

Peter Kühn peter.kuehn at wmdb.de
Sun Nov 11 18:56:37 CET 2007


+1!
anyone else?

Michiel Roos schrieb:
> Michiel Roos wrote:
>> Need to cook up a new patch. Just discovered that the table will not 
>> be created on a fresh installation of the DAM because yo cannot set a 
>> TEXT column as primary key.
> Please test this new patch which:
> - removes the key for file_path
> - changes the max value to 4096 instead of 10000 for the file_path field 
> in tca because this is the max path length according to: 
> http://en.wikipedia.org/wiki/Comparison_of_file_systems#_ref-note-16_0
> - updates the table creation of tx_dam_file_tracking as well, this table 
> also uses file_name and path_length. It does not have any tca definition.
> 
> Kind regards,
> 
> 
> Michiel Roos
> 
> 
> ------------------------------------------------------------------------
> 
> diff -ru dam/ext_tables.sql dam.6342/ext_tables.sql
> --- dam/ext_tables.sql	2007-11-01 18:28:51.352094134 +0100
> +++ dam.6342/ext_tables.sql	2007-11-01 19:31:50.219379890 +0100
> @@ -106,8 +106,8 @@
>    # pdf: 1.3
>    file_type_version varchar(9) DEFAULT '' NOT NULL,
>  
> -  file_name varchar(100) DEFAULT '' NOT NULL,
> -  file_path varchar(255) DEFAULT '' NOT NULL,
> +  file_name varchar(255) DEFAULT '' NOT NULL,
> +  file_path TEXT DEFAULT '' NOT NULL,
>    file_size int(11) unsigned DEFAULT '0' NOT NULL,
>    file_mtime int(11) unsigned DEFAULT '0' NOT NULL,
>    file_inode int(11) DEFAULT '0' NOT NULL,
> @@ -133,7 +133,7 @@
>    file_creator varchar(45) DEFAULT '' NOT NULL,
>  
>    # name that should be used for download
> -  file_dl_name varchar(100) DEFAULT '' NOT NULL,
> +  file_dl_name varchar(255) DEFAULT '' NOT NULL,
>  
>  
>    # dummy field for relation to content elements
> @@ -224,7 +224,6 @@
>    KEY file_type (file_type),
>    KEY file_hash (file_hash),
>    KEY file_name (file_name),
> -  KEY file_path (file_path)
>  );
>  
>  
> @@ -360,8 +359,8 @@
>    pid int(11) DEFAULT '0' NOT NULL,
>    tstamp int(11) unsigned DEFAULT '0' NOT NULL,
>  
> -  file_name varchar(100) DEFAULT '' NOT NULL,
> -  file_path varchar(255) DEFAULT '' NOT NULL,
> +  file_name varchar(255) DEFAULT '' NOT NULL,
> +  file_path TEXT DEFAULT '' NOT NULL,
>    file_size int(11) unsigned DEFAULT '0' NOT NULL,
>  
>    # date of file creation
> diff -ru dam/tca.php dam.6342/tca.php
> --- dam/tca.php	2007-11-01 18:28:51.352094134 +0100
> +++ dam.6342/tca.php	2007-11-01 19:34:14.415421590 +0100
> @@ -220,7 +220,7 @@
>  				'type' => 'input',
>  				'readOnly' => true,
>  				'size' => '15',
> -				'max' => '100',
> +				'max' => '255',
>  				'eval' => 'required',
>  			)
>  		),
> @@ -233,7 +233,7 @@
>  				'type' => 'input',
>  				'readOnly' => true,
>  				'size' => '25',
> -				'max' => '255',
> +				'max' => '4096',
>  				'eval' => 'required',
>  			)
>  		),
> @@ -243,7 +243,7 @@
>  			'config' => array(
>  				'type' => 'input',
>  				'size' => '30',
> -				'max' => '100',
> +				'max' => '255',
>  				'eval' => 'trim',
>  			)
>  		),


More information about the TYPO3-team-dam mailing list