Bugzilla – Attachment 76266 Details for
Bug 20271
Merge deleted biblio, biblioitems, biblio_metadata, and items tables
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20271: (follow-up) DBIx schema changes
Bug-20271-follow-up-DBIx-schema-changes.patch (text/plain), 25.34 KB, created by
Josef Moravec
on 2018-06-22 10:07:52 UTC
(
hide
)
Description:
Bug 20271: (follow-up) DBIx schema changes
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2018-06-22 10:07:52 UTC
Size:
25.34 KB
patch
obsolete
>From 878dc970628869e946ac359ba14d40258ec5487e Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 11 May 2018 12:06:22 +0200 >Subject: [PATCH] Bug 20271: (follow-up) DBIx schema changes > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >--- > Koha/Schema/Result/Biblio.pm | 16 +- > Koha/Schema/Result/BiblioMetadata.pm | 16 +- > Koha/Schema/Result/Biblioitem.pm | 16 +- > Koha/Schema/Result/Deletedbiblio.pm | 161 ----------- > Koha/Schema/Result/DeletedbiblioMetadata.pm | 140 ---------- > Koha/Schema/Result/Deletedbiblioitem.pm | 296 -------------------- > Koha/Schema/Result/Deleteditem.pm | 415 ---------------------------- > Koha/Schema/Result/Item.pm | 16 +- > 8 files changed, 56 insertions(+), 1020 deletions(-) > delete mode 100644 Koha/Schema/Result/Deletedbiblio.pm > delete mode 100644 Koha/Schema/Result/DeletedbiblioMetadata.pm > delete mode 100644 Koha/Schema/Result/Deletedbiblioitem.pm > delete mode 100644 Koha/Schema/Result/Deleteditem.pm > >diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm >index b118011..550402d 100644 >--- a/Koha/Schema/Result/Biblio.pm >+++ b/Koha/Schema/Result/Biblio.pm >@@ -89,6 +89,12 @@ __PACKAGE__->table("biblio"); > data_type: 'longtext' > is_nullable: 1 > >+=head2 deleted_at >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -121,6 +127,12 @@ __PACKAGE__->add_columns( > { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, > "abstract", > { data_type => "longtext", is_nullable => 1 }, >+ "deleted_at", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, > ); > > =head1 PRIMARY KEY >@@ -348,7 +360,7 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bUv00JjY09Hj2Zj4klqyxA >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-11 12:03:24 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:L2njvoe0LRdIdDsAEaye9w > > 1; >diff --git a/Koha/Schema/Result/BiblioMetadata.pm b/Koha/Schema/Result/BiblioMetadata.pm >index 20987f7..4fd4621 100644 >--- a/Koha/Schema/Result/BiblioMetadata.pm >+++ b/Koha/Schema/Result/BiblioMetadata.pm >@@ -59,6 +59,12 @@ __PACKAGE__->table("biblio_metadata"); > default_value: current_timestamp > is_nullable: 0 > >+=head2 deleted_at >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -79,6 +85,12 @@ __PACKAGE__->add_columns( > default_value => \"current_timestamp", > is_nullable => 0, > }, >+ "deleted_at", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, > ); > > =head1 PRIMARY KEY >@@ -132,8 +144,8 @@ __PACKAGE__->belongs_to( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-12-07 10:24:45 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yMvtHn61obhiDDPh7+CIuQ >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-11 12:03:24 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xEPDWp2+ol9WHDULIaCtOg > > > # You can replace this text with custom code or comments, and it will be preserved on regeneration >diff --git a/Koha/Schema/Result/Biblioitem.pm b/Koha/Schema/Result/Biblioitem.pm >index 49e52e7..7a843fd 100644 >--- a/Koha/Schema/Result/Biblioitem.pm >+++ b/Koha/Schema/Result/Biblioitem.pm >@@ -202,6 +202,12 @@ __PACKAGE__->table("biblioitems"); > data_type: 'integer' > is_nullable: 1 > >+=head2 deleted_at >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -279,6 +285,12 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 255 }, > "totalissues", > { data_type => "integer", is_nullable => 1 }, >+ "deleted_at", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, > ); > > =head1 PRIMARY KEY >@@ -326,8 +338,8 @@ __PACKAGE__->has_many( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ogVRTKNaUQSI3BE2xC2lww >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-11 12:03:24 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uvdBu01oA3TCk0mm2jlhPA > > __PACKAGE__->belongs_to( biblio => "Koha::Schema::Result::Biblio", "biblionumber" ); > >diff --git a/Koha/Schema/Result/Deletedbiblio.pm b/Koha/Schema/Result/Deletedbiblio.pm >deleted file mode 100644 >index f809b93..0000000 >--- a/Koha/Schema/Result/Deletedbiblio.pm >+++ /dev/null >@@ -1,161 +0,0 @@ >-use utf8; >-package Koha::Schema::Result::Deletedbiblio; >- >-# Created by DBIx::Class::Schema::Loader >-# DO NOT MODIFY THE FIRST PART OF THIS FILE >- >-=head1 NAME >- >-Koha::Schema::Result::Deletedbiblio >- >-=cut >- >-use strict; >-use warnings; >- >-use base 'DBIx::Class::Core'; >- >-=head1 TABLE: C<deletedbiblio> >- >-=cut >- >-__PACKAGE__->table("deletedbiblio"); >- >-=head1 ACCESSORS >- >-=head2 biblionumber >- >- data_type: 'integer' >- is_auto_increment: 1 >- is_nullable: 0 >- >-=head2 frameworkcode >- >- data_type: 'varchar' >- default_value: (empty string) >- is_nullable: 0 >- size: 4 >- >-=head2 author >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 title >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 unititle >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 notes >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 serial >- >- data_type: 'tinyint' >- is_nullable: 1 >- >-=head2 seriestitle >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 copyrightdate >- >- data_type: 'smallint' >- is_nullable: 1 >- >-=head2 timestamp >- >- data_type: 'timestamp' >- datetime_undef_if_invalid: 1 >- default_value: current_timestamp >- is_nullable: 0 >- >-=head2 datecreated >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 0 >- >-=head2 abstract >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=cut >- >-__PACKAGE__->add_columns( >- "biblionumber", >- { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >- "frameworkcode", >- { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, >- "author", >- { data_type => "longtext", is_nullable => 1 }, >- "title", >- { data_type => "longtext", is_nullable => 1 }, >- "unititle", >- { data_type => "longtext", is_nullable => 1 }, >- "notes", >- { data_type => "longtext", is_nullable => 1 }, >- "serial", >- { data_type => "tinyint", is_nullable => 1 }, >- "seriestitle", >- { data_type => "longtext", is_nullable => 1 }, >- "copyrightdate", >- { data_type => "smallint", is_nullable => 1 }, >- "timestamp", >- { >- data_type => "timestamp", >- datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >- is_nullable => 0, >- }, >- "datecreated", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, >- "abstract", >- { data_type => "longtext", is_nullable => 1 }, >-); >- >-=head1 PRIMARY KEY >- >-=over 4 >- >-=item * L</biblionumber> >- >-=back >- >-=cut >- >-__PACKAGE__->set_primary_key("biblionumber"); >- >-=head1 RELATIONS >- >-=head2 deletedbiblio_metadatas >- >-Type: has_many >- >-Related object: L<Koha::Schema::Result::DeletedbiblioMetadata> >- >-=cut >- >-__PACKAGE__->has_many( >- "deletedbiblio_metadatas", >- "Koha::Schema::Result::DeletedbiblioMetadata", >- { "foreign.biblionumber" => "self.biblionumber" }, >- { cascade_copy => 0, cascade_delete => 0 }, >-); >- >- >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dP0HOIp/+I93Y/u92TDI1g >- >- >-# You can replace this text with custom content, and it will be preserved on regeneration >-1; >diff --git a/Koha/Schema/Result/DeletedbiblioMetadata.pm b/Koha/Schema/Result/DeletedbiblioMetadata.pm >deleted file mode 100644 >index 5933f40..0000000 >--- a/Koha/Schema/Result/DeletedbiblioMetadata.pm >+++ /dev/null >@@ -1,140 +0,0 @@ >-use utf8; >-package Koha::Schema::Result::DeletedbiblioMetadata; >- >-# Created by DBIx::Class::Schema::Loader >-# DO NOT MODIFY THE FIRST PART OF THIS FILE >- >-=head1 NAME >- >-Koha::Schema::Result::DeletedbiblioMetadata >- >-=cut >- >-use strict; >-use warnings; >- >-use base 'DBIx::Class::Core'; >- >-=head1 TABLE: C<deletedbiblio_metadata> >- >-=cut >- >-__PACKAGE__->table("deletedbiblio_metadata"); >- >-=head1 ACCESSORS >- >-=head2 id >- >- data_type: 'integer' >- is_auto_increment: 1 >- is_nullable: 0 >- >-=head2 biblionumber >- >- data_type: 'integer' >- is_foreign_key: 1 >- is_nullable: 0 >- >-=head2 format >- >- data_type: 'varchar' >- is_nullable: 0 >- size: 16 >- >-=head2 marcflavour >- >- data_type: 'varchar' >- is_nullable: 0 >- size: 16 >- >-=head2 metadata >- >- data_type: 'longtext' >- is_nullable: 0 >- >-=head2 timestamp >- >- data_type: 'timestamp' >- datetime_undef_if_invalid: 1 >- default_value: current_timestamp >- is_nullable: 0 >- >-=cut >- >-__PACKAGE__->add_columns( >- "id", >- { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, >- "biblionumber", >- { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, >- "format", >- { data_type => "varchar", is_nullable => 0, size => 16 }, >- "marcflavour", >- { data_type => "varchar", is_nullable => 0, size => 16 }, >- "metadata", >- { data_type => "longtext", is_nullable => 0 }, >- "timestamp", >- { >- data_type => "timestamp", >- datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >- is_nullable => 0, >- }, >-); >- >-=head1 PRIMARY KEY >- >-=over 4 >- >-=item * L</id> >- >-=back >- >-=cut >- >-__PACKAGE__->set_primary_key("id"); >- >-=head1 UNIQUE CONSTRAINTS >- >-=head2 C<deletedbiblio_metadata_uniq_key> >- >-=over 4 >- >-=item * L</biblionumber> >- >-=item * L</format> >- >-=item * L</marcflavour> >- >-=back >- >-=cut >- >-__PACKAGE__->add_unique_constraint( >- "deletedbiblio_metadata_uniq_key", >- ["biblionumber", "format", "marcflavour"], >-); >- >-=head1 RELATIONS >- >-=head2 biblionumber >- >-Type: belongs_to >- >-Related object: L<Koha::Schema::Result::Deletedbiblio> >- >-=cut >- >-__PACKAGE__->belongs_to( >- "biblionumber", >- "Koha::Schema::Result::Deletedbiblio", >- { biblionumber => "biblionumber" }, >- { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, >-); >- >- >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-12-07 10:24:45 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kk2GBiYaECKD+QtnKnycKQ >- >- >-# You can replace this text with custom code or comments, and it will be preserved on regeneration >-1; >diff --git a/Koha/Schema/Result/Deletedbiblioitem.pm b/Koha/Schema/Result/Deletedbiblioitem.pm >deleted file mode 100644 >index c831347..0000000 >--- a/Koha/Schema/Result/Deletedbiblioitem.pm >+++ /dev/null >@@ -1,296 +0,0 @@ >-use utf8; >-package Koha::Schema::Result::Deletedbiblioitem; >- >-# Created by DBIx::Class::Schema::Loader >-# DO NOT MODIFY THE FIRST PART OF THIS FILE >- >-=head1 NAME >- >-Koha::Schema::Result::Deletedbiblioitem >- >-=cut >- >-use strict; >-use warnings; >- >-use base 'DBIx::Class::Core'; >- >-=head1 TABLE: C<deletedbiblioitems> >- >-=cut >- >-__PACKAGE__->table("deletedbiblioitems"); >- >-=head1 ACCESSORS >- >-=head2 biblioitemnumber >- >- data_type: 'integer' >- default_value: 0 >- is_nullable: 0 >- >-=head2 biblionumber >- >- data_type: 'integer' >- default_value: 0 >- is_nullable: 0 >- >-=head2 volume >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 number >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 itemtype >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 isbn >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 issn >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 ean >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 publicationyear >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 publishercode >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 volumedate >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 volumedesc >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 collectiontitle >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 collectionissn >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 collectionvolume >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 editionstatement >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 editionresponsibility >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 timestamp >- >- data_type: 'timestamp' >- datetime_undef_if_invalid: 1 >- default_value: current_timestamp >- is_nullable: 0 >- >-=head2 illus >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 pages >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 notes >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 size >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 place >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 lccn >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 25 >- >-=head2 url >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 cn_source >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 cn_class >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 30 >- >-=head2 cn_item >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 cn_suffix >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 cn_sort >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 agerestriction >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 totalissues >- >- data_type: 'integer' >- is_nullable: 1 >- >-=cut >- >-__PACKAGE__->add_columns( >- "biblioitemnumber", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >- "biblionumber", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >- "volume", >- { data_type => "longtext", is_nullable => 1 }, >- "number", >- { data_type => "longtext", is_nullable => 1 }, >- "itemtype", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "isbn", >- { data_type => "longtext", is_nullable => 1 }, >- "issn", >- { data_type => "longtext", is_nullable => 1 }, >- "ean", >- { data_type => "longtext", is_nullable => 1 }, >- "publicationyear", >- { data_type => "mediumtext", is_nullable => 1 }, >- "publishercode", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "volumedate", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >- "volumedesc", >- { data_type => "mediumtext", is_nullable => 1 }, >- "collectiontitle", >- { data_type => "longtext", is_nullable => 1 }, >- "collectionissn", >- { data_type => "mediumtext", is_nullable => 1 }, >- "collectionvolume", >- { data_type => "longtext", is_nullable => 1 }, >- "editionstatement", >- { data_type => "mediumtext", is_nullable => 1 }, >- "editionresponsibility", >- { data_type => "mediumtext", is_nullable => 1 }, >- "timestamp", >- { >- data_type => "timestamp", >- datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >- is_nullable => 0, >- }, >- "illus", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "pages", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "notes", >- { data_type => "longtext", is_nullable => 1 }, >- "size", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "place", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "lccn", >- { data_type => "varchar", is_nullable => 1, size => 25 }, >- "url", >- { data_type => "mediumtext", is_nullable => 1 }, >- "cn_source", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "cn_class", >- { data_type => "varchar", is_nullable => 1, size => 30 }, >- "cn_item", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "cn_suffix", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "cn_sort", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "agerestriction", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "totalissues", >- { data_type => "integer", is_nullable => 1 }, >-); >- >-=head1 PRIMARY KEY >- >-=over 4 >- >-=item * L</biblioitemnumber> >- >-=back >- >-=cut >- >-__PACKAGE__->set_primary_key("biblioitemnumber"); >- >- >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-16 17:54:53 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:QLYBa1Ea8Jau2Wy6U+wyQw >- >- >-# You can replace this text with custom content, and it will be preserved on regeneration >-1; >diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm >deleted file mode 100644 >index 2eff4e9..0000000 >--- a/Koha/Schema/Result/Deleteditem.pm >+++ /dev/null >@@ -1,415 +0,0 @@ >-use utf8; >-package Koha::Schema::Result::Deleteditem; >- >-# Created by DBIx::Class::Schema::Loader >-# DO NOT MODIFY THE FIRST PART OF THIS FILE >- >-=head1 NAME >- >-Koha::Schema::Result::Deleteditem >- >-=cut >- >-use strict; >-use warnings; >- >-use base 'DBIx::Class::Core'; >- >-=head1 TABLE: C<deleteditems> >- >-=cut >- >-__PACKAGE__->table("deleteditems"); >- >-=head1 ACCESSORS >- >-=head2 itemnumber >- >- data_type: 'integer' >- default_value: 0 >- is_nullable: 0 >- >-=head2 biblionumber >- >- data_type: 'integer' >- default_value: 0 >- is_nullable: 0 >- >-=head2 biblioitemnumber >- >- data_type: 'integer' >- default_value: 0 >- is_nullable: 0 >- >-=head2 barcode >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 20 >- >-=head2 dateaccessioned >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 booksellerid >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 homebranch >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 price >- >- data_type: 'decimal' >- is_nullable: 1 >- size: [8,2] >- >-=head2 replacementprice >- >- data_type: 'decimal' >- is_nullable: 1 >- size: [8,2] >- >-=head2 replacementpricedate >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 datelastborrowed >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 datelastseen >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 stack >- >- data_type: 'tinyint' >- is_nullable: 1 >- >-=head2 notforloan >- >- data_type: 'tinyint' >- default_value: 0 >- is_nullable: 0 >- >-=head2 damaged >- >- data_type: 'tinyint' >- default_value: 0 >- is_nullable: 0 >- >-=head2 damaged_on >- >- data_type: 'datetime' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 itemlost >- >- data_type: 'tinyint' >- default_value: 0 >- is_nullable: 0 >- >-=head2 itemlost_on >- >- data_type: 'datetime' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 withdrawn >- >- data_type: 'tinyint' >- default_value: 0 >- is_nullable: 0 >- >-=head2 withdrawn_on >- >- data_type: 'datetime' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 itemcallnumber >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 coded_location_qualifier >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 issues >- >- data_type: 'smallint' >- is_nullable: 1 >- >-=head2 renewals >- >- data_type: 'smallint' >- is_nullable: 1 >- >-=head2 reserves >- >- data_type: 'smallint' >- is_nullable: 1 >- >-=head2 restricted >- >- data_type: 'tinyint' >- is_nullable: 1 >- >-=head2 itemnotes >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 itemnotes_nonpublic >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 holdingbranch >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 paidfor >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 timestamp >- >- data_type: 'timestamp' >- datetime_undef_if_invalid: 1 >- default_value: current_timestamp >- is_nullable: 0 >- >-=head2 location >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 80 >- >-=head2 permanent_location >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 80 >- >-=head2 onloan >- >- data_type: 'date' >- datetime_undef_if_invalid: 1 >- is_nullable: 1 >- >-=head2 cn_source >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 cn_sort >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 ccode >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 materials >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 uri >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 255 >- >-=head2 itype >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 10 >- >-=head2 more_subfields_xml >- >- data_type: 'longtext' >- is_nullable: 1 >- >-=head2 enumchron >- >- data_type: 'mediumtext' >- is_nullable: 1 >- >-=head2 copynumber >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 32 >- >-=head2 stocknumber >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 32 >- >-=head2 new_status >- >- data_type: 'varchar' >- is_nullable: 1 >- size: 32 >- >-=cut >- >-__PACKAGE__->add_columns( >- "itemnumber", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >- "biblionumber", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >- "biblioitemnumber", >- { data_type => "integer", default_value => 0, is_nullable => 0 }, >- "barcode", >- { data_type => "varchar", is_nullable => 1, size => 20 }, >- "dateaccessioned", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >- "booksellerid", >- { data_type => "longtext", is_nullable => 1 }, >- "homebranch", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "price", >- { data_type => "decimal", is_nullable => 1, size => [8, 2] }, >- "replacementprice", >- { data_type => "decimal", is_nullable => 1, size => [8, 2] }, >- "replacementpricedate", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >- "datelastborrowed", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >- "datelastseen", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >- "stack", >- { data_type => "tinyint", is_nullable => 1 }, >- "notforloan", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "damaged", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "damaged_on", >- { >- data_type => "datetime", >- datetime_undef_if_invalid => 1, >- is_nullable => 1, >- }, >- "itemlost", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "itemlost_on", >- { >- data_type => "datetime", >- datetime_undef_if_invalid => 1, >- is_nullable => 1, >- }, >- "withdrawn", >- { data_type => "tinyint", default_value => 0, is_nullable => 0 }, >- "withdrawn_on", >- { >- data_type => "datetime", >- datetime_undef_if_invalid => 1, >- is_nullable => 1, >- }, >- "itemcallnumber", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "coded_location_qualifier", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "issues", >- { data_type => "smallint", is_nullable => 1 }, >- "renewals", >- { data_type => "smallint", is_nullable => 1 }, >- "reserves", >- { data_type => "smallint", is_nullable => 1 }, >- "restricted", >- { data_type => "tinyint", is_nullable => 1 }, >- "itemnotes", >- { data_type => "longtext", is_nullable => 1 }, >- "itemnotes_nonpublic", >- { data_type => "longtext", is_nullable => 1 }, >- "holdingbranch", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "paidfor", >- { data_type => "longtext", is_nullable => 1 }, >- "timestamp", >- { >- data_type => "timestamp", >- datetime_undef_if_invalid => 1, >- default_value => \"current_timestamp", >- is_nullable => 0, >- }, >- "location", >- { data_type => "varchar", is_nullable => 1, size => 80 }, >- "permanent_location", >- { data_type => "varchar", is_nullable => 1, size => 80 }, >- "onloan", >- { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, >- "cn_source", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "cn_sort", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "ccode", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "materials", >- { data_type => "mediumtext", is_nullable => 1 }, >- "uri", >- { data_type => "varchar", is_nullable => 1, size => 255 }, >- "itype", >- { data_type => "varchar", is_nullable => 1, size => 10 }, >- "more_subfields_xml", >- { data_type => "longtext", is_nullable => 1 }, >- "enumchron", >- { data_type => "mediumtext", is_nullable => 1 }, >- "copynumber", >- { data_type => "varchar", is_nullable => 1, size => 32 }, >- "stocknumber", >- { data_type => "varchar", is_nullable => 1, size => 32 }, >- "new_status", >- { data_type => "varchar", is_nullable => 1, size => 32 }, >-); >- >-=head1 PRIMARY KEY >- >-=over 4 >- >-=item * L</itemnumber> >- >-=back >- >-=cut >- >-__PACKAGE__->set_primary_key("itemnumber"); >- >- >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-18 16:41:11 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xb11fPjp5PyXU7yfFWHycw >- >- >-# You can replace this text with custom content, and it will be preserved on regeneration >-1; >diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm >index cee2552..895d45a 100644 >--- a/Koha/Schema/Result/Item.pm >+++ b/Koha/Schema/Result/Item.pm >@@ -286,6 +286,12 @@ __PACKAGE__->table("items"); > is_nullable: 1 > size: 32 > >+=head2 deleted_at >+ >+ data_type: 'datetime' >+ datetime_undef_if_invalid: 1 >+ is_nullable: 1 >+ > =cut > > __PACKAGE__->add_columns( >@@ -406,6 +412,12 @@ __PACKAGE__->add_columns( > { data_type => "varchar", is_nullable => 1, size => 32 }, > "new_status", > { data_type => "varchar", is_nullable => 1, size => 32 }, >+ "deleted_at", >+ { >+ data_type => "datetime", >+ datetime_undef_if_invalid => 1, >+ is_nullable => 1, >+ }, > ); > > =head1 PRIMARY KEY >@@ -687,8 +699,8 @@ __PACKAGE__->might_have( > ); > > >-# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-18 16:41:12 >-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CrNXvpDUvvcuPZK2Gfzs/Q >+# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-05-11 12:03:24 >+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sTN/r9L4MvFONFQnopRNrg > > __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" ); > >-- >2.1.4
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 20271
:
72300
|
72799
|
72800
|
73091
|
73092
|
73093
|
73535
|
73536
|
73537
|
73538
|
73539
|
73540
|
73597
|
73759
|
73760
|
73761
|
73762
|
73763
|
73764
|
73765
|
74127
|
74128
|
74129
|
74130
|
74131
|
74132
|
74133
|
74134
|
74135
|
74136
|
74137
|
74138
|
74139
|
74140
|
74141
|
74142
|
74182
|
74183
|
74184
|
74185
|
74186
|
74187
|
74188
|
74189
|
74190
|
74223
|
74407
|
74408
|
74409
|
74410
|
74411
|
74412
|
74413
|
74414
|
74415
|
74416
|
75265
|
75347
|
75894
|
75897
|
75898
|
75899
|
75910
|
75977
|
75978
|
75979
|
75980
|
75981
|
75982
|
75983
|
75984
|
75985
|
75986
|
75987
|
75988
|
75989
|
75990
|
75991
|
75992
|
75993
|
76047
|
76048
|
76255
|
76256
|
76257
|
76258
|
76259
|
76260
|
76261
|
76262
|
76263
|
76264
|
76265
|
76266
|
76267
|
76268
|
76269
|
76270
|
76271
|
76272
|
76273
|
76274
|
76275
|
76276
|
76277
|
76493
|
76494
|
76495
|
76496
|
76497
|
76498
|
76499
|
76500
|
76501
|
76502
|
76503
|
76504
|
76505
|
76506
|
76507
|
76508
|
76509
|
76510
|
76511
|
76512
|
76513
|
76514