From eea0db474ffef8a7baf88b08282374c69a539f8b Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Mon, 7 Feb 2022 12:34:17 -0500 Subject: [PATCH] Bug 29605: Update DBIC schema Signed-off-by: Kyle M Hall --- Koha/Schema/Result/AdditionalContent.pm | 12 +++++----- Koha/Schema/Result/LanguageDescription.pm | 22 +++++++++++++++++-- Koha/Schema/Result/LanguageRfc4646ToIso639.pm | 20 +++++++++++++++-- Koha/Schema/Result/LanguageScriptMapping.pm | 20 +++++++++++++---- Koha/Schema/Result/LanguageSubtagRegistry.pm | 20 +++++++++++++++-- 5 files changed, 78 insertions(+), 16 deletions(-) diff --git a/Koha/Schema/Result/AdditionalContent.pm b/Koha/Schema/Result/AdditionalContent.pm index 080af4a169..7913b1241c 100644 --- a/Koha/Schema/Result/AdditionalContent.pm +++ b/Koha/Schema/Result/AdditionalContent.pm @@ -44,7 +44,7 @@ category for the additional content data_type: 'varchar' is_nullable: 0 - size: 20 + size: 100 code to group content per lang @@ -86,7 +86,7 @@ the body of your additional content data_type: 'varchar' default_value: (empty string) is_nullable: 0 - size: 25 + size: 50 location for the additional content(koha is the staff interface, slip is the circulation receipt and language codes are for the opac) @@ -143,7 +143,7 @@ __PACKAGE__->add_columns( "category", { data_type => "varchar", is_nullable => 0, size => 20 }, "code", - { data_type => "varchar", is_nullable => 0, size => 20 }, + { data_type => "varchar", is_nullable => 0, size => 100 }, "location", { data_type => "varchar", is_nullable => 0, size => 255 }, "branchcode", @@ -153,7 +153,7 @@ __PACKAGE__->add_columns( "content", { data_type => "mediumtext", is_nullable => 0 }, "lang", - { data_type => "varchar", default_value => "", is_nullable => 0, size => 25 }, + { data_type => "varchar", default_value => "", is_nullable => 0, size => 50 }, "published_on", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "updated_on", @@ -249,8 +249,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-16 07:12:03 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0HtqQpArwFtGrsivukyG1Q +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-07 17:33:51 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8XBxGaOBL30SKzof8rThAw # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageDescription.pm b/Koha/Schema/Result/LanguageDescription.pm index aed9cb67ec..2a4fd915c0 100644 --- a/Koha/Schema/Result/LanguageDescription.pm +++ b/Koha/Schema/Result/LanguageDescription.pm @@ -80,9 +80,27 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("id"); +=head1 UNIQUE CONSTRAINTS -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fQEN7ks3f7aLuoDQWqEv+Q +=head2 C + +=over 4 + +=item * L + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("uniq_desc", ["subtag", "type", "lang"]); + + +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-07 17:33:52 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bb0qk2rU/k8GEp2J+fnWzA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageRfc4646ToIso639.pm b/Koha/Schema/Result/LanguageRfc4646ToIso639.pm index 0ec143c61d..5402828887 100644 --- a/Koha/Schema/Result/LanguageRfc4646ToIso639.pm +++ b/Koha/Schema/Result/LanguageRfc4646ToIso639.pm @@ -64,9 +64,25 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("id"); +=head1 UNIQUE CONSTRAINTS -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:80baGnx1j4ZZjs0Qn5VMsw +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("uniq_code", ["rfc4646_subtag", "iso639_2_code"]); + + +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-07 17:33:52 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nxZkheJBGp65FKa5G8UZOQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageScriptMapping.pm b/Koha/Schema/Result/LanguageScriptMapping.pm index a43ecc0d83..2f3dee48a7 100644 --- a/Koha/Schema/Result/LanguageScriptMapping.pm +++ b/Koha/Schema/Result/LanguageScriptMapping.pm @@ -26,7 +26,7 @@ __PACKAGE__->table("language_script_mapping"); =head2 language_subtag data_type: 'varchar' - is_nullable: 1 + is_nullable: 0 size: 25 =head2 script_subtag @@ -39,14 +39,26 @@ __PACKAGE__->table("language_script_mapping"); __PACKAGE__->add_columns( "language_subtag", - { data_type => "varchar", is_nullable => 1, size => 25 }, + { data_type => "varchar", is_nullable => 0, size => 25 }, "script_subtag", { data_type => "varchar", is_nullable => 1, size => 25 }, ); +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("language_subtag"); + -# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c9gZ400zs7OkvI1JDCjyCg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-07 17:33:52 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ix5usp0nDkmNuer9swajuQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageSubtagRegistry.pm b/Koha/Schema/Result/LanguageSubtagRegistry.pm index 0a47981f0b..4597ab2b36 100644 --- a/Koha/Schema/Result/LanguageSubtagRegistry.pm +++ b/Koha/Schema/Result/LanguageSubtagRegistry.pm @@ -84,9 +84,25 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("id"); +=head1 UNIQUE CONSTRAINTS -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:M4QL1kgte1o/Wz+XjSduWA +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("uniq_lang", ["subtag", "type"]); + + +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-02-07 17:33:52 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oaYDhSazc2SC0M4gGH9QQw # You can replace this text with custom content, and it will be preserved on regeneration -- 2.39.5