Schweriner / tgm_copyright

7 stars 13 forks source link

Data truncated for column 'copyright' at row 1 #33

Closed Xippo closed 3 years ago

Xippo commented 3 years ago

When you install the extension over composer and you make a db compare you will get this error.

In TYPO3 10 the copyright field already exists as text inside sys_file_metadata so a new declaration as varchar 255 will fire this error.

medarob commented 1 year ago

I installed the extension and it seems that the problem exists again. It was reintroduced with this commit https://github.com/Schweriner/tgm_copyright/commit/f561f2d6ca334ad4997a82f7365ab1102fd299d8 which adds

#
# Table structure for table 'sys_file_metadata'
#
CREATE TABLE sys_file_metadata (
    copyright varchar(255) DEFAULT '' NOT NULL
);

to ext_tables.sql again and therefor I get the following error:

[ Helhum\Typo3Console\Mvc\Cli\FailedSubProcessCommandException ]
Executing command "database:updateschema" failed (exit code: "1")

Exception code: 1485130941

The following errors occurred: +---------------+----------------------------------------------------+---------------------------+ | Type | SQL Statement | Message | +---------------+----------------------------------------------------+---------------------------+ | Change fields | ALTER TABLE sys_file_metadata CHANGE copyright copyright VARCHAR(255) DEFAULT '' NOT NULL | Data truncated for column 'copyright' at row 1 +---------------+----------------------------------------------------+---------------------------+