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

Allow longer bank account descriptions #1062

Merged
merged 3 commits into from
Jul 4, 2024

Conversation

kidhab
Copy link
Contributor

@kidhab kidhab commented Apr 10, 2024

We recently got the following error:

An ActiveRecord::ValueTooLong occurred in bank_accounts#create:

Mysql2::Error: Data too long for column 'description' at row 1: INSERT INTO `bank_accounts` (`name`, `iban`, `description`) VALUES (...)
app/controllers/admin/bank_accounts_controller.rb:11:in `create'

Obviously someone tried to enter a long description for the bank account. At the moment the database field is of the type varchar(255). This MR allows to enter longer descriptions.

@yksflip
Copy link
Member

yksflip commented Apr 10, 2024

hey kidhab, thanks for this MR! I think rubocop fails because there is a superfluous , in https://github.com/foodcoops/foodsoft/pull/1062/files#diff-28eff7cc0ab79d26401c7885e1ccb6dbb24c4ec0538e436071b48b060a8820c7R3
besides that, we can merge this.
Additionally we could write a test for the name / iban field, I'm unsure if there is a validation for those, we might want to have that too ..

@yksflip yksflip merged commit 48567cf into foodcoops:master Jul 4, 2024
1 of 2 checks passed
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.

2 participants