From a5bf92ef0fa6cf5b958a6c2209f03c901c83a425 Mon Sep 17 00:00:00 2001
From: Kyle M Hall <kyle@bywatersolutions.com>
Date: Wed, 4 Mar 2015 01:29:23 -0800
Subject: [PATCH] Bug 13790 - Update Koha Schema
Content-Type: text/plain; charset=utf-8

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@quecheelibrary.org>
---
 Koha/Schema/Result/Issue.pm    |   20 ++++++++++++++++++++
 Koha/Schema/Result/OldIssue.pm |   20 ++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm
index b368b5b..674fa37 100644
--- a/Koha/Schema/Result/Issue.pm
+++ b/Koha/Schema/Result/Issue.pm
@@ -23,6 +23,12 @@ __PACKAGE__->table("issues");
 
 =head1 ACCESSORS
 
+=head2 issue_id
+
+  data_type: 'integer'
+  is_auto_increment: 1
+  is_nullable: 0
+
 =head2 borrowernumber
 
   data_type: 'integer'
@@ -98,6 +104,8 @@ __PACKAGE__->table("issues");
 =cut
 
 __PACKAGE__->add_columns(
+  "issue_id",
+  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
   "borrowernumber",
   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
   "itemnumber",
@@ -145,6 +153,18 @@ __PACKAGE__->add_columns(
   { data_type => "integer", default_value => 0, is_nullable => 0 },
 );
 
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</issue_id>
+
+=back
+
+=cut
+
+__PACKAGE__->set_primary_key("issue_id");
+
 =head1 RELATIONS
 
 =head2 borrowernumber
diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm
index 62354e5..50f9b09 100644
--- a/Koha/Schema/Result/OldIssue.pm
+++ b/Koha/Schema/Result/OldIssue.pm
@@ -23,6 +23,12 @@ __PACKAGE__->table("old_issues");
 
 =head1 ACCESSORS
 
+=head2 issue_id
+
+  data_type: 'integer'
+  is_auto_increment: 1
+  is_nullable: 0
+
 =head2 borrowernumber
 
   data_type: 'integer'
@@ -98,6 +104,8 @@ __PACKAGE__->table("old_issues");
 =cut
 
 __PACKAGE__->add_columns(
+  "issue_id",
+  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
   "borrowernumber",
   { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
   "itemnumber",
@@ -145,6 +153,18 @@ __PACKAGE__->add_columns(
   { data_type => "integer", default_value => 0, is_nullable => 0 },
 );
 
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</issue_id>
+
+=back
+
+=cut
+
+__PACKAGE__->set_primary_key("issue_id");
+
 =head1 RELATIONS
 
 =head2 borrowernumber
-- 
1.7.10.4