Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No DB migration for data type change from TIMESTAMP to CHAR(32) for OXTIMESTAMP #235

Open
TiiFuchs opened this issue Feb 2, 2022 · 2 comments
Assignees
Labels

Comments

@TiiFuchs
Copy link

TiiFuchs commented Feb 2, 2022

In the fcpayone_events.php the OXTIMESTAMP columns are created as CHAR(32):

OXTIMESTAMP CHAR(32) COLLATE latin1_general_ci NOT NULL DEFAULT '',

But the UPDATE statements change them to TIMESTAMP...

self::changeColumnTypeIfWrong($table, 'OXTIMESTAMP', 'TIMESTAMP', str_replace('[REPLACE_WITH_TABLE_NAME]', $table, self::$sQueryChangeOxtimestampType));

and
public static $sQueryChangeOxtimestampType = "ALTER TABLE [REPLACE_WITH_TABLE_NAME] CHANGE OXTIMESTAMP OXTIMESTAMP TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Timestamp';";

I think there is a migration missing for changing it to CHAR(32)?

btw: Why are you using CHAR(32) for this?

@vanilla-thunder
Copy link

i am also wondering, why oxtimestamp data type was changed to char(32) in november 2020
fbd1c2f

also the FCPO_REFERENCE was changed from char(32) to int(11) but if you are upgrading, then you already have rows with alphanumerical values there, so you cant simply import old data anymore.

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants