From 616e99489282d744045377a944e36c9a9dfc8dd5 Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Tue, 1 Feb 2022 21:13:46 -1000 Subject: [PATCH] Bug 29605: Update DBIC schema Signed-off-by: Fridolin Somers --- 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..598f17ccc0 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-02 07:12:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/h/wWfmyVxW7skwrMn3scg # 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..ddc95a64cb 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-02 07:12:59 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ztJaB84tQXb1T6MnBP/zrQ # 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..6a15215c25 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-02 07:13:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8PERWsCJ6PY9XHzD++SXTQ # 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..456bbee126 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-02 07:13:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8pCxOS9p6qswA642MyRexA # 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..d50ee1c924 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-02 07:13:00 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8VCaLbL67TbZrsPI3OSwkg # You can replace this text with custom content, and it will be preserved on regeneration -- 2.39.5