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

[FR-206] Change validation code from Integer to String #382

Merged

Conversation

Kotik112
Copy link
Contributor

@Kotik112 Kotik112 commented Dec 6, 2023

The validation code used to verify gift cards are in 16 digit hex. Hence the field needed to be String(16) to store it.

The validation code used to verify gift cards are in 16 digit hex. Hence the field needed to be String(16) to store it.
@Kotik112
Copy link
Contributor Author

Kotik112 commented Dec 6, 2023

I believe 0025 migrations has not been applied/deployed yet.
I will check with Daniel to see if a new migration version is needed.

@@ -2,7 +2,7 @@
CREATE TABLE IF NOT EXISTS `webshop_gift_card`(
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`amount` decimal(15,2) NOT NULL,
`validation_code` int(10) unsigned NOT NULL,
`validation_code` VARCHAR(16) COLLATE utf8mb4_0900_ai_ci NOT NULL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the validation_code missing a UNIQUE constraint?

@BerglundDaniel BerglundDaniel merged commit a8a0116 into makerspace:master Dec 12, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants