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.

@kidhab kidhab force-pushed the migrate_bank_acc_desc branch from 35f3468 to feee9e3 Compare April 10, 2024 09:48
@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 force-pushed the migrate_bank_acc_desc branch from b4fc9f8 to d13b50a Compare July 4, 2024 22:42
@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