From 3091e0ce5e70c1f1657f8c7025e68765594f224c Mon Sep 17 00:00:00 2001
From: Ere Maijala <ere.maijala@helsinki.fi>
Date: Wed, 12 Dec 2018 14:05:36 +0200
Subject: [PATCH] Bug 11529: DBIx schema changes

Updates to Biblio schema and removal of FieldMapping schema.
---
 Koha/Schema/Result/Biblio.pm       | 38 +++++++++++--
 Koha/Schema/Result/Fieldmapping.pm | 90 ------------------------------
 2 files changed, 34 insertions(+), 94 deletions(-)
 delete mode 100644 Koha/Schema/Result/Fieldmapping.pm

diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm
index 53e806b81f..15ec9eaf3f 100644
--- a/Koha/Schema/Result/Biblio.pm
+++ b/Koha/Schema/Result/Biblio.pm
@@ -46,6 +46,26 @@ __PACKAGE__->table("biblio");
   data_type: 'longtext'
   is_nullable: 1
 
+=head2 medium
+
+  data_type: 'longtext'
+  is_nullable: 1
+
+=head2 subtitle
+
+  data_type: 'longtext'
+  is_nullable: 1
+
+=head2 part_number
+
+  data_type: 'longtext'
+  is_nullable: 1
+
+=head2 part_name
+
+  data_type: 'longtext'
+  is_nullable: 1
+
 =head2 unititle
 
   data_type: 'longtext'
@@ -75,7 +95,7 @@ __PACKAGE__->table("biblio");
 
   data_type: 'timestamp'
   datetime_undef_if_invalid: 1
-  default_value: current_timestamp
+  default_value: 'current_timestamp()'
   is_nullable: 0
 
 =head2 datecreated
@@ -100,6 +120,14 @@ __PACKAGE__->add_columns(
   { data_type => "longtext", is_nullable => 1 },
   "title",
   { data_type => "longtext", is_nullable => 1 },
+  "medium",
+  { data_type => "longtext", is_nullable => 1 },
+  "subtitle",
+  { data_type => "longtext", is_nullable => 1 },
+  "part_number",
+  { data_type => "longtext", is_nullable => 1 },
+  "part_name",
+  { data_type => "longtext", is_nullable => 1 },
   "unititle",
   { data_type => "longtext", is_nullable => 1 },
   "notes",
@@ -114,7 +142,7 @@ __PACKAGE__->add_columns(
   {
     data_type => "timestamp",
     datetime_undef_if_invalid => 1,
-    default_value => \"current_timestamp",
+    default_value => "current_timestamp()",
     is_nullable => 0,
   },
   "datecreated",
@@ -363,7 +391,9 @@ __PACKAGE__->has_many(
 );
 
 
-# Created by DBIx::Class::Schema::Loader v0.07046 @ 2019-03-11 12:56:41
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ebn7Szfm8/HbrdAc7ekTnA
+# Created by DBIx::Class::Schema::Loader v0.07049 @ 2019-03-15 16:45:45
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:61+Di/Fke60nCaASGeXbvw
+
 
+# You can replace this text with custom code or comments, and it will be preserved on regeneration
 1;
diff --git a/Koha/Schema/Result/Fieldmapping.pm b/Koha/Schema/Result/Fieldmapping.pm
deleted file mode 100644
index d0b8730b3b..0000000000
--- a/Koha/Schema/Result/Fieldmapping.pm
+++ /dev/null
@@ -1,90 +0,0 @@
-use utf8;
-package Koha::Schema::Result::Fieldmapping;
-
-# Created by DBIx::Class::Schema::Loader
-# DO NOT MODIFY THE FIRST PART OF THIS FILE
-
-=head1 NAME
-
-Koha::Schema::Result::Fieldmapping
-
-=cut
-
-use strict;
-use warnings;
-
-use base 'DBIx::Class::Core';
-
-=head1 TABLE: C<fieldmapping>
-
-=cut
-
-__PACKAGE__->table("fieldmapping");
-
-=head1 ACCESSORS
-
-=head2 id
-
-  data_type: 'integer'
-  is_auto_increment: 1
-  is_nullable: 0
-
-=head2 field
-
-  data_type: 'varchar'
-  is_nullable: 0
-  size: 255
-
-=head2 frameworkcode
-
-  data_type: 'char'
-  default_value: (empty string)
-  is_nullable: 0
-  size: 4
-
-=head2 fieldcode
-
-  data_type: 'char'
-  is_nullable: 0
-  size: 3
-
-=head2 subfieldcode
-
-  data_type: 'char'
-  is_nullable: 0
-  size: 1
-
-=cut
-
-__PACKAGE__->add_columns(
-  "id",
-  { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
-  "field",
-  { data_type => "varchar", is_nullable => 0, size => 255 },
-  "frameworkcode",
-  { data_type => "char", default_value => "", is_nullable => 0, size => 4 },
-  "fieldcode",
-  { data_type => "char", is_nullable => 0, size => 3 },
-  "subfieldcode",
-  { data_type => "char", is_nullable => 0, size => 1 },
-);
-
-=head1 PRIMARY KEY
-
-=over 4
-
-=item * L</id>
-
-=back
-
-=cut
-
-__PACKAGE__->set_primary_key("id");
-
-
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:x+izN6nqxs+W/g/demOpOg
-
-
-# You can replace this text with custom content, and it will be preserved on regeneration
-1;
-- 
2.17.1