Bugzilla – Attachment 132518 Details for
Bug 24975
Refactor database translations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24975: DBIC Build
Bug-24975-DBIC-Build.patch (text/plain), 4.90 KB, created by
Martin Renvoize (ashimema)
on 2022-03-30 06:38:30 UTC
(
hide
)
Description:
Bug 24975: DBIC Build
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2022-03-30 06:38:30 UTC
Size:
4.90 KB
patch
obsolete
>From 02b0af23b7e5fef07ea15b60c4e73a8d820c8335 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Mon, 28 Mar 2022 16:04:09 +0100 >Subject: [PATCH] Bug 24975: DBIC Build > >https://bugs.koha-community.org/show_bug.cgi?id=24875 >--- > Koha/Schema/Result/L10nSource.pm | 113 +++++++++++++++++++++++++++++ > Koha/Schema/Result/L10nTarget.pm | 121 +++++++++++++++++++++++++++++++ > 2 files changed, 234 insertions(+) > create mode 100644 Koha/Schema/Result/L10nSource.pm > create mode 100644 Koha/Schema/Result/L10nTarget.pm > >diff --git a/Koha/Schema/Result/L10nSource.pm b/Koha/Schema/Result/L10nSource.pm >new file mode 100644 >index 0000000000..2f789481b3 >--- /dev/null >+++ b/Koha/Schema/Result/L10nSource.pm >@@ -0,0 +1,113 @@ >+use utf8; >+package Koha::Schema::Result::L10nSource; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::L10nSource >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<l10n_source> >+ >+=cut >+ >+__PACKAGE__->table("l10n_source"); >+ >+=head1 ACCESSORS >+ >+=head2 l10n_source_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 group >+ >+ data_type: 'varchar' >+ is_nullable: 1 >+ size: 100 >+ >+=head2 key >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 100 >+ >+=head2 text >+ >+ data_type: 'text' >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "l10n_source_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "group", >+ { data_type => "varchar", is_nullable => 1, size => 100 }, >+ "key", >+ { data_type => "varchar", is_nullable => 0, size => 100 }, >+ "text", >+ { data_type => "text", is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</l10n_source_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("l10n_source_id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<group_key> >+ >+=over 4 >+ >+=item * L</group> >+ >+=item * L</key> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("group_key", ["group", "key"]); >+ >+=head1 RELATIONS >+ >+=head2 l10n_targets >+ >+Type: has_many >+ >+Related object: L<Koha::Schema::Result::L10nTarget> >+ >+=cut >+ >+__PACKAGE__->has_many( >+ "l10n_targets", >+ "Koha::Schema::Result::L10nTarget", >+ { "foreign.l10n_source_id" => "self.l10n_source_id" }, >+ { cascade_copy => 0, cascade_delete => 0 }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-28 15:03:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QRPw3vO+2BbF4AmGCuucGw >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >diff --git a/Koha/Schema/Result/L10nTarget.pm b/Koha/Schema/Result/L10nTarget.pm >new file mode 100644 >index 0000000000..c2d7f20790 >--- /dev/null >+++ b/Koha/Schema/Result/L10nTarget.pm >@@ -0,0 +1,121 @@ >+use utf8; >+package Koha::Schema::Result::L10nTarget; >+ >+# Created by DBIx::Class::Schema::Loader >+# DO NOT MODIFY THE FIRST PART OF THIS FILE >+ >+=head1 NAME >+ >+Koha::Schema::Result::L10nTarget >+ >+=cut >+ >+use strict; >+use warnings; >+ >+use base 'DBIx::Class::Core'; >+ >+=head1 TABLE: C<l10n_target> >+ >+=cut >+ >+__PACKAGE__->table("l10n_target"); >+ >+=head1 ACCESSORS >+ >+=head2 l10n_target_id >+ >+ data_type: 'integer' >+ is_auto_increment: 1 >+ is_nullable: 0 >+ >+=head2 l10n_source_id >+ >+ data_type: 'integer' >+ is_foreign_key: 1 >+ is_nullable: 0 >+ >+=head2 language >+ >+ data_type: 'varchar' >+ is_nullable: 0 >+ size: 10 >+ >+=head2 translation >+ >+ data_type: 'text' >+ is_nullable: 0 >+ >+=head2 fuzzy >+ >+ data_type: 'tinyint' >+ default_value: 0 >+ is_nullable: 0 >+ >+=cut >+ >+__PACKAGE__->add_columns( >+ "l10n_target_id", >+ { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >+ "l10n_source_id", >+ { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >+ "language", >+ { data_type => "varchar", is_nullable => 0, size => 10 }, >+ "translation", >+ { data_type => "text", is_nullable => 0 }, >+ "fuzzy", >+ { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >+); >+ >+=head1 PRIMARY KEY >+ >+=over 4 >+ >+=item * L</l10n_target_id> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->set_primary_key("l10n_target_id"); >+ >+=head1 UNIQUE CONSTRAINTS >+ >+=head2 C<l10n_source_language> >+ >+=over 4 >+ >+=item * L</l10n_source_id> >+ >+=item * L</language> >+ >+=back >+ >+=cut >+ >+__PACKAGE__->add_unique_constraint("l10n_source_language", ["l10n_source_id", "language"]); >+ >+=head1 RELATIONS >+ >+=head2 l10n_source >+ >+Type: belongs_to >+ >+Related object: L<Koha::Schema::Result::L10nSource> >+ >+=cut >+ >+__PACKAGE__->belongs_to( >+ "l10n_source", >+ "Koha::Schema::Result::L10nSource", >+ { l10n_source_id => "l10n_source_id" }, >+ { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >+); >+ >+ >+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-28 15:03:23 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oXnI0NR9rifXbtfWYqcxzg >+ >+ >+# You can replace this text with custom code or comments, and it will be preserved on regeneration >+1; >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24975
:
101703
|
101786
|
102387
|
102388
|
102513
|
102514
|
102688
|
102701
|
132388
|
132508
|
132509
|
132510
|
132511
|
132512
|
132513
|
132514
|
132515
|
132516
|
132517
|
132518
|
132519
|
132520
|
132521
|
132522
|
132523
|
132524
|
132525
|
132526
|
132527
|
132528
|
132529
|
132530
|
132531
|
132532
|
132533
|
132546
|
132562
|
132563
|
132564
|
132565
|
132566
|
132567
|
132568
|
132569
|
132570
|
132571
|
132572
|
132573
|
132574
|
132575
|
149941
|
149942
|
149943
|
149944
|
149945
|
149946
|
149947
|
149948
|
149949
|
149950
|
149951
|
149952
|
149953
|
149954
|
149956
|
149957
|
150015
|
150033
|
150034