Bug 38457: Update record_id to VARCHAR(80)

This is required to allow for long primary keys from the
account_debit_types table.

Signed-off-by: Hannah Dunne-Howrie <hdunne-howrie@westminster.gov.uk>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Martin Renvoize 2025-02-20 11:28:15 +00:00 committed by Katrin Fischer
parent 9a6ef2e810
commit dc5e4b415b
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
2 changed files with 15 additions and 1 deletions

View File

@ -0,0 +1,14 @@
use Modern::Perl;
return {
bug_number => "38457",
description => "Add additional fields to debit types",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
$dbh->do(q{ ALTER TABLE additional_field_values MODIFY record_id VARCHAR(80) NOT NULL DEFAULT ''; });
say $out "Converted record_id to VARCHAR(80)";
},
};

View File

@ -247,7 +247,7 @@ DROP TABLE IF EXISTS `additional_field_values`;
CREATE TABLE `additional_field_values` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key identifier',
`field_id` int(11) NOT NULL COMMENT 'foreign key references additional_fields(id)',
`record_id` varchar(11) NOT NULL DEFAULT '' COMMENT 'record_id',
`record_id` varchar(80) NOT NULL DEFAULT '' COMMENT 'record_id',
`value` varchar(255) NOT NULL DEFAULT '' COMMENT 'value for this field',
PRIMARY KEY (`id`),
KEY `afv_fk` (`field_id`),