From b673229226e03cac213ad2de9df45e6297d76ec9 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 11 May 2018 12:06:22 +0200 Subject: [PATCH] Bug 20271: (follow-up) DBIx schema changes Signed-off-by: Martin Renvoize Signed-off-by: Josef Moravec --- 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 - -=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 - -=back - -=cut - -__PACKAGE__->set_primary_key("biblionumber"); - -=head1 RELATIONS - -=head2 deletedbiblio_metadatas - -Type: has_many - -Related object: L - -=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 - -=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 - -=back - -=cut - -__PACKAGE__->set_primary_key("id"); - -=head1 UNIQUE CONSTRAINTS - -=head2 C - -=over 4 - -=item * L - -=item * L - -=item * L - -=back - -=cut - -__PACKAGE__->add_unique_constraint( - "deletedbiblio_metadata_uniq_key", - ["biblionumber", "format", "marcflavour"], -); - -=head1 RELATIONS - -=head2 biblionumber - -Type: belongs_to - -Related object: L - -=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 - -=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 - -=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 - -=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 - -=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