From 653cce7ba0007d38a94779a47a562af4e98347f1 Mon Sep 17 00:00:00 2001
From: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Date: Thu, 11 Feb 2021 12:51:08 +0000
Subject: [PATCH] Bug 14233: [DO NOT PUSH] DBIC Schema File Update

Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com>
Signed-off-by: David Nind <david@davidnind.com>
---
 Koha/Schema/Result/Letter.pm | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/Koha/Schema/Result/Letter.pm b/Koha/Schema/Result/Letter.pm
index 62a0d65eaa..613c4d9b27 100644
--- a/Koha/Schema/Result/Letter.pm
+++ b/Koha/Schema/Result/Letter.pm
@@ -23,6 +23,14 @@ __PACKAGE__->table("letter");
 
 =head1 ACCESSORS
 
+=head2 id
+
+  data_type: 'integer'
+  is_auto_increment: 1
+  is_nullable: 0
+
+primary key identifier
+
 =head2 module
 
   data_type: 'varchar'
@@ -114,6 +122,8 @@ last modification
 =cut
 
 __PACKAGE__->add_columns(
+  "id",
+  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
   "module",
   { data_type => "varchar", default_value => "", is_nullable => 0, size => 20 },
   "code",
@@ -156,6 +166,20 @@ __PACKAGE__->add_columns(
 
 =over 4
 
+=item * L</id>
+
+=back
+
+=cut
+
+__PACKAGE__->set_primary_key("id");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<letter_uniq_1>
+
+=over 4
+
 =item * L</module>
 
 =item * L</code>
@@ -170,7 +194,10 @@ __PACKAGE__->add_columns(
 
 =cut
 
-__PACKAGE__->set_primary_key("module", "code", "branchcode", "message_transport_type", "lang");
+__PACKAGE__->add_unique_constraint(
+  "letter_uniq_1",
+  ["module", "code", "branchcode", "message_transport_type", "lang"],
+);
 
 =head1 RELATIONS
 
@@ -190,8 +217,8 @@ __PACKAGE__->belongs_to(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-01-21 13:39:29
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KsiHfYDT9WzuiTET1Y/BhA
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2021-02-11 12:33:50
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qqdTVEicMu5rHppY5qsEuA
 
 sub koha_object_class {
     'Koha::Notice::Template';
-- 
2.20.1