From da07b41e115fc4d3012a28e3746edaf4242de653 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 14 Oct 2013 21:03:40 +0000 Subject: [PATCH] Bug 8798: (follow-up) update the DBIC schema class files Signed-off-by: Galen Charlton --- Koha/Schema.pm | 5 +- Koha/Schema/Result/Accountline.pm | 45 ++++-- Koha/Schema/Result/Accountoffset.pm | 24 +-- Koha/Schema/Result/ActionLog.pm | 107 +++++++++++++ Koha/Schema/Result/Alert.pm | 27 +++- Koha/Schema/Result/Aqbasket.pm | 99 +++++++----- Koha/Schema/Result/Aqbasketgroup.pm | 29 +++- Koha/Schema/Result/Aqbookseller.pm | 105 ++++++++----- Koha/Schema/Result/Aqbudget.pm | 43 +++++- Koha/Schema/Result/Aqbudgetborrower.pm | 53 ++++--- Koha/Schema/Result/Aqbudgetperiod.pm | 33 +++- Koha/Schema/Result/AqbudgetsPlanning.pm | 29 +++- Koha/Schema/Result/Aqcontract.pm | 35 +++-- Koha/Schema/Result/Aqinvoice.pm | 75 +++++---- Koha/Schema/Result/Aqorder.pm | 143 +++++++++++++----- Koha/Schema/Result/Aqorderdelivery.pm | 19 ++- Koha/Schema/Result/AqordersItem.pm | 35 +++-- Koha/Schema/Result/AqordersTransfer.pm | 135 +++++++++++++++++ Koha/Schema/Result/AuthHeader.pm | 33 +++- Koha/Schema/Result/AuthSubfieldStructure.pm | 38 ++++- Koha/Schema/Result/AuthTagStructure.pm | 31 +++- Koha/Schema/Result/AuthType.pm | 27 +++- Koha/Schema/Result/AuthorisedValue.pm | 27 +++- Koha/Schema/Result/AuthorisedValuesBranch.pm | 30 +++- Koha/Schema/Result/Biblio.pm | 46 ++++-- Koha/Schema/Result/BiblioFramework.pm | 27 +++- Koha/Schema/Result/Biblioimage.pm | 29 +++- Koha/Schema/Result/Biblioitem.pm | 38 +++-- Koha/Schema/Result/Borrower.pm | 102 ++++++++++--- Koha/Schema/Result/BorrowerAttribute.pm | 20 ++- Koha/Schema/Result/BorrowerAttributeType.pm | 27 +++- .../Result/BorrowerAttributeTypesBranch.pm | 50 +++--- Koha/Schema/Result/BorrowerFile.pm | 35 +++-- .../Result/BorrowerMessagePreference.pm | 100 ++++++++---- .../BorrowerMessageTransportPreference.pm | 33 +++- Koha/Schema/Result/BorrowerModification.pm | 47 ++++-- Koha/Schema/Result/Branch.pm | 49 ++++-- Koha/Schema/Result/BranchBorrowerCircRule.pm | 53 ++++--- Koha/Schema/Result/BranchItemRule.pm | 53 ++++--- Koha/Schema/Result/BranchTransferLimit.pm | 27 +++- Koha/Schema/Result/Branchcategory.pm | 37 ++++- Koha/Schema/Result/Branchrelation.pm | 33 +++- Koha/Schema/Result/Branchtransfer.pm | 56 ++++--- Koha/Schema/Result/Browser.pm | 16 +- Koha/Schema/Result/CategoriesBranch.pm | 50 +++--- Koha/Schema/Result/Category.pm | 30 +++- Koha/Schema/Result/City.pm | 27 +++- Koha/Schema/Result/ClassSortRule.pm | 27 +++- Koha/Schema/Result/ClassSource.pm | 29 +++- Koha/Schema/Result/Collection.pm | 29 +++- Koha/Schema/Result/CollectionTracking.pm | 31 +++- Koha/Schema/Result/Course.pm | 51 +++++-- Koha/Schema/Result/CourseInstructor.pm | 53 ++++--- Koha/Schema/Result/CourseItem.pm | 55 +++++-- Koha/Schema/Result/CourseReserve.pm | 50 ++++-- Koha/Schema/Result/CreatorBatch.pm | 49 ++++-- Koha/Schema/Result/CreatorImage.pm | 40 ++++- Koha/Schema/Result/CreatorLayout.pm | 27 +++- Koha/Schema/Result/CreatorTemplate.pm | 27 +++- Koha/Schema/Result/Currency.pm | 45 ++++-- Koha/Schema/Result/DefaultBorrowerCircRule.pm | 29 +++- Koha/Schema/Result/DefaultBranchCircRule.pm | 29 +++- Koha/Schema/Result/DefaultBranchItemRule.pm | 29 +++- Koha/Schema/Result/DefaultCircRule.pm | 27 +++- Koha/Schema/Result/Deletedbiblio.pm | 36 +++-- Koha/Schema/Result/Deletedbiblioitem.pm | 36 +++-- Koha/Schema/Result/Deletedborrower.pm | 28 ++-- Koha/Schema/Result/Deleteditem.pm | 52 +++++-- Koha/Schema/Result/Ethnicity.pm | 27 +++- Koha/Schema/Result/ExportFormat.pm | 45 +++++- Koha/Schema/Result/Fieldmapping.pm | 27 +++- Koha/Schema/Result/HoldFillTarget.pm | 60 +++++--- Koha/Schema/Result/ImportAuth.pm | 18 ++- Koha/Schema/Result/ImportBatch.pm | 33 +++- Koha/Schema/Result/ImportBiblio.pm | 18 ++- Koha/Schema/Result/ImportItem.pm | 29 +++- Koha/Schema/Result/ImportRecord.pm | 66 +++++--- Koha/Schema/Result/ImportRecordMatches.pm | 18 ++- Koha/Schema/Result/Issue.pm | 64 ++++++-- Koha/Schema/Result/Issuingrule.pm | 44 ++++-- Koha/Schema/Result/Item.pm | 135 +++++++++++------ .../Result/ItemCirculationAlertPreference.pm | 27 +++- Koha/Schema/Result/Itemtype.pm | 49 +++++- Koha/Schema/Result/LanguageDescription.pm | 27 +++- Koha/Schema/Result/LanguageRfc4646ToIso639.pm | 27 +++- Koha/Schema/Result/LanguageScriptBidi.pm | 16 +- Koha/Schema/Result/LanguageScriptMapping.pm | 16 +- Koha/Schema/Result/LanguageSubtagRegistry.pm | 30 +++- Koha/Schema/Result/Letter.pm | 31 +++- Koha/Schema/Result/Linktracker.pm | 34 ++++- Koha/Schema/Result/MarcMatcher.pm | 27 +++- Koha/Schema/Result/MarcSubfieldStructure.pm | 31 +++- Koha/Schema/Result/MarcTagStructure.pm | 29 +++- Koha/Schema/Result/Matchcheck.pm | 33 ++-- Koha/Schema/Result/MatcherMatchpoint.pm | 20 ++- Koha/Schema/Result/Matchpoint.pm | 57 ++++--- Koha/Schema/Result/MatchpointComponent.pm | 55 ++++--- Koha/Schema/Result/MatchpointComponentNorm.pm | 18 ++- Koha/Schema/Result/Message.pm | 33 +++- Koha/Schema/Result/MessageAttribute.pm | 40 ++++- Koha/Schema/Result/MessageQueue.pm | 31 ++-- Koha/Schema/Result/MessageTransport.pm | 73 +++++---- Koha/Schema/Result/MessageTransportType.pm | 41 ++++- Koha/Schema/Result/NeedMergeAuthority.pm | 27 +++- Koha/Schema/Result/Notify.pm | 22 ++- Koha/Schema/Result/OaiSet.pm | 50 +++++- Koha/Schema/Result/OaiSetsBiblio.pm | 33 +++- Koha/Schema/Result/OaiSetsDescription.pm | 18 ++- Koha/Schema/Result/OaiSetsMapping.pm | 32 +++- Koha/Schema/Result/OldIssue.pm | 64 ++++++-- Koha/Schema/Result/OldReserve.pm | 106 ++++++++----- Koha/Schema/Result/OpacNews.pm | 36 +++-- Koha/Schema/Result/Overduerule.pm | 29 +++- Koha/Schema/Result/Patroncard.pm | 35 +++-- Koha/Schema/Result/Patronimage.pm | 46 ++++-- Koha/Schema/Result/PendingOfflineOperation.pm | 33 +++- Koha/Schema/Result/Permission.pm | 31 +++- Koha/Schema/Result/PluginData.pm | 29 +++- Koha/Schema/Result/Printer.pm | 27 +++- Koha/Schema/Result/PrintersProfile.pm | 46 +++++- Koha/Schema/Result/Quote.pm | 34 ++++- Koha/Schema/Result/Rating.pm | 59 +++++--- Koha/Schema/Result/RepeatableHoliday.pm | 27 +++- Koha/Schema/Result/ReportsDictionary.pm | 41 ++++- Koha/Schema/Result/Reserve.pm | 113 +++++++++----- Koha/Schema/Result/Reserveconstraint.pm | 25 +-- Koha/Schema/Result/Review.pm | 68 ++++++--- Koha/Schema/Result/Roadtype.pm | 27 +++- Koha/Schema/Result/SavedReport.pm | 34 ++++- Koha/Schema/Result/SavedSql.pm | 48 ++++-- Koha/Schema/Result/SearchHistory.pm | 22 ++- Koha/Schema/Result/Serial.pm | 36 +++-- Koha/Schema/Result/Serialitem.pm | 53 ++++--- Koha/Schema/Result/ServicesThrottle.pm | 27 +++- Koha/Schema/Result/Session.pm | 27 +++- Koha/Schema/Result/SocialData.pm | 27 +++- Koha/Schema/Result/SpecialHoliday.pm | 27 +++- Koha/Schema/Result/Statistic.pm | 23 ++- Koha/Schema/Result/Stopword.pm | 16 +- Koha/Schema/Result/Subscription.pm | 39 +++-- Koha/Schema/Result/Subscriptionhistory.pm | 33 +++- Koha/Schema/Result/Subscriptionroutinglist.pm | 46 +++++- Koha/Schema/Result/Suggestion.pm | 50 ++++-- Koha/Schema/Result/Systempreference.pm | 27 +++- Koha/Schema/Result/Tag.pm | 27 +++- Koha/Schema/Result/TagAll.pm | 58 ++++--- Koha/Schema/Result/TagsApproval.pm | 41 ++++- Koha/Schema/Result/TagsIndex.pm | 53 ++++--- Koha/Schema/Result/TmpHoldsqueue.pm | 19 ++- Koha/Schema/Result/TransportCost.pm | 33 +++- Koha/Schema/Result/UserPermission.pm | 25 ++- Koha/Schema/Result/Userflag.pm | 27 +++- Koha/Schema/Result/Virtualshelfcontent.pm | 61 +++++--- Koha/Schema/Result/Virtualshelfshare.pm | 63 +++++--- Koha/Schema/Result/Virtualshelve.pm | 68 ++++++--- Koha/Schema/Result/Z3950server.pm | 45 +++++- Koha/Schema/Result/Zebraqueue.pm | 33 +++- 157 files changed, 4779 insertions(+), 1687 deletions(-) create mode 100644 Koha/Schema/Result/ActionLog.pm create mode 100644 Koha/Schema/Result/AqordersTransfer.pm diff --git a/Koha/Schema.pm b/Koha/Schema.pm index f1db97fa68..cffc631d5e 100644 --- a/Koha/Schema.pm +++ b/Koha/Schema.pm @@ -1,3 +1,4 @@ +use utf8; package Koha::Schema; # Created by DBIx::Class::Schema::Loader @@ -11,8 +12,8 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_namespaces; -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HQBaQAYvjvZj3xPakhjuPw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oDUxXckmfk6H9YCjW8PZTw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Accountline.pm b/Koha/Schema/Result/Accountline.pm index c8a21e2e4e..3b977fab64 100644 --- a/Koha/Schema/Result/Accountline.pm +++ b/Koha/Schema/Result/Accountline.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Accountline; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Accountline + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Accountline +=head1 TABLE: C =cut @@ -47,6 +51,7 @@ __PACKAGE__->table("accountlines"); =head2 date data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 amount @@ -86,6 +91,7 @@ __PACKAGE__->table("accountlines"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -128,7 +134,7 @@ __PACKAGE__->add_columns( "itemnumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "date", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "amount", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "description", @@ -143,9 +149,10 @@ __PACKAGE__->add_columns( { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "notify_id", { data_type => "integer", default_value => 0, is_nullable => 0 }, @@ -156,6 +163,17 @@ __PACKAGE__->add_columns( "manager_id", { data_type => "integer", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("accountlines_id"); =head1 RELATIONS @@ -172,7 +190,7 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 itemnumber @@ -187,12 +205,17 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+AbxKjLUR7hQsP2dpsyAPw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VLEuOBmnS+xgk7LXAqxtLw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Accountoffset.pm b/Koha/Schema/Result/Accountoffset.pm index 058893b6b6..e9d8c2fdb3 100644 --- a/Koha/Schema/Result/Accountoffset.pm +++ b/Koha/Schema/Result/Accountoffset.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Accountoffset; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Accountoffset + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Accountoffset +=head1 TABLE: C =cut @@ -47,6 +51,7 @@ __PACKAGE__->table("accountoffsets"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -68,9 +73,10 @@ __PACKAGE__->add_columns( { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); @@ -88,12 +94,12 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EgbEZx495kZ40/HqRcPXfA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OTfcUiJCPb5aU/gjqAb/bA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ActionLog.pm b/Koha/Schema/Result/ActionLog.pm new file mode 100644 index 0000000000..054693ee95 --- /dev/null +++ b/Koha/Schema/Result/ActionLog.pm @@ -0,0 +1,107 @@ +use utf8; +package Koha::Schema::Result::ActionLog; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::ActionLog + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("action_logs"); + +=head1 ACCESSORS + +=head2 action_id + + data_type: 'integer' + is_auto_increment: 1 + is_nullable: 0 + +=head2 timestamp + + data_type: 'timestamp' + datetime_undef_if_invalid: 1 + default_value: current_timestamp + is_nullable: 0 + +=head2 user + + data_type: 'integer' + default_value: 0 + is_nullable: 0 + +=head2 module + + data_type: 'text' + is_nullable: 1 + +=head2 action + + data_type: 'text' + is_nullable: 1 + +=head2 object + + data_type: 'integer' + is_nullable: 1 + +=head2 info + + data_type: 'text' + is_nullable: 1 + +=cut + +__PACKAGE__->add_columns( + "action_id", + { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, + "timestamp", + { + data_type => "timestamp", + datetime_undef_if_invalid => 1, + default_value => \"current_timestamp", + is_nullable => 0, + }, + "user", + { data_type => "integer", default_value => 0, is_nullable => 0 }, + "module", + { data_type => "text", is_nullable => 1 }, + "action", + { data_type => "text", is_nullable => 1 }, + "object", + { data_type => "integer", is_nullable => 1 }, + "info", + { data_type => "text", is_nullable => 1 }, +); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("action_id"); + + +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KRt26bXGF2SqTrf5u8MSig + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/Alert.pm b/Koha/Schema/Result/Alert.pm index 8fe9469cd5..2fae361efa 100644 --- a/Koha/Schema/Result/Alert.pm +++ b/Koha/Schema/Result/Alert.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Alert; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Alert + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Alert +=head1 TABLE: C =cut @@ -57,11 +61,22 @@ __PACKAGE__->add_columns( "externalid", { data_type => "varchar", default_value => "", is_nullable => 0, size => 20 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("alertid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MH/2E3A0Zh8EpLye/qojPw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O4b7dlkDRkE6WLPKI5AO+A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqbasket.pm b/Koha/Schema/Result/Aqbasket.pm index e53abe9e99..2ce507dd60 100644 --- a/Koha/Schema/Result/Aqbasket.pm +++ b/Koha/Schema/Result/Aqbasket.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqbasket; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqbasket + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqbasket +=head1 TABLE: C =cut @@ -50,11 +54,13 @@ __PACKAGE__->table("aqbasket"); =head2 creationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 closedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 booksellerid @@ -107,9 +113,9 @@ __PACKAGE__->add_columns( "contractnumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "creationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "closedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "booksellerid", { data_type => "integer", @@ -128,38 +134,34 @@ __PACKAGE__->add_columns( "billingplace", { data_type => "varchar", is_nullable => 1, size => 10 }, ); -__PACKAGE__->set_primary_key("basketno"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 booksellerid +=over 4 -Type: belongs_to +=item * L -Related object: L +=back =cut -__PACKAGE__->belongs_to( - "booksellerid", - "Koha::Schema::Result::Aqbookseller", - { id => "booksellerid" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("basketno"); -=head2 contractnumber +=head1 RELATIONS -Type: belongs_to +=head2 aqorders -Related object: L +Type: has_many + +Related object: L =cut -__PACKAGE__->belongs_to( - "contractnumber", - "Koha::Schema::Result::Aqcontract", - { contractnumber => "contractnumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +__PACKAGE__->has_many( + "aqorders", + "Koha::Schema::Result::Aqorder", + { "foreign.basketno" => "self.basketno" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 basketgroupid @@ -174,27 +176,52 @@ __PACKAGE__->belongs_to( "basketgroupid", "Koha::Schema::Result::Aqbasketgroup", { id => "basketgroupid" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -=head2 aqorders +=head2 booksellerid -Type: has_many +Type: belongs_to -Related object: L +Related object: L =cut -__PACKAGE__->has_many( - "aqorders", - "Koha::Schema::Result::Aqorder", - { "foreign.basketno" => "self.basketno" }, - { cascade_copy => 0, cascade_delete => 0 }, +__PACKAGE__->belongs_to( + "booksellerid", + "Koha::Schema::Result::Aqbookseller", + { id => "booksellerid" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 contractnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "contractnumber", + "Koha::Schema::Result::Aqcontract", + { contractnumber => "contractnumber" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dtVubmNVtOouPnHgut95og +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:b4UNvDyA6jbgcTsaasbKYA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqbasketgroup.pm b/Koha/Schema/Result/Aqbasketgroup.pm index d591ac30e3..6b3348e3af 100644 --- a/Koha/Schema/Result/Aqbasketgroup.pm +++ b/Koha/Schema/Result/Aqbasketgroup.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqbasketgroup; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqbasketgroup + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqbasketgroup +=head1 TABLE: C =cut @@ -85,6 +89,17 @@ __PACKAGE__->add_columns( "billingplace", { data_type => "varchar", is_nullable => 1, size => 10 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); =head1 RELATIONS @@ -116,12 +131,12 @@ __PACKAGE__->belongs_to( "booksellerid", "Koha::Schema::Result::Aqbookseller", { id => "booksellerid" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fm4sF0IGJYdSejZIB4uoBQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tT40YZgK7gOfNG3DVFTHiA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqbookseller.pm b/Koha/Schema/Result/Aqbookseller.pm index af2d97de3e..ee2f4bd122 100644 --- a/Koha/Schema/Result/Aqbookseller.pm +++ b/Koha/Schema/Result/Aqbookseller.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqbookseller; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqbookseller + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqbookseller +=head1 TABLE: C =cut @@ -272,24 +276,20 @@ __PACKAGE__->add_columns( "deliverytime", { data_type => "integer", is_nullable => 1 }, ); -__PACKAGE__->set_primary_key("id"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 aqbaskets +=over 4 -Type: has_many +=item * L -Related object: L +=back =cut -__PACKAGE__->has_many( - "aqbaskets", - "Koha::Schema::Result::Aqbasket", - { "foreign.booksellerid" => "self.id" }, - { cascade_copy => 0, cascade_delete => 0 }, -); +__PACKAGE__->set_primary_key("id"); + +=head1 RELATIONS =head2 aqbasketgroups @@ -306,34 +306,19 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 listprice - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "listprice", - "Koha::Schema::Result::Currency", - { currency => "listprice" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, -); - -=head2 invoiceprice +=head2 aqbaskets -Type: belongs_to +Type: has_many -Related object: L +Related object: L =cut -__PACKAGE__->belongs_to( - "invoiceprice", - "Koha::Schema::Result::Currency", - { currency => "invoiceprice" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +__PACKAGE__->has_many( + "aqbaskets", + "Koha::Schema::Result::Aqbasket", + { "foreign.booksellerid" => "self.id" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 aqcontracts @@ -366,9 +351,49 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 invoiceprice + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "invoiceprice", + "Koha::Schema::Result::Currency", + { currency => "invoiceprice" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +=head2 listprice + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "listprice", + "Koha::Schema::Result::Currency", + { currency => "listprice" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rie+pN0FWfYl8iqGV+svZQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pqq5chHLUwm5Ss5CCQBL2g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqbudget.pm b/Koha/Schema/Result/Aqbudget.pm index fb42c6f296..336e2db5a7 100644 --- a/Koha/Schema/Result/Aqbudget.pm +++ b/Koha/Schema/Result/Aqbudget.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqbudget; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqbudget + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqbudget +=head1 TABLE: C =cut @@ -77,6 +81,7 @@ __PACKAGE__->table("aqbudgets"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -146,9 +151,10 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "budget_period_id", { data_type => "integer", is_nullable => 1 }, @@ -161,6 +167,17 @@ __PACKAGE__->add_columns( "budget_permission", { data_type => "integer", default_value => 0, is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("budget_id"); =head1 RELATIONS @@ -210,9 +227,19 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 borrowernumbers + +Type: many_to_many + +Composing rels: L -> borrowernumber + +=cut + +__PACKAGE__->many_to_many("borrowernumbers", "aqbudgetborrowers", "borrowernumber"); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qMHMlKGUX5xPXM2fmjnBgQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dxOTKpdIJ6ruJUE++4fC8w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqbudgetborrower.pm b/Koha/Schema/Result/Aqbudgetborrower.pm index f11f9a7d20..d6b416f8d8 100644 --- a/Koha/Schema/Result/Aqbudgetborrower.pm +++ b/Koha/Schema/Result/Aqbudgetborrower.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqbudgetborrower; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqbudgetborrower + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqbudgetborrower +=head1 TABLE: C =cut @@ -39,24 +43,22 @@ __PACKAGE__->add_columns( "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); -__PACKAGE__->set_primary_key("budget_id", "borrowernumber"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 budget +=over 4 -Type: belongs_to +=item * L -Related object: L +=item * L + +=back =cut -__PACKAGE__->belongs_to( - "budget", - "Koha::Schema::Result::Aqbudget", - { budget_id => "budget_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("budget_id", "borrowernumber"); + +=head1 RELATIONS =head2 borrowernumber @@ -70,12 +72,27 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 budget + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "budget", + "Koha::Schema::Result::Aqbudget", + { budget_id => "budget_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yyTHiYgSk9l/r976XwuYog +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3PWUS/0L1ERMWWkghUO7ng # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqbudgetperiod.pm b/Koha/Schema/Result/Aqbudgetperiod.pm index e281c6d148..6015893516 100644 --- a/Koha/Schema/Result/Aqbudgetperiod.pm +++ b/Koha/Schema/Result/Aqbudgetperiod.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqbudgetperiod; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqbudgetperiod + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqbudgetperiod +=head1 TABLE: C =cut @@ -28,11 +32,13 @@ __PACKAGE__->table("aqbudgetperiods"); =head2 budget_period_startdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 0 =head2 budget_period_enddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 0 =head2 budget_period_active @@ -75,9 +81,9 @@ __PACKAGE__->add_columns( "budget_period_id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "budget_period_startdate", - { data_type => "date", is_nullable => 0 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, "budget_period_enddate", - { data_type => "date", is_nullable => 0 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, "budget_period_active", { data_type => "tinyint", default_value => 0, is_nullable => 1 }, "budget_period_description", @@ -91,11 +97,22 @@ __PACKAGE__->add_columns( "sort2_authcat", { data_type => "varchar", is_nullable => 1, size => 10 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("budget_period_id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MKnUsWU+v4zWADuLVahIuQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SaTTCao0N80iDL8pgf5k1A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AqbudgetsPlanning.pm b/Koha/Schema/Result/AqbudgetsPlanning.pm index 3685d8ca92..990e04effe 100644 --- a/Koha/Schema/Result/AqbudgetsPlanning.pm +++ b/Koha/Schema/Result/AqbudgetsPlanning.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AqbudgetsPlanning; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AqbudgetsPlanning + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AqbudgetsPlanning +=head1 TABLE: C =cut @@ -78,6 +82,17 @@ __PACKAGE__->add_columns( "display", { data_type => "tinyint", default_value => 1, is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("plan_id"); =head1 RELATIONS @@ -94,12 +109,12 @@ __PACKAGE__->belongs_to( "budget", "Koha::Schema::Result::Aqbudget", { budget_id => "budget_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0yahPlMJfcJkYkG94ANfQA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7nhWIqgezc+W8sHqJkXCbQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqcontract.pm b/Koha/Schema/Result/Aqcontract.pm index 10218a765e..59fe41a5bc 100644 --- a/Koha/Schema/Result/Aqcontract.pm +++ b/Koha/Schema/Result/Aqcontract.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqcontract; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqcontract + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqcontract +=head1 TABLE: C =cut @@ -28,11 +32,13 @@ __PACKAGE__->table("aqcontract"); =head2 contractstartdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 contractenddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 contractname @@ -58,9 +64,9 @@ __PACKAGE__->add_columns( "contractnumber", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "contractstartdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "contractenddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "contractname", { data_type => "varchar", is_nullable => 1, size => 50 }, "contractdescription", @@ -68,6 +74,17 @@ __PACKAGE__->add_columns( "booksellerid", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("contractnumber"); =head1 RELATIONS @@ -99,12 +116,12 @@ __PACKAGE__->belongs_to( "booksellerid", "Koha::Schema::Result::Aqbookseller", { id => "booksellerid" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ycOR9kVN0T7MmqtyS5ymww +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PF3RUnj5urQYDFzxsVxOcw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqinvoice.pm b/Koha/Schema/Result/Aqinvoice.pm index 9fc9b36094..c063d30dd6 100644 --- a/Koha/Schema/Result/Aqinvoice.pm +++ b/Koha/Schema/Result/Aqinvoice.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqinvoice; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqinvoice + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqinvoice +=head1 TABLE: C =cut @@ -39,16 +43,19 @@ __PACKAGE__->table("aqinvoices"); =head2 shipmentdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 billingdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 closedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 shipmentcost @@ -73,20 +80,46 @@ __PACKAGE__->add_columns( "booksellerid", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "shipmentdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "billingdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "closedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "shipmentcost", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "shipmentcost_budgetid", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("invoiceid"); =head1 RELATIONS +=head2 aqorders + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqorders", + "Koha::Schema::Result::Aqorder", + { "foreign.invoiceid" => "self.invoiceid" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 booksellerid Type: belongs_to @@ -99,7 +132,7 @@ __PACKAGE__->belongs_to( "booksellerid", "Koha::Schema::Result::Aqbookseller", { id => "booksellerid" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 shipmentcost_budgetid @@ -114,27 +147,17 @@ __PACKAGE__->belongs_to( "shipmentcost_budgetid", "Koha::Schema::Result::Aqbudget", { budget_id => "shipmentcost_budgetid" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, -); - -=head2 aqorders - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "aqorders", - "Koha::Schema::Result::Aqorder", - { "foreign.invoiceid" => "self.invoiceid" }, - { cascade_copy => 0, cascade_delete => 0 }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O5JnKjtyloB4VdJzZMpQng +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nV0lYm2w4xX8cwVmTVF3YQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqorder.pm b/Koha/Schema/Result/Aqorder.pm index 7204b752f2..00193e264a 100644 --- a/Koha/Schema/Result/Aqorder.pm +++ b/Koha/Schema/Result/Aqorder.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqorder; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqorder + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqorder +=head1 TABLE: C =cut @@ -34,6 +38,7 @@ __PACKAGE__->table("aqorders"); =head2 entrydate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 quantity @@ -62,6 +67,7 @@ __PACKAGE__->table("aqorders"); =head2 datereceived data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 invoiceid @@ -97,6 +103,7 @@ __PACKAGE__->table("aqorders"); =head2 datecancellationprinted data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 notes @@ -120,14 +127,10 @@ __PACKAGE__->table("aqorders"); is_foreign_key: 1 is_nullable: 1 -=head2 biblioitemnumber - - data_type: 'integer' - is_nullable: 1 - =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -168,6 +171,7 @@ __PACKAGE__->table("aqorders"); =head2 budgetdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 sort1 @@ -208,6 +212,7 @@ __PACKAGE__->table("aqorders"); =head2 claimed_date data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 subscriptionid @@ -229,7 +234,7 @@ __PACKAGE__->add_columns( "biblionumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "entrydate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "quantity", { data_type => "smallint", is_nullable => 1 }, "currency", @@ -239,7 +244,7 @@ __PACKAGE__->add_columns( "totalamount", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, "datereceived", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "invoiceid", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "freight", @@ -251,7 +256,7 @@ __PACKAGE__->add_columns( "cancelledby", { data_type => "varchar", is_nullable => 1, size => 10 }, "datecancellationprinted", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "notes", { data_type => "mediumtext", is_nullable => 1 }, "supplierreference", @@ -260,13 +265,12 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "basketno", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, - "biblioitemnumber", - { data_type => "integer", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "rrp", { data_type => "decimal", is_nullable => 1, size => [13, 2] }, @@ -281,7 +285,7 @@ __PACKAGE__->add_columns( "budgetgroup_id", { data_type => "integer", is_nullable => 0 }, "budgetdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "sort1", { data_type => "varchar", is_nullable => 1, size => 80 }, "sort2", @@ -295,16 +299,72 @@ __PACKAGE__->add_columns( "claims_count", { data_type => "integer", default_value => 0, is_nullable => 1 }, "claimed_date", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "subscriptionid", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "parent_ordernumber", { data_type => "integer", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("ordernumber"); =head1 RELATIONS +=head2 aqorders_items + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "aqorders_items", + "Koha::Schema::Result::AqordersItem", + { "foreign.ordernumber" => "self.ordernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 aqorders_transfers_ordernumber_from + +Type: might_have + +Related object: L + +=cut + +__PACKAGE__->might_have( + "aqorders_transfers_ordernumber_from", + "Koha::Schema::Result::AqordersTransfer", + { "foreign.ordernumber_from" => "self.ordernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + +=head2 aqorders_transfers_ordernumber_to + +Type: might_have + +Related object: L + +=cut + +__PACKAGE__->might_have( + "aqorders_transfers_ordernumber_to", + "Koha::Schema::Result::AqordersTransfer", + { "foreign.ordernumber_to" => "self.ordernumber" }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 basketno Type: belongs_to @@ -317,7 +377,12 @@ __PACKAGE__->belongs_to( "basketno", "Koha::Schema::Result::Aqbasket", { basketno => "basketno" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 biblionumber @@ -332,7 +397,12 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 invoiceid @@ -347,7 +417,12 @@ __PACKAGE__->belongs_to( "invoiceid", "Koha::Schema::Result::Aqinvoice", { invoiceid => "invoiceid" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 subscriptionid @@ -362,27 +437,17 @@ __PACKAGE__->belongs_to( "subscriptionid", "Koha::Schema::Result::Subscription", { subscriptionid => "subscriptionid" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, -); - -=head2 aqorders_items - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "aqorders_items", - "Koha::Schema::Result::AqordersItem", - { "foreign.ordernumber" => "self.ordernumber" }, - { cascade_copy => 0, cascade_delete => 0 }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H1fME9Sli2LWh6zAmpzK8A +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:C8LjmTtbnozNV2pA0sCbtg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Aqorderdelivery.pm b/Koha/Schema/Result/Aqorderdelivery.pm index fa297cb584..453d8ffd2c 100644 --- a/Koha/Schema/Result/Aqorderdelivery.pm +++ b/Koha/Schema/Result/Aqorderdelivery.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Aqorderdelivery; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Aqorderdelivery + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Aqorderdelivery +=head1 TABLE: C =cut @@ -22,6 +26,7 @@ __PACKAGE__->table("aqorderdelivery"); =head2 ordernumber data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 deliverynumber @@ -50,7 +55,7 @@ __PACKAGE__->table("aqorderdelivery"); __PACKAGE__->add_columns( "ordernumber", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "deliverynumber", { data_type => "smallint", default_value => 0, is_nullable => 0 }, "deliverydate", @@ -62,8 +67,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LOGL7qHtUGwgWbKJ1HguXA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hS/Ww/p7nHWiHNumkBifiQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AqordersItem.pm b/Koha/Schema/Result/AqordersItem.pm index c43410545b..ac99f2e10c 100644 --- a/Koha/Schema/Result/AqordersItem.pm +++ b/Koha/Schema/Result/AqordersItem.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AqordersItem; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AqordersItem + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AqordersItem +=head1 TABLE: C =cut @@ -33,6 +37,7 @@ __PACKAGE__->table("aqorders_items"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -45,11 +50,23 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 0 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("itemnumber"); =head1 RELATIONS @@ -66,12 +83,12 @@ __PACKAGE__->belongs_to( "ordernumber", "Koha::Schema::Result::Aqorder", { ordernumber => "ordernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9KFzTfBzan4H1BxT1suyXA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hvDuLTY3idYc1ujykNDrPQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AqordersTransfer.pm b/Koha/Schema/Result/AqordersTransfer.pm new file mode 100644 index 0000000000..0a4ec88a61 --- /dev/null +++ b/Koha/Schema/Result/AqordersTransfer.pm @@ -0,0 +1,135 @@ +use utf8; +package Koha::Schema::Result::AqordersTransfer; + +# Created by DBIx::Class::Schema::Loader +# DO NOT MODIFY THE FIRST PART OF THIS FILE + +=head1 NAME + +Koha::Schema::Result::AqordersTransfer + +=cut + +use strict; +use warnings; + +use base 'DBIx::Class::Core'; + +=head1 TABLE: C + +=cut + +__PACKAGE__->table("aqorders_transfers"); + +=head1 ACCESSORS + +=head2 ordernumber_from + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + +=head2 ordernumber_to + + data_type: 'integer' + is_foreign_key: 1 + is_nullable: 1 + +=head2 timestamp + + data_type: 'timestamp' + datetime_undef_if_invalid: 1 + default_value: current_timestamp + is_nullable: 0 + +=cut + +__PACKAGE__->add_columns( + "ordernumber_from", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "ordernumber_to", + { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, + "timestamp", + { + data_type => "timestamp", + datetime_undef_if_invalid => 1, + default_value => \"current_timestamp", + is_nullable => 0, + }, +); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("ordernumber_from", ["ordernumber_from"]); + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->add_unique_constraint("ordernumber_to", ["ordernumber_to"]); + +=head1 RELATIONS + +=head2 ordernumber_from + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "ordernumber_from", + "Koha::Schema::Result::Aqorder", + { ordernumber => "ordernumber_from" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +=head2 ordernumber_to + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "ordernumber_to", + "Koha::Schema::Result::Aqorder", + { ordernumber => "ordernumber_to" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + + +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1WX3cQyoYmNmPed+OqdUNA + + +# You can replace this text with custom code or comments, and it will be preserved on regeneration +1; diff --git a/Koha/Schema/Result/AuthHeader.pm b/Koha/Schema/Result/AuthHeader.pm index 5efd30fe2b..095c5d4c3d 100644 --- a/Koha/Schema/Result/AuthHeader.pm +++ b/Koha/Schema/Result/AuthHeader.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AuthHeader; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AuthHeader + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AuthHeader +=head1 TABLE: C =cut @@ -36,11 +40,13 @@ __PACKAGE__->table("auth_header"); =head2 datecreated data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 datemodified data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 origincode @@ -82,9 +88,9 @@ __PACKAGE__->add_columns( "authtypecode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "datecreated", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "datemodified", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "origincode", { data_type => "varchar", is_nullable => 1, size => 20 }, "authtrees", @@ -96,11 +102,22 @@ __PACKAGE__->add_columns( "marcxml", { data_type => "longtext", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("authid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NVcyurExTIYMqdmRcU0hSA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z7KMl3JNWUJlOte5CD25Dw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthSubfieldStructure.pm b/Koha/Schema/Result/AuthSubfieldStructure.pm index fcb424aa44..8c16d3e9d5 100644 --- a/Koha/Schema/Result/AuthSubfieldStructure.pm +++ b/Koha/Schema/Result/AuthSubfieldStructure.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AuthSubfieldStructure; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AuthSubfieldStructure + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AuthSubfieldStructure +=head1 TABLE: C =cut @@ -120,6 +124,11 @@ __PACKAGE__->table("auth_subfield_structure"); is_nullable: 0 size: 10 +=head2 defaultvalue + + data_type: 'text' + is_nullable: 1 + =cut __PACKAGE__->add_columns( @@ -155,12 +164,29 @@ __PACKAGE__->add_columns( { data_type => "varchar", default_value => "", is_nullable => 1, size => 45 }, "frameworkcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, + "defaultvalue", + { data_type => "text", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("authtypecode", "tagfield", "tagsubfield"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8Au8FV34qkqLZqlpt3mXPA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:24BKrmX1lug68+rmXE1riA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthTagStructure.pm b/Koha/Schema/Result/AuthTagStructure.pm index 01f0578ba4..4612b32f9a 100644 --- a/Koha/Schema/Result/AuthTagStructure.pm +++ b/Koha/Schema/Result/AuthTagStructure.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AuthTagStructure; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AuthTagStructure + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AuthTagStructure +=head1 TABLE: C =cut @@ -90,6 +94,19 @@ __PACKAGE__->add_columns( "authorised_value", { data_type => "varchar", is_nullable => 1, size => 10 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("authtypecode", "tagfield"); =head1 RELATIONS @@ -106,12 +123,12 @@ __PACKAGE__->belongs_to( "authtypecode", "Koha::Schema::Result::AuthType", { authtypecode => "authtypecode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EIrlKC3v6sYrPt9F21xeag +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4ulaQnDuxrwYgCKJ/Qygaw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthType.pm b/Koha/Schema/Result/AuthType.pm index a84d931709..d4a7d778e3 100644 --- a/Koha/Schema/Result/AuthType.pm +++ b/Koha/Schema/Result/AuthType.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AuthType; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AuthType + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AuthType +=head1 TABLE: C =cut @@ -57,6 +61,17 @@ __PACKAGE__->add_columns( "summary", { data_type => "mediumtext", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("authtypecode"); =head1 RELATIONS @@ -77,8 +92,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:n40JCBQ6mHTaHDRGG8mk2w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sy0+bAJuYz5t9OVCq0Vo8Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthorisedValue.pm b/Koha/Schema/Result/AuthorisedValue.pm index 3e71f33f6c..0366aecb65 100644 --- a/Koha/Schema/Result/AuthorisedValue.pm +++ b/Koha/Schema/Result/AuthorisedValue.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AuthorisedValue; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AuthorisedValue + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AuthorisedValue +=head1 TABLE: C =cut @@ -73,6 +77,17 @@ __PACKAGE__->add_columns( "imageurl", { data_type => "varchar", is_nullable => 1, size => 200 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); =head1 RELATIONS @@ -93,8 +108,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UQnP1vJKTnc7KwuTT20Orw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N6Q7Y4sHL03X170zJ3APUA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/AuthorisedValuesBranch.pm b/Koha/Schema/Result/AuthorisedValuesBranch.pm index 1d81c4b450..0c6e2d9261 100644 --- a/Koha/Schema/Result/AuthorisedValuesBranch.pm +++ b/Koha/Schema/Result/AuthorisedValuesBranch.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::AuthorisedValuesBranch; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::AuthorisedValuesBranch + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::AuthorisedValuesBranch +=head1 TABLE: C =cut @@ -55,7 +59,12 @@ __PACKAGE__->belongs_to( "av", "Koha::Schema::Result::AuthorisedValue", { id => "av_id" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 branchcode @@ -70,12 +79,17 @@ __PACKAGE__->belongs_to( "branchcode", "Koha::Schema::Result::Branch", { branchcode => "branchcode" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yPaKXjOzZX76bddoMqxKmA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k6hCbzMVZ1VRsubvdrZMYQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Biblio.pm b/Koha/Schema/Result/Biblio.pm index 1192307e81..2a8c28ea3b 100644 --- a/Koha/Schema/Result/Biblio.pm +++ b/Koha/Schema/Result/Biblio.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Biblio; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Biblio + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Biblio +=head1 TABLE: C =cut @@ -70,12 +74,14 @@ __PACKAGE__->table("biblio"); =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 @@ -106,15 +112,27 @@ __PACKAGE__->add_columns( { data_type => "smallint", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "datecreated", - { data_type => "date", is_nullable => 0 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, "abstract", { data_type => "mediumtext", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("biblionumber"); =head1 RELATIONS @@ -299,9 +317,19 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 sets + +Type: many_to_many + +Composing rels: L -> set + +=cut + +__PACKAGE__->many_to_many("sets", "oai_sets_biblios", "set"); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NwOZPwmnB/44XMp45TzWVg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0//8OGf7OteNnwT03g4QsA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BiblioFramework.pm b/Koha/Schema/Result/BiblioFramework.pm index e2a34d53e3..36c223bb63 100644 --- a/Koha/Schema/Result/BiblioFramework.pm +++ b/Koha/Schema/Result/BiblioFramework.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BiblioFramework; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BiblioFramework + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BiblioFramework +=head1 TABLE: C =cut @@ -41,11 +45,22 @@ __PACKAGE__->add_columns( "frameworktext", { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("frameworkcode"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:tEQykJXvhOfUAxNs4DnBaQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KY1w7J/5cBsz9VV7QEBKPw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Biblioimage.pm b/Koha/Schema/Result/Biblioimage.pm index 39b69b8120..400eef5047 100644 --- a/Koha/Schema/Result/Biblioimage.pm +++ b/Koha/Schema/Result/Biblioimage.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Biblioimage; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Biblioimage + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Biblioimage +=head1 TABLE: C =cut @@ -61,6 +65,17 @@ __PACKAGE__->add_columns( "thumbnail", { data_type => "mediumblob", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("imagenumber"); =head1 RELATIONS @@ -77,12 +92,12 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9P2Yp+Ye/tJ3+aG7mQR8sQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WdDuaUrR0IC6+8jJwlev6A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Biblioitem.pm b/Koha/Schema/Result/Biblioitem.pm index 18ea787312..085251ec5b 100644 --- a/Koha/Schema/Result/Biblioitem.pm +++ b/Koha/Schema/Result/Biblioitem.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Biblioitem; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Biblioitem + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Biblioitem +=head1 TABLE: C =cut @@ -80,6 +84,7 @@ __PACKAGE__->table("biblioitems"); =head2 volumedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 volumedesc @@ -115,6 +120,7 @@ __PACKAGE__->table("biblioitems"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -239,7 +245,7 @@ __PACKAGE__->add_columns( "publishercode", { data_type => "varchar", is_nullable => 1, size => 255 }, "volumedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "volumedesc", { data_type => "text", is_nullable => 1 }, "collectiontitle", @@ -254,9 +260,10 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "illus", { data_type => "varchar", is_nullable => 1, size => 255 }, @@ -291,6 +298,17 @@ __PACKAGE__->add_columns( "marcxml", { data_type => "longtext", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("biblioitemnumber"); =head1 RELATIONS @@ -307,7 +325,7 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 items @@ -326,8 +344,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j5xMUqTsOxa/ieu7yPnOaA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Vyrs9pWYoqhWJw+cRy1EVg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index 2b700bf65a..3fe43624e6 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Borrower; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Borrower + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Borrower +=head1 TABLE: C =cut @@ -187,6 +191,7 @@ __PACKAGE__->table("borrowers"); =head2 dateofbirth data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 branchcode @@ -208,11 +213,13 @@ __PACKAGE__->table("borrowers"); =head2 dateenrolled data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 dateexpiry data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 gonenoaddress @@ -228,6 +235,7 @@ __PACKAGE__->table("borrowers"); =head2 debarred data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 debarredcomment @@ -289,7 +297,7 @@ __PACKAGE__->table("borrowers"); data_type: 'varchar' is_nullable: 1 - size: 30 + size: 60 =head2 flags @@ -455,7 +463,7 @@ __PACKAGE__->add_columns( "b_phone", { data_type => "mediumtext", is_nullable => 1 }, "dateofbirth", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "branchcode", { data_type => "varchar", @@ -473,15 +481,15 @@ __PACKAGE__->add_columns( size => 10, }, "dateenrolled", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "dateexpiry", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "gonenoaddress", { data_type => "tinyint", is_nullable => 1 }, "lost", { data_type => "tinyint", is_nullable => 1 }, "debarred", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "debarredcomment", { data_type => "varchar", is_nullable => 1, size => 255 }, "contactname", @@ -503,7 +511,7 @@ __PACKAGE__->add_columns( "sex", { data_type => "varchar", is_nullable => 1, size => 1 }, "password", - { data_type => "varchar", is_nullable => 1, size => 30 }, + { data_type => "varchar", is_nullable => 1, size => 60 }, "flags", { data_type => "integer", is_nullable => 1 }, "userid", @@ -539,7 +547,31 @@ __PACKAGE__->add_columns( "privacy", { data_type => "integer", default_value => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("borrowernumber"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]); =head1 RELATIONS @@ -634,34 +666,34 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 categorycode +=head2 branchcode Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "categorycode", - "Koha::Schema::Result::Category", - { categorycode => "categorycode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + "branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 branchcode +=head2 categorycode Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "branchcode", - "Koha::Schema::Result::Branch", - { branchcode => "branchcode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + "categorycode", + "Koha::Schema::Result::Category", + { categorycode => "categorycode" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 course_instructors @@ -795,7 +827,7 @@ Related object: L __PACKAGE__->might_have( "patronimage", "Koha::Schema::Result::Patronimage", - { "foreign.cardnumber" => "self.cardnumber" }, + { "foreign.borrowernumber" => "self.borrowernumber" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -949,9 +981,29 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 budgets + +Type: many_to_many + +Composing rels: L -> budget + +=cut + +__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget"); + +=head2 courses + +Type: many_to_many + +Composing rels: L -> course + +=cut + +__PACKAGE__->many_to_many("courses", "course_instructors", "course"); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RZG8l5yFKXZzsAY8CenNeA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RTqzsubViQ3dHnXCUKqgNg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerAttribute.pm b/Koha/Schema/Result/BorrowerAttribute.pm index 3ac3b83988..0b7a96c087 100644 --- a/Koha/Schema/Result/BorrowerAttribute.pm +++ b/Koha/Schema/Result/BorrowerAttribute.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BorrowerAttribute; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BorrowerAttribute + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BorrowerAttribute +=head1 TABLE: C =cut @@ -71,7 +75,7 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 code @@ -86,12 +90,12 @@ __PACKAGE__->belongs_to( "code", "Koha::Schema::Result::BorrowerAttributeType", { code => "code" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LWaFw4Fk0Bj+K6JgDpicmA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9oRy+X25+b7vB03WSnpFTg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerAttributeType.pm b/Koha/Schema/Result/BorrowerAttributeType.pm index 94e96f35b6..f2f51202cf 100644 --- a/Koha/Schema/Result/BorrowerAttributeType.pm +++ b/Koha/Schema/Result/BorrowerAttributeType.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BorrowerAttributeType; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BorrowerAttributeType + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BorrowerAttributeType +=head1 TABLE: C =cut @@ -112,6 +116,17 @@ __PACKAGE__->add_columns( "class", { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("code"); =head1 RELATIONS @@ -147,8 +162,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vwni0x6JLQPsjX8UOSnr4Q +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xFtIJw7nKVVk6dzBVDO60A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerAttributeTypesBranch.pm b/Koha/Schema/Result/BorrowerAttributeTypesBranch.pm index e867b8c7c5..362b5cc948 100644 --- a/Koha/Schema/Result/BorrowerAttributeTypesBranch.pm +++ b/Koha/Schema/Result/BorrowerAttributeTypesBranch.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BorrowerAttributeTypesBranch; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BorrowerAttributeTypesBranch + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BorrowerAttributeTypesBranch +=head1 TABLE: C =cut @@ -44,39 +48,49 @@ __PACKAGE__->add_columns( =head1 RELATIONS -=head2 bat_code +=head2 b_branchcode Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "bat_code", - "Koha::Schema::Result::BorrowerAttributeType", - { code => "bat_code" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + "b_branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "b_branchcode" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -=head2 b_branchcode +=head2 bat_code Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "b_branchcode", - "Koha::Schema::Result::Branch", - { branchcode => "b_branchcode" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + "bat_code", + "Koha::Schema::Result::BorrowerAttributeType", + { code => "bat_code" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:z/zsaV00AbPzi/YfCh+cwA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/ppDBtfKZvUNcERWFbLuuw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerFile.pm b/Koha/Schema/Result/BorrowerFile.pm index d967be97d5..6f0982d519 100644 --- a/Koha/Schema/Result/BorrowerFile.pm +++ b/Koha/Schema/Result/BorrowerFile.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BorrowerFile; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BorrowerFile + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BorrowerFile +=head1 TABLE: C =cut @@ -57,6 +61,7 @@ __PACKAGE__->table("borrower_files"); =head2 date_uploaded data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -77,11 +82,23 @@ __PACKAGE__->add_columns( { data_type => "longblob", is_nullable => 0 }, "date_uploaded", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("file_id"); =head1 RELATIONS @@ -98,12 +115,12 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5nM5pPcZmdSjcoBGIlTp9A +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sbkf7bvdO4CgmiBLgIwYQg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerMessagePreference.pm b/Koha/Schema/Result/BorrowerMessagePreference.pm index 03cecfbd64..3069df50f0 100644 --- a/Koha/Schema/Result/BorrowerMessagePreference.pm +++ b/Koha/Schema/Result/BorrowerMessagePreference.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BorrowerMessagePreference; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BorrowerMessagePreference + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BorrowerMessagePreference +=head1 TABLE: C =cut @@ -78,10 +82,38 @@ __PACKAGE__->add_columns( "wants_digest", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("borrower_message_preference_id"); =head1 RELATIONS +=head2 borrower_message_transport_preferences + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "borrower_message_transport_preferences", + "Koha::Schema::Result::BorrowerMessageTransportPreference", + { + "foreign.borrower_message_preference_id" => "self.borrower_message_preference_id", + }, + { cascade_copy => 0, cascade_delete => 0 }, +); + =head2 borrowernumber Type: belongs_to @@ -94,59 +126,71 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -=head2 message_attribute +=head2 categorycode Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "message_attribute", - "Koha::Schema::Result::MessageAttribute", - { message_attribute_id => "message_attribute_id" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + "categorycode", + "Koha::Schema::Result::Category", + { categorycode => "categorycode" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -=head2 categorycode +=head2 message_attribute Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "categorycode", - "Koha::Schema::Result::Category", - { categorycode => "categorycode" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + "message_attribute", + "Koha::Schema::Result::MessageAttribute", + { message_attribute_id => "message_attribute_id" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -=head2 borrower_message_transport_preferences +=head2 message_transport_types -Type: has_many +Type: many_to_many -Related object: L +Composing rels: L -> message_transport_type =cut -__PACKAGE__->has_many( +__PACKAGE__->many_to_many( + "message_transport_types", "borrower_message_transport_preferences", - "Koha::Schema::Result::BorrowerMessageTransportPreference", - { - "foreign.borrower_message_preference_id" => "self.borrower_message_preference_id", - }, - { cascade_copy => 0, cascade_delete => 0 }, + "message_transport_type", ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dP6LspN4dP65EGfApx6xIw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hd5sPnxGi5332WmzqCus8A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerMessageTransportPreference.pm b/Koha/Schema/Result/BorrowerMessageTransportPreference.pm index d898a60459..10f3f460d0 100644 --- a/Koha/Schema/Result/BorrowerMessageTransportPreference.pm +++ b/Koha/Schema/Result/BorrowerMessageTransportPreference.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BorrowerMessageTransportPreference; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BorrowerMessageTransportPreference + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BorrowerMessageTransportPreference +=head1 TABLE: C =cut @@ -53,6 +57,19 @@ __PACKAGE__->add_columns( size => 20, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("borrower_message_preference_id", "message_transport_type"); =head1 RELATIONS @@ -71,7 +88,7 @@ __PACKAGE__->belongs_to( { borrower_message_preference_id => "borrower_message_preference_id", }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 message_transport_type @@ -86,12 +103,12 @@ __PACKAGE__->belongs_to( "message_transport_type", "Koha::Schema::Result::MessageTransportType", { message_transport_type => "message_transport_type" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Pqunp568ul/dBpW5ISwr7Q +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yHKWBur//GdtTL5IdjcgIg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BorrowerModification.pm b/Koha/Schema/Result/BorrowerModification.pm index 4b65a166af..08cf62beb9 100644 --- a/Koha/Schema/Result/BorrowerModification.pm +++ b/Koha/Schema/Result/BorrowerModification.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BorrowerModification; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BorrowerModification + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BorrowerModification +=head1 TABLE: C =cut @@ -22,6 +26,7 @@ __PACKAGE__->table("borrower_modifications"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -200,6 +205,7 @@ __PACKAGE__->table("borrower_modifications"); =head2 dateofbirth data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 branchcode @@ -217,11 +223,13 @@ __PACKAGE__->table("borrower_modifications"); =head2 dateenrolled data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 dateexpiry data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 gonenoaddress @@ -237,6 +245,7 @@ __PACKAGE__->table("borrower_modifications"); =head2 debarred data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 debarredcomment @@ -402,9 +411,10 @@ __PACKAGE__->table("borrower_modifications"); __PACKAGE__->add_columns( "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "verification_token", { data_type => "varchar", default_value => "", is_nullable => 0, size => 255 }, @@ -471,21 +481,21 @@ __PACKAGE__->add_columns( "b_phone", { data_type => "mediumtext", is_nullable => 1 }, "dateofbirth", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "branchcode", { data_type => "varchar", is_nullable => 1, size => 10 }, "categorycode", { data_type => "varchar", is_nullable => 1, size => 10 }, "dateenrolled", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "dateexpiry", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "gonenoaddress", { data_type => "tinyint", is_nullable => 1 }, "lost", { data_type => "tinyint", is_nullable => 1 }, "debarred", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "debarredcomment", { data_type => "varchar", is_nullable => 1, size => 255 }, "contactname", @@ -543,11 +553,24 @@ __PACKAGE__->add_columns( "privacy", { data_type => "integer", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("verification_token", "borrowernumber"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:F50fjkEjqHuyl7zaEDV+3A +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:11X5o3u4/EqPRVbQdtAuOA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Branch.pm b/Koha/Schema/Result/Branch.pm index 1542325552..a2cfba3613 100644 --- a/Koha/Schema/Result/Branch.pm +++ b/Koha/Schema/Result/Branch.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Branch; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Branch + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Branch +=head1 TABLE: C =cut @@ -154,6 +158,17 @@ __PACKAGE__->add_columns( "opac_info", { data_type => "text", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("branchcode"); =head1 RELATIONS @@ -353,7 +368,7 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 items_homebranches +=head2 items_holdingbranches Type: has_many @@ -362,13 +377,13 @@ Related object: L =cut __PACKAGE__->has_many( - "items_homebranches", + "items_holdingbranches", "Koha::Schema::Result::Item", - { "foreign.homebranch" => "self.branchcode" }, + { "foreign.holdingbranch" => "self.branchcode" }, { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 items_holdingbranches +=head2 items_homebranches Type: has_many @@ -377,9 +392,9 @@ Related object: L =cut __PACKAGE__->has_many( - "items_holdingbranches", + "items_homebranches", "Koha::Schema::Result::Item", - { "foreign.holdingbranch" => "self.branchcode" }, + { "foreign.homebranch" => "self.branchcode" }, { cascade_copy => 0, cascade_delete => 0 }, ); @@ -428,9 +443,19 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 categorycodes + +Type: many_to_many + +Composing rels: L -> categorycode + +=cut + +__PACKAGE__->many_to_many("categorycodes", "branchrelations", "categorycode"); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BS/6xtFAoMSKsXho4IXXjQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7TY0QNDQkB33iQeLAgo1qg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BranchBorrowerCircRule.pm b/Koha/Schema/Result/BranchBorrowerCircRule.pm index 071df51af4..fce2914f72 100644 --- a/Koha/Schema/Result/BranchBorrowerCircRule.pm +++ b/Koha/Schema/Result/BranchBorrowerCircRule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BranchBorrowerCircRule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BranchBorrowerCircRule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BranchBorrowerCircRule +=head1 TABLE: C =cut @@ -48,24 +52,22 @@ __PACKAGE__->add_columns( "maxissueqty", { data_type => "integer", is_nullable => 1 }, ); -__PACKAGE__->set_primary_key("categorycode", "branchcode"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 categorycode +=over 4 -Type: belongs_to +=item * L -Related object: L +=item * L + +=back =cut -__PACKAGE__->belongs_to( - "categorycode", - "Koha::Schema::Result::Category", - { categorycode => "categorycode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("categorycode", "branchcode"); + +=head1 RELATIONS =head2 branchcode @@ -79,12 +81,27 @@ __PACKAGE__->belongs_to( "branchcode", "Koha::Schema::Result::Branch", { branchcode => "branchcode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 categorycode + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "categorycode", + "Koha::Schema::Result::Category", + { categorycode => "categorycode" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Urf4PD4Ob8D3kqgvz7PGtA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X24Sil3WTnxoeAa/16tpUQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BranchItemRule.pm b/Koha/Schema/Result/BranchItemRule.pm index c73c04c48b..a074597cc5 100644 --- a/Koha/Schema/Result/BranchItemRule.pm +++ b/Koha/Schema/Result/BranchItemRule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BranchItemRule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BranchItemRule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BranchItemRule +=head1 TABLE: C =cut @@ -56,24 +60,22 @@ __PACKAGE__->add_columns( "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); -__PACKAGE__->set_primary_key("itemtype", "branchcode"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 itemtype +=over 4 -Type: belongs_to +=item * L -Related object: L +=item * L + +=back =cut -__PACKAGE__->belongs_to( - "itemtype", - "Koha::Schema::Result::Itemtype", - { itemtype => "itemtype" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("itemtype", "branchcode"); + +=head1 RELATIONS =head2 branchcode @@ -87,12 +89,27 @@ __PACKAGE__->belongs_to( "branchcode", "Koha::Schema::Result::Branch", { branchcode => "branchcode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 itemtype + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "itemtype", + "Koha::Schema::Result::Itemtype", + { itemtype => "itemtype" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7Pbf8S6Y9k2teX1337IGIA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YLO0fLLilsc7tSfx8v/biw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/BranchTransferLimit.pm b/Koha/Schema/Result/BranchTransferLimit.pm index f82ff05d29..2c3011f1de 100644 --- a/Koha/Schema/Result/BranchTransferLimit.pm +++ b/Koha/Schema/Result/BranchTransferLimit.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::BranchTransferLimit; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::BranchTransferLimit + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::BranchTransferLimit +=head1 TABLE: C =cut @@ -63,11 +67,22 @@ __PACKAGE__->add_columns( "ccode", { data_type => "varchar", is_nullable => 1, size => 10 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("limitid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5tloMmwsDVXChfqSMEPOoA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HN/uEtGTNOewMCqTQZ1Vew # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Branchcategory.pm b/Koha/Schema/Result/Branchcategory.pm index 592a1d7fd5..6417ca91c0 100644 --- a/Koha/Schema/Result/Branchcategory.pm +++ b/Koha/Schema/Result/Branchcategory.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Branchcategory; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Branchcategory + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Branchcategory +=head1 TABLE: C =cut @@ -63,6 +67,17 @@ __PACKAGE__->add_columns( "show_in_pulldown", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("categorycode"); =head1 RELATIONS @@ -82,9 +97,19 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 branchcodes + +Type: many_to_many + +Composing rels: L -> branchcode + +=cut + +__PACKAGE__->many_to_many("branchcodes", "branchrelations", "branchcode"); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VkvImio07fpqmHCntPn5+w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HU5N7lAiLIz6yC9va3fDbg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Branchrelation.pm b/Koha/Schema/Result/Branchrelation.pm index f84ff277df..e44412b59a 100644 --- a/Koha/Schema/Result/Branchrelation.pm +++ b/Koha/Schema/Result/Branchrelation.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Branchrelation; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Branchrelation + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Branchrelation +=head1 TABLE: C =cut @@ -55,6 +59,19 @@ __PACKAGE__->add_columns( size => 10, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("branchcode", "categorycode"); =head1 RELATIONS @@ -71,7 +88,7 @@ __PACKAGE__->belongs_to( "branchcode", "Koha::Schema::Result::Branch", { branchcode => "branchcode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 categorycode @@ -86,12 +103,12 @@ __PACKAGE__->belongs_to( "categorycode", "Koha::Schema::Result::Branchcategory", { categorycode => "categorycode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VFoJV/KyMCVH7/fD5bSY/w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lBOq8k+wurbp633kbi8tVg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Branchtransfer.pm b/Koha/Schema/Result/Branchtransfer.pm index 05691c5669..1976ffd402 100644 --- a/Koha/Schema/Result/Branchtransfer.pm +++ b/Koha/Schema/Result/Branchtransfer.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Branchtransfer; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Branchtransfer + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Branchtransfer +=head1 TABLE: C =cut @@ -29,6 +33,7 @@ __PACKAGE__->table("branchtransfers"); =head2 datesent data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 frombranch @@ -42,6 +47,7 @@ __PACKAGE__->table("branchtransfers"); =head2 datearrived data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 tobranch @@ -68,7 +74,11 @@ __PACKAGE__->add_columns( is_nullable => 0, }, "datesent", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "frombranch", { data_type => "varchar", @@ -78,7 +88,11 @@ __PACKAGE__->add_columns( size => 10, }, "datearrived", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "tobranch", { data_type => "varchar", @@ -105,42 +119,42 @@ __PACKAGE__->belongs_to( "frombranch", "Koha::Schema::Result::Branch", { branchcode => "frombranch" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 tobranch +=head2 itemnumber Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "tobranch", - "Koha::Schema::Result::Branch", - { branchcode => "tobranch" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + "itemnumber", + "Koha::Schema::Result::Item", + { itemnumber => "itemnumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 itemnumber +=head2 tobranch Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "itemnumber", - "Koha::Schema::Result::Item", - { itemnumber => "itemnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + "tobranch", + "Koha::Schema::Result::Branch", + { branchcode => "tobranch" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ojdZ8a0zDyBQi7MaMtCSuQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NPbH+5o2BVPj8yeoUqEavw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Browser.pm b/Koha/Schema/Result/Browser.pm index e8d403c929..3e9c1d38e0 100644 --- a/Koha/Schema/Result/Browser.pm +++ b/Koha/Schema/Result/Browser.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Browser; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Browser + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Browser +=head1 TABLE: C =cut @@ -62,8 +66,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PdemP//rSRmiSjwhmhigdA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eMoAXr+/JrrwEjJ3dRRwoA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CategoriesBranch.pm b/Koha/Schema/Result/CategoriesBranch.pm index 756d014571..584c177242 100644 --- a/Koha/Schema/Result/CategoriesBranch.pm +++ b/Koha/Schema/Result/CategoriesBranch.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CategoriesBranch; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CategoriesBranch + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CategoriesBranch +=head1 TABLE: C =cut @@ -44,39 +48,49 @@ __PACKAGE__->add_columns( =head1 RELATIONS -=head2 categorycode +=head2 branchcode Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "categorycode", - "Koha::Schema::Result::Category", - { categorycode => "categorycode" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + "branchcode", + "Koha::Schema::Result::Branch", + { branchcode => "branchcode" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -=head2 branchcode +=head2 categorycode Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "branchcode", - "Koha::Schema::Result::Branch", - { branchcode => "branchcode" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + "categorycode", + "Koha::Schema::Result::Category", + { categorycode => "categorycode" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SVolMqOZ2fpkPdSCSjpDUA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9fXKFDUQsOx+uqF+slRhSw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Category.pm b/Koha/Schema/Result/Category.pm index 7b61cb3863..12ac12f605 100644 --- a/Koha/Schema/Result/Category.pm +++ b/Koha/Schema/Result/Category.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Category; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Category + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Category +=head1 TABLE: C =cut @@ -39,6 +43,7 @@ __PACKAGE__->table("categories"); =head2 enrolmentperioddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 upperagelimit @@ -107,7 +112,7 @@ __PACKAGE__->add_columns( "enrolmentperiod", { data_type => "smallint", is_nullable => 1 }, "enrolmentperioddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "upperagelimit", { data_type => "smallint", is_nullable => 1 }, "dateofbirthrequired", @@ -129,6 +134,17 @@ __PACKAGE__->add_columns( "category_type", { data_type => "varchar", default_value => "A", is_nullable => 0, size => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("categorycode"); =head1 RELATIONS @@ -209,8 +225,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rQnbpUtXD6tNSnSGpowcaw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lert5/PnaztNZ9rmoGc2Gg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/City.pm b/Koha/Schema/Result/City.pm index 4174602a6c..9f9ce6bf81 100644 --- a/Koha/Schema/Result/City.pm +++ b/Koha/Schema/Result/City.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::City; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::City + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::City +=head1 TABLE: C =cut @@ -64,11 +68,22 @@ __PACKAGE__->add_columns( "city_zipcode", { data_type => "varchar", is_nullable => 1, size => 20 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("cityid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ziAiH8vvSS8OzKHZBcpUow +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zEjfS65sp13yF7dH8/ojZQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ClassSortRule.pm b/Koha/Schema/Result/ClassSortRule.pm index c32533cac6..567c01af58 100644 --- a/Koha/Schema/Result/ClassSortRule.pm +++ b/Koha/Schema/Result/ClassSortRule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ClassSortRule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ClassSortRule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ClassSortRule +=head1 TABLE: C =cut @@ -48,6 +52,17 @@ __PACKAGE__->add_columns( "sort_routine", { data_type => "varchar", default_value => "", is_nullable => 0, size => 30 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("class_sort_rule"); =head1 RELATIONS @@ -68,8 +83,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3JLMzBsuge+hUAqcXVtgzQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xvTm4GLMb6N4qHQEv8EhSw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ClassSource.pm b/Koha/Schema/Result/ClassSource.pm index 640b03a5fb..a0b27cd436 100644 --- a/Koha/Schema/Result/ClassSource.pm +++ b/Koha/Schema/Result/ClassSource.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ClassSource; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ClassSource + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ClassSource +=head1 TABLE: C =cut @@ -63,6 +67,17 @@ __PACKAGE__->add_columns( size => 10, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("cn_source"); =head1 RELATIONS @@ -79,12 +94,12 @@ __PACKAGE__->belongs_to( "class_sort_rule", "Koha::Schema::Result::ClassSortRule", { class_sort_rule => "class_sort_rule" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fot5u8I5lS5/W0bHPD0Rpw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OPkfouKUejU6oCgy58yt6Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Collection.pm b/Koha/Schema/Result/Collection.pm index 6761a8aa3e..92b0f6c6a0 100644 --- a/Koha/Schema/Result/Collection.pm +++ b/Koha/Schema/Result/Collection.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Collection; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Collection + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Collection +=head1 TABLE: C =cut @@ -43,6 +47,8 @@ __PACKAGE__->table("collections"); is_nullable: 1 size: 4 +branchcode for branch where item should be held. + =cut __PACKAGE__->add_columns( @@ -55,11 +61,22 @@ __PACKAGE__->add_columns( "colbranchcode", { data_type => "varchar", is_nullable => 1, size => 4 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("colid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MCaPTe+sCHOw8R6O+qFRIA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KNJIC+I4OdfXBAPM8zOB4A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CollectionTracking.pm b/Koha/Schema/Result/CollectionTracking.pm index 3ab741f26e..907ff68361 100644 --- a/Koha/Schema/Result/CollectionTracking.pm +++ b/Koha/Schema/Result/CollectionTracking.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CollectionTracking; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CollectionTracking + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CollectionTracking +=head1 TABLE: C =cut @@ -31,12 +35,16 @@ __PACKAGE__->table("collections_tracking"); default_value: 0 is_nullable: 0 +collections.colId + =head2 itemnumber data_type: 'integer' default_value: 0 is_nullable: 0 +items.itemnumber + =cut __PACKAGE__->add_columns( @@ -47,11 +55,22 @@ __PACKAGE__->add_columns( "itemnumber", { data_type => "integer", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("ctid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OV5D03dIIo/pCuRSBPsXsg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:izGaZGUJvwrRTQOCotopUg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Course.pm b/Koha/Schema/Result/Course.pm index 91615f008a..ceef5bc20a 100644 --- a/Koha/Schema/Result/Course.pm +++ b/Koha/Schema/Result/Course.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Course; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Course + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Course +=head1 TABLE: C =cut @@ -29,7 +33,7 @@ __PACKAGE__->table("courses"); data_type: 'varchar' is_nullable: 1 - size: 20 + size: 80 =head2 course_number @@ -53,7 +57,7 @@ __PACKAGE__->table("courses"); data_type: 'varchar' is_nullable: 1 - size: 20 + size: 80 =head2 staff_note @@ -81,6 +85,7 @@ __PACKAGE__->table("courses"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -90,7 +95,7 @@ __PACKAGE__->add_columns( "course_id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, "department", - { data_type => "varchar", is_nullable => 1, size => 20 }, + { data_type => "varchar", is_nullable => 1, size => 80 }, "course_number", { data_type => "varchar", is_nullable => 1, size => 255 }, "section", @@ -98,7 +103,7 @@ __PACKAGE__->add_columns( "course_name", { data_type => "varchar", is_nullable => 1, size => 255 }, "term", - { data_type => "varchar", is_nullable => 1, size => 20 }, + { data_type => "varchar", is_nullable => 1, size => 80 }, "staff_note", { data_type => "mediumtext", is_nullable => 1 }, "public_note", @@ -114,11 +119,23 @@ __PACKAGE__->add_columns( }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("course_id"); =head1 RELATIONS @@ -153,9 +170,19 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 borrowernumbers + +Type: many_to_many + +Composing rels: L -> borrowernumber + +=cut + +__PACKAGE__->many_to_many("borrowernumbers", "course_instructors", "borrowernumber"); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SN5SfQi+SbfPr069wck64w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:crKCFQ80qo2p885ebiBfnw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CourseInstructor.pm b/Koha/Schema/Result/CourseInstructor.pm index 6f38227435..c1d183c58c 100644 --- a/Koha/Schema/Result/CourseInstructor.pm +++ b/Koha/Schema/Result/CourseInstructor.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CourseInstructor; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CourseInstructor + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CourseInstructor +=head1 TABLE: C =cut @@ -39,24 +43,22 @@ __PACKAGE__->add_columns( "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); -__PACKAGE__->set_primary_key("course_id", "borrowernumber"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 course +=over 4 -Type: belongs_to +=item * L -Related object: L +=item * L + +=back =cut -__PACKAGE__->belongs_to( - "course", - "Koha::Schema::Result::Course", - { course_id => "course_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("course_id", "borrowernumber"); + +=head1 RELATIONS =head2 borrowernumber @@ -70,12 +72,27 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 course + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "course", + "Koha::Schema::Result::Course", + { course_id => "course_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:zPwefIbI2Pz0pX03KpS1eQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dIemqF/uRWLNN4IMCHZxRA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CourseItem.pm b/Koha/Schema/Result/CourseItem.pm index 5a59bd8659..a37263dd17 100644 --- a/Koha/Schema/Result/CourseItem.pm +++ b/Koha/Schema/Result/CourseItem.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CourseItem; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CourseItem + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CourseItem +=head1 TABLE: C =cut @@ -66,6 +70,7 @@ __PACKAGE__->table("course_items"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -93,12 +98,37 @@ __PACKAGE__->add_columns( }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("ci_id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("itemnumber", ["itemnumber"]); =head1 RELATIONS @@ -115,7 +145,12 @@ __PACKAGE__->belongs_to( "holdingbranch", "Koha::Schema::Result::Branch", { branchcode => "holdingbranch" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 itemnumber @@ -130,12 +165,12 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BAqW3ImuEzBoIMWAeM12qA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iVWZfUWcPfrLdLdvjyvbow # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CourseReserve.pm b/Koha/Schema/Result/CourseReserve.pm index 607046af57..bb937b27de 100644 --- a/Koha/Schema/Result/CourseReserve.pm +++ b/Koha/Schema/Result/CourseReserve.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CourseReserve; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CourseReserve + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CourseReserve +=head1 TABLE: C =cut @@ -49,6 +53,7 @@ __PACKAGE__->table("course_reserves"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -67,12 +72,39 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("cr_id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("pseudo_key", ["course_id", "ci_id"]); =head1 RELATIONS @@ -89,12 +121,12 @@ __PACKAGE__->belongs_to( "course", "Koha::Schema::Result::Course", { course_id => "course_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LUZRTXuhywezgITcSqqDJQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9KuuUyFReuw+PAlLW84yXQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CreatorBatch.pm b/Koha/Schema/Result/CreatorBatch.pm index 9a6ffc8841..3fdc97c2d7 100644 --- a/Koha/Schema/Result/CreatorBatch.pm +++ b/Koha/Schema/Result/CreatorBatch.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CreatorBatch; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CreatorBatch + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CreatorBatch +=head1 TABLE: C =cut @@ -46,6 +50,7 @@ __PACKAGE__->table("creator_batches"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -77,9 +82,10 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "branch_code", { @@ -97,6 +103,17 @@ __PACKAGE__->add_columns( size => 15, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("label_id"); =head1 RELATIONS @@ -113,7 +130,12 @@ __PACKAGE__->belongs_to( "borrower_number", "Koha::Schema::Result::Borrower", { borrowernumber => "borrower_number" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 branch_code @@ -128,7 +150,7 @@ __PACKAGE__->belongs_to( "branch_code", "Koha::Schema::Result::Branch", { branchcode => "branch_code" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 item_number @@ -143,12 +165,17 @@ __PACKAGE__->belongs_to( "item_number", "Koha::Schema::Result::Item", { itemnumber => "item_number" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ei9dbdCUspCrRrhIBHQG6w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:w5Nfrm8a8ajsC0bLBACaWg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CreatorImage.pm b/Koha/Schema/Result/CreatorImage.pm index 3e90c895f6..70a669e933 100644 --- a/Koha/Schema/Result/CreatorImage.pm +++ b/Koha/Schema/Result/CreatorImage.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CreatorImage; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CreatorImage + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CreatorImage +=head1 TABLE: C =cut @@ -52,12 +56,36 @@ __PACKAGE__->add_columns( size => 20, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("image_id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("image_name_index", ["image_name"]); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5s/Ejf4/8x2uRb1aDvLhqA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:veljpS1CT3wfNDilccroGg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CreatorLayout.pm b/Koha/Schema/Result/CreatorLayout.pm index f044facf62..5dc03d4e08 100644 --- a/Koha/Schema/Result/CreatorLayout.pm +++ b/Koha/Schema/Result/CreatorLayout.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CreatorLayout; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CreatorLayout + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CreatorLayout +=head1 TABLE: C =cut @@ -162,11 +166,22 @@ __PACKAGE__->add_columns( size => 15, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("layout_id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NARlAl2b7wt4a8MmUr0giw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MNE/WVsvlJXO5IHiM64yPQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/CreatorTemplate.pm b/Koha/Schema/Result/CreatorTemplate.pm index 67943ae948..b96c64da72 100644 --- a/Koha/Schema/Result/CreatorTemplate.pm +++ b/Koha/Schema/Result/CreatorTemplate.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::CreatorTemplate; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::CreatorTemplate + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::CreatorTemplate +=head1 TABLE: C =cut @@ -185,11 +189,22 @@ __PACKAGE__->add_columns( size => 15, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("template_id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7+6xi7FTvNEbXqNlPfzQSw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2NGDs68pqskZaoiyURPIGg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Currency.pm b/Koha/Schema/Result/Currency.pm index a09337b854..7528869cdf 100644 --- a/Koha/Schema/Result/Currency.pm +++ b/Koha/Schema/Result/Currency.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Currency; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Currency + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Currency +=head1 TABLE: C =cut @@ -35,6 +39,7 @@ __PACKAGE__->table("currency"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -58,20 +63,32 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 5 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "rate", { data_type => "float", is_nullable => 1, size => [15, 5] }, "active", { data_type => "tinyint", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("currency"); =head1 RELATIONS -=head2 aqbooksellers_listprices +=head2 aqbooksellers_invoiceprices Type: has_many @@ -80,13 +97,13 @@ Related object: L =cut __PACKAGE__->has_many( - "aqbooksellers_listprices", + "aqbooksellers_invoiceprices", "Koha::Schema::Result::Aqbookseller", - { "foreign.listprice" => "self.currency" }, + { "foreign.invoiceprice" => "self.currency" }, { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 aqbooksellers_invoiceprices +=head2 aqbooksellers_listprices Type: has_many @@ -95,15 +112,15 @@ Related object: L =cut __PACKAGE__->has_many( - "aqbooksellers_invoiceprices", + "aqbooksellers_listprices", "Koha::Schema::Result::Aqbookseller", - { "foreign.invoiceprice" => "self.currency" }, + { "foreign.listprice" => "self.currency" }, { cascade_copy => 0, cascade_delete => 0 }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6SWDTY33KjtpW71Elgs69g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1fpLJHtP0bseXVfytxii5Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DefaultBorrowerCircRule.pm b/Koha/Schema/Result/DefaultBorrowerCircRule.pm index 00f9266d80..0f9c8f152c 100644 --- a/Koha/Schema/Result/DefaultBorrowerCircRule.pm +++ b/Koha/Schema/Result/DefaultBorrowerCircRule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::DefaultBorrowerCircRule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::DefaultBorrowerCircRule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::DefaultBorrowerCircRule +=head1 TABLE: C =cut @@ -39,6 +43,17 @@ __PACKAGE__->add_columns( "maxissueqty", { data_type => "integer", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("categorycode"); =head1 RELATIONS @@ -55,12 +70,12 @@ __PACKAGE__->belongs_to( "categorycode", "Koha::Schema::Result::Category", { categorycode => "categorycode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z6tiOK5+uLufdewEsUrAEQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bZVuSuLu0IxPcJMaUUjbSw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DefaultBranchCircRule.pm b/Koha/Schema/Result/DefaultBranchCircRule.pm index 7457fb4c07..55fd2b2796 100644 --- a/Koha/Schema/Result/DefaultBranchCircRule.pm +++ b/Koha/Schema/Result/DefaultBranchCircRule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::DefaultBranchCircRule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::DefaultBranchCircRule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::DefaultBranchCircRule +=head1 TABLE: C =cut @@ -54,6 +58,17 @@ __PACKAGE__->add_columns( "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("branchcode"); =head1 RELATIONS @@ -70,12 +85,12 @@ __PACKAGE__->belongs_to( "branchcode", "Koha::Schema::Result::Branch", { branchcode => "branchcode" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yCrCqkdVhV80/WtxZPK6Kw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Uw1Y82CgbAY8ndLOucN70g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DefaultBranchItemRule.pm b/Koha/Schema/Result/DefaultBranchItemRule.pm index 1df7bf9111..f31aa00e39 100644 --- a/Koha/Schema/Result/DefaultBranchItemRule.pm +++ b/Koha/Schema/Result/DefaultBranchItemRule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::DefaultBranchItemRule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::DefaultBranchItemRule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::DefaultBranchItemRule +=head1 TABLE: C =cut @@ -47,6 +51,17 @@ __PACKAGE__->add_columns( "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("itemtype"); =head1 RELATIONS @@ -63,12 +78,12 @@ __PACKAGE__->belongs_to( "itemtype", "Koha::Schema::Result::Itemtype", { itemtype => "itemtype" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N5e8mgI8+T/E4CchVMYIoQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Mm4EAx13qTr5S02B9dt01g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/DefaultCircRule.pm b/Koha/Schema/Result/DefaultCircRule.pm index f3b09ff9ac..7bd15644eb 100644 --- a/Koha/Schema/Result/DefaultCircRule.pm +++ b/Koha/Schema/Result/DefaultCircRule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::DefaultCircRule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::DefaultCircRule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::DefaultCircRule +=head1 TABLE: C =cut @@ -59,11 +63,22 @@ __PACKAGE__->add_columns( "returnbranch", { data_type => "varchar", is_nullable => 1, size => 15 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("singleton"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:PSMIlns1Q2e5Kun60SzKYg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:I4hY1uJ+wDoWPIiZj5amVg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deletedbiblio.pm b/Koha/Schema/Result/Deletedbiblio.pm index d41dfaff24..61adcd1dd2 100644 --- a/Koha/Schema/Result/Deletedbiblio.pm +++ b/Koha/Schema/Result/Deletedbiblio.pm @@ -1,17 +1,21 @@ +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 NAME - -Koha::Schema::Result::Deletedbiblio +=head1 TABLE: C =cut @@ -70,12 +74,14 @@ __PACKAGE__->table("deletedbiblio"); =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 @@ -106,20 +112,32 @@ __PACKAGE__->add_columns( { data_type => "smallint", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "datecreated", - { data_type => "date", is_nullable => 0 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 0 }, "abstract", { data_type => "mediumtext", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("biblionumber"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:NeMRnyT+TXPaypKdluD7BQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:T381rHb43DPfZ7+d/WuSxQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deletedbiblioitem.pm b/Koha/Schema/Result/Deletedbiblioitem.pm index 04f5351085..6d520ea8d8 100644 --- a/Koha/Schema/Result/Deletedbiblioitem.pm +++ b/Koha/Schema/Result/Deletedbiblioitem.pm @@ -1,17 +1,21 @@ +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 NAME - -Koha::Schema::Result::Deletedbiblioitem +=head1 TABLE: C =cut @@ -79,6 +83,7 @@ __PACKAGE__->table("deletedbiblioitems"); =head2 volumedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 volumedesc @@ -114,6 +119,7 @@ __PACKAGE__->table("deletedbiblioitems"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -233,7 +239,7 @@ __PACKAGE__->add_columns( "publishercode", { data_type => "varchar", is_nullable => 1, size => 255 }, "volumedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "volumedesc", { data_type => "text", is_nullable => 1 }, "collectiontitle", @@ -248,9 +254,10 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "illus", { data_type => "varchar", is_nullable => 1, size => 255 }, @@ -285,11 +292,22 @@ __PACKAGE__->add_columns( "marcxml", { data_type => "longtext", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("biblioitemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+7zlVHfXJbuk7GfMYsooXw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Cf/DeVzIpMybe0uNA4bNTQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm index 8a38a5da34..9ede8ac0e2 100644 --- a/Koha/Schema/Result/Deletedborrower.pm +++ b/Koha/Schema/Result/Deletedborrower.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Deletedborrower; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Deletedborrower + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Deletedborrower +=head1 TABLE: C =cut @@ -187,6 +191,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 dateofbirth data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 branchcode @@ -206,11 +211,13 @@ __PACKAGE__->table("deletedborrowers"); =head2 dateenrolled data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 dateexpiry data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 gonenoaddress @@ -226,6 +233,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 debarred data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 debarredcomment @@ -453,21 +461,21 @@ __PACKAGE__->add_columns( "b_phone", { data_type => "mediumtext", is_nullable => 1 }, "dateofbirth", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "branchcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "categorycode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "dateenrolled", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "dateexpiry", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "gonenoaddress", { data_type => "tinyint", is_nullable => 1 }, "lost", { data_type => "tinyint", is_nullable => 1 }, "debarred", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "debarredcomment", { data_type => "varchar", is_nullable => 1, size => 255 }, "contactname", @@ -527,8 +535,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1D2zAd8OsHXZ2s9cEVevug +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yA/UeNpbYIUrX/iWsF0NLw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Deleteditem.pm b/Koha/Schema/Result/Deleteditem.pm index 13ffa6654b..be28986e54 100644 --- a/Koha/Schema/Result/Deleteditem.pm +++ b/Koha/Schema/Result/Deleteditem.pm @@ -1,17 +1,21 @@ +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 NAME - -Koha::Schema::Result::Deleteditem +=head1 TABLE: C =cut @@ -46,6 +50,7 @@ __PACKAGE__->table("deleteditems"); =head2 dateaccessioned data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 booksellerid @@ -74,16 +79,19 @@ __PACKAGE__->table("deleteditems"); =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 @@ -109,7 +117,7 @@ __PACKAGE__->table("deleteditems"); default_value: 0 is_nullable: 0 -=head2 wthdrawn +=head2 withdrawn data_type: 'tinyint' default_value: 0 @@ -166,6 +174,7 @@ __PACKAGE__->table("deleteditems"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -184,6 +193,7 @@ __PACKAGE__->table("deleteditems"); =head2 onloan data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 cn_source @@ -261,7 +271,7 @@ __PACKAGE__->add_columns( "barcode", { data_type => "varchar", is_nullable => 1, size => 20 }, "dateaccessioned", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "booksellerid", { data_type => "mediumtext", is_nullable => 1 }, "homebranch", @@ -271,11 +281,11 @@ __PACKAGE__->add_columns( "replacementprice", { data_type => "decimal", is_nullable => 1, size => [8, 2] }, "replacementpricedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "datelastborrowed", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "datelastseen", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "stack", { data_type => "tinyint", is_nullable => 1 }, "notforloan", @@ -284,7 +294,7 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "itemlost", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, - "wthdrawn", + "withdrawn", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "itemcallnumber", { data_type => "varchar", is_nullable => 1, size => 255 }, @@ -306,16 +316,17 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + 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", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "cn_source", { data_type => "varchar", is_nullable => 1, size => 10 }, "cn_sort", @@ -339,11 +350,22 @@ __PACKAGE__->add_columns( "marc", { data_type => "longblob", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("itemnumber"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dQeILHSwObg9anjIGL+5vA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dfUPy7ijJ/uh9+0AqKjSBw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Ethnicity.pm b/Koha/Schema/Result/Ethnicity.pm index a925c4c610..039fcb7a5b 100644 --- a/Koha/Schema/Result/Ethnicity.pm +++ b/Koha/Schema/Result/Ethnicity.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Ethnicity; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Ethnicity + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Ethnicity +=head1 TABLE: C =cut @@ -40,11 +44,22 @@ __PACKAGE__->add_columns( "name", { data_type => "varchar", is_nullable => 1, size => 255 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("code"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:H+zE5eEx/ClCKhvOgCCQzg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HPwxTCHuS0ZYGSznK4laEA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ExportFormat.pm b/Koha/Schema/Result/ExportFormat.pm index ed21a6450b..0882bcf872 100644 --- a/Koha/Schema/Result/ExportFormat.pm +++ b/Koha/Schema/Result/ExportFormat.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ExportFormat; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ExportFormat - Used for CSV export + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ExportFormat +=head1 TABLE: C =cut @@ -36,7 +40,7 @@ __PACKAGE__->table("export_format"); data_type: 'mediumtext' is_nullable: 0 -=head2 marcfields +=head2 content data_type: 'mediumtext' is_nullable: 0 @@ -65,6 +69,13 @@ __PACKAGE__->table("export_format"); is_nullable: 0 size: 255 +=head2 type + + data_type: 'varchar' + default_value: 'marc' + is_nullable: 1 + size: 255 + =cut __PACKAGE__->add_columns( @@ -74,7 +85,7 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 0, size => 255 }, "description", { data_type => "mediumtext", is_nullable => 0 }, - "marcfields", + "content", { data_type => "mediumtext", is_nullable => 0 }, "csv_separator", { data_type => "varchar", is_nullable => 0, size => 2 }, @@ -84,12 +95,30 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 0, size => 2 }, "encoding", { data_type => "varchar", is_nullable => 0, size => 255 }, + "type", + { + data_type => "varchar", + default_value => "marc", + is_nullable => 1, + size => 255, + }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("export_format_id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bUCNW2Ek6JxBjlVcO1TQ1g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AJbxXXJBftCbSKm2E/ZTjA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Fieldmapping.pm b/Koha/Schema/Result/Fieldmapping.pm index 684f755a7a..d0b8730b3b 100644 --- a/Koha/Schema/Result/Fieldmapping.pm +++ b/Koha/Schema/Result/Fieldmapping.pm @@ -1,17 +1,21 @@ +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 NAME - -Koha::Schema::Result::Fieldmapping +=head1 TABLE: C =cut @@ -64,11 +68,22 @@ __PACKAGE__->add_columns( "subfieldcode", { data_type => "char", is_nullable => 0, size => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gvtMvCtkyoKYhiEqLmhFEg +# 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 diff --git a/Koha/Schema/Result/HoldFillTarget.pm b/Koha/Schema/Result/HoldFillTarget.pm index 6958cb67af..b6735b6868 100644 --- a/Koha/Schema/Result/HoldFillTarget.pm +++ b/Koha/Schema/Result/HoldFillTarget.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::HoldFillTarget; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::HoldFillTarget + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::HoldFillTarget +=head1 TABLE: C =cut @@ -64,24 +68,20 @@ __PACKAGE__->add_columns( "item_level_request", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); -__PACKAGE__->set_primary_key("itemnumber"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 borrowernumber +=over 4 -Type: belongs_to +=item * L -Related object: L +=back =cut -__PACKAGE__->belongs_to( - "borrowernumber", - "Koha::Schema::Result::Borrower", - { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("itemnumber"); + +=head1 RELATIONS =head2 biblionumber @@ -95,7 +95,22 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 borrowernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 itemnumber @@ -110,7 +125,7 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 source_branchcode @@ -125,12 +140,17 @@ __PACKAGE__->belongs_to( "source_branchcode", "Koha::Schema::Result::Branch", { branchcode => "source_branchcode" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/h3AEVRMJgs51+fyRzpLaQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uSU9PBMr4e6XKuDgBV583A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportAuth.pm b/Koha/Schema/Result/ImportAuth.pm index e8b6a847bc..a8fc448da1 100644 --- a/Koha/Schema/Result/ImportAuth.pm +++ b/Koha/Schema/Result/ImportAuth.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ImportAuth; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ImportAuth + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ImportAuth +=head1 TABLE: C =cut @@ -77,12 +81,12 @@ __PACKAGE__->belongs_to( "import_record", "Koha::Schema::Result::ImportRecord", { import_record_id => "import_record_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KS/c5gOeZK0p8UY5mXRqlQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bm1ctlmYDh4qWUU95SLqBw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportBatch.pm b/Koha/Schema/Result/ImportBatch.pm index 14ee24205d..7075e4b7e4 100644 --- a/Koha/Schema/Result/ImportBatch.pm +++ b/Koha/Schema/Result/ImportBatch.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ImportBatch; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ImportBatch + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ImportBatch +=head1 TABLE: C =cut @@ -56,6 +60,7 @@ __PACKAGE__->table("import_batches"); =head2 upload_timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -129,9 +134,10 @@ __PACKAGE__->add_columns( { data_type => "integer", default_value => 0, is_nullable => 0 }, "upload_timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "overlay_action", { @@ -197,6 +203,17 @@ __PACKAGE__->add_columns( "comments", { data_type => "mediumtext", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("import_batch_id"); =head1 RELATIONS @@ -217,8 +234,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LUl8GuPahmUwYeaGAKBJxw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BJP/3AecpTwJUqkidgha7w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportBiblio.pm b/Koha/Schema/Result/ImportBiblio.pm index a8fc48ff1c..1b6c50da1d 100644 --- a/Koha/Schema/Result/ImportBiblio.pm +++ b/Koha/Schema/Result/ImportBiblio.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ImportBiblio; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ImportBiblio + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ImportBiblio +=head1 TABLE: C =cut @@ -109,12 +113,12 @@ __PACKAGE__->belongs_to( "import_record", "Koha::Schema::Result::ImportRecord", { import_record_id => "import_record_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HJRDv5y++ivu2IsDFMbGMw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6dQmL78YztbxS9qXHciPTQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportItem.pm b/Koha/Schema/Result/ImportItem.pm index 08ca98099e..2949e366f8 100644 --- a/Koha/Schema/Result/ImportItem.pm +++ b/Koha/Schema/Result/ImportItem.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ImportItem; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ImportItem + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ImportItem +=head1 TABLE: C =cut @@ -82,6 +86,17 @@ __PACKAGE__->add_columns( "import_error", { data_type => "mediumtext", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("import_items_id"); =head1 RELATIONS @@ -98,12 +113,12 @@ __PACKAGE__->belongs_to( "import_record", "Koha::Schema::Result::ImportRecord", { import_record_id => "import_record_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2PCGat+VP/DjjEe+G0gb3Q +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xJd76DD3iljc4uFm7iZeLQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportRecord.pm b/Koha/Schema/Result/ImportRecord.pm index 6922ad72b4..c010138ab4 100644 --- a/Koha/Schema/Result/ImportRecord.pm +++ b/Koha/Schema/Result/ImportRecord.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ImportRecord; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ImportRecord + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ImportRecord +=head1 TABLE: C =cut @@ -46,12 +50,14 @@ __PACKAGE__->table("import_records"); =head2 upload_timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 =head2 import_date data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 marc @@ -121,12 +127,13 @@ __PACKAGE__->add_columns( { data_type => "integer", default_value => 0, is_nullable => 0 }, "upload_timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "import_date", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "marc", { data_type => "longblob", is_nullable => 0 }, "marcxml", @@ -172,6 +179,17 @@ __PACKAGE__->add_columns( "z3950random", { data_type => "varchar", is_nullable => 1, size => 40 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("import_record_id"); =head1 RELATIONS @@ -191,6 +209,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 import_batch + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "import_batch", + "Koha::Schema::Result::ImportBatch", + { import_batch_id => "import_batch_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + =head2 import_biblios Type: has_many @@ -236,24 +269,9 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 import_batch - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "import_batch", - "Koha::Schema::Result::ImportBatch", - { import_batch_id => "import_batch_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); - -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4BPw0d87+uhdeHd0DnL6Ng +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:e71umJ0QmfPBvlxmzbClng # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ImportRecordMatches.pm b/Koha/Schema/Result/ImportRecordMatches.pm index 5f34d30341..934e3816e7 100644 --- a/Koha/Schema/Result/ImportRecordMatches.pm +++ b/Koha/Schema/Result/ImportRecordMatches.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ImportRecordMatches; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ImportRecordMatches + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ImportRecordMatches +=head1 TABLE: C =cut @@ -61,12 +65,12 @@ __PACKAGE__->belongs_to( "import_record", "Koha::Schema::Result::ImportRecord", { import_record_id => "import_record_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XNn+Yyr6xKz3R4ewz9PSpQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:VLaEo7f96O80PqFr/baR9A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Issue.pm b/Koha/Schema/Result/Issue.pm index d10a338694..3bf45459d6 100644 --- a/Koha/Schema/Result/Issue.pm +++ b/Koha/Schema/Result/Issue.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Issue; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Issue + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Issue +=head1 TABLE: C =cut @@ -34,6 +38,7 @@ __PACKAGE__->table("issues"); =head2 date_due data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 branchcode @@ -51,11 +56,13 @@ __PACKAGE__->table("issues"); =head2 returndate data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 lastreneweddate data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 return @@ -72,12 +79,14 @@ __PACKAGE__->table("issues"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 =head2 issuedate data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -88,27 +97,44 @@ __PACKAGE__->add_columns( "itemnumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "date_due", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "branchcode", { data_type => "varchar", is_nullable => 1, size => 10 }, "issuingbranch", { data_type => "varchar", is_nullable => 1, size => 18 }, "returndate", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "lastreneweddate", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "return", { data_type => "varchar", is_nullable => 1, size => 4 }, "renewals", { data_type => "tinyint", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "issuedate", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); =head1 RELATIONS @@ -125,7 +151,12 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 itemnumber @@ -140,12 +171,17 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uZUDWDGWOkC3oCOyMaG1sg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZEh31EKBmURMKxDxI+H3EA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Issuingrule.pm b/Koha/Schema/Result/Issuingrule.pm index 57323e5b83..aaaabb4fa8 100644 --- a/Koha/Schema/Result/Issuingrule.pm +++ b/Koha/Schema/Result/Issuingrule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Issuingrule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Issuingrule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Issuingrule +=head1 TABLE: C =cut @@ -102,6 +106,7 @@ __PACKAGE__->table("issuingrules"); =head2 hardduedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 hardduedatecompare @@ -127,11 +132,6 @@ __PACKAGE__->table("issuingrules"); default_value: 0 is_nullable: 0 -=head2 holdspickupdelay - - data_type: 'integer' - is_nullable: 1 - =head2 branchcode data_type: 'varchar' @@ -143,6 +143,7 @@ __PACKAGE__->table("issuingrules"); data_type: 'decimal' is_nullable: 1 + size: [28,6] =cut @@ -181,7 +182,7 @@ __PACKAGE__->add_columns( size => 10, }, "hardduedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "hardduedatecompare", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "renewalsallowed", @@ -190,18 +191,31 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 1 }, "reservesallowed", { data_type => "smallint", default_value => 0, is_nullable => 0 }, - "holdspickupdelay", - { data_type => "integer", is_nullable => 1 }, "branchcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "overduefinescap", - { data_type => "decimal", is_nullable => 1 }, + { data_type => "decimal", is_nullable => 1, size => [28, 6] }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("branchcode", "categorycode", "itemtype"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:odTb6vtz4DignNIlYwkNEg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aq0+Nbs8f4j1SeQwc+kKRg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Item.pm b/Koha/Schema/Result/Item.pm index 69edbe6b31..b65e7d5021 100644 --- a/Koha/Schema/Result/Item.pm +++ b/Koha/Schema/Result/Item.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Item; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Item + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Item +=head1 TABLE: C =cut @@ -47,6 +51,7 @@ __PACKAGE__->table("items"); =head2 dateaccessioned data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 booksellerid @@ -76,16 +81,19 @@ __PACKAGE__->table("items"); =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 @@ -111,7 +119,7 @@ __PACKAGE__->table("items"); default_value: 0 is_nullable: 0 -=head2 wthdrawn +=head2 withdrawn data_type: 'tinyint' default_value: 0 @@ -169,6 +177,7 @@ __PACKAGE__->table("items"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -187,6 +196,7 @@ __PACKAGE__->table("items"); =head2 onloan data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 cn_source @@ -263,7 +273,7 @@ __PACKAGE__->add_columns( "barcode", { data_type => "varchar", is_nullable => 1, size => 20 }, "dateaccessioned", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "booksellerid", { data_type => "mediumtext", is_nullable => 1 }, "homebranch", @@ -273,11 +283,11 @@ __PACKAGE__->add_columns( "replacementprice", { data_type => "decimal", is_nullable => 1, size => [8, 2] }, "replacementpricedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "datelastborrowed", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "datelastseen", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "stack", { data_type => "tinyint", is_nullable => 1 }, "notforloan", @@ -286,7 +296,7 @@ __PACKAGE__->add_columns( { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "itemlost", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, - "wthdrawn", + "withdrawn", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "itemcallnumber", { data_type => "varchar", is_nullable => 1, size => 255 }, @@ -308,16 +318,17 @@ __PACKAGE__->add_columns( { data_type => "mediumtext", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + 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", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "cn_source", { data_type => "varchar", is_nullable => 1, size => 10 }, "cn_sort", @@ -339,7 +350,31 @@ __PACKAGE__->add_columns( "stocknumber", { data_type => "varchar", is_nullable => 1, size => 32 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("itemnumber"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("itembarcodeidx", ["barcode"]); =head1 RELATIONS @@ -359,6 +394,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 biblioitemnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "biblioitemnumber", + "Koha::Schema::Result::Biblioitem", + { biblioitemnumber => "biblioitemnumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + =head2 branchtransfers Type: has_many @@ -419,34 +469,24 @@ __PACKAGE__->might_have( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 issues - -Type: has_many - -Related object: L - -=cut - -__PACKAGE__->has_many( - "issues", - "Koha::Schema::Result::Issue", - { "foreign.itemnumber" => "self.itemnumber" }, - { cascade_copy => 0, cascade_delete => 0 }, -); - -=head2 biblioitemnumber +=head2 holdingbranch Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "biblioitemnumber", - "Koha::Schema::Result::Biblioitem", - { biblioitemnumber => "biblioitemnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + "holdingbranch", + "Koha::Schema::Result::Branch", + { branchcode => "holdingbranch" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 homebranch @@ -461,22 +501,27 @@ __PACKAGE__->belongs_to( "homebranch", "Koha::Schema::Result::Branch", { branchcode => "homebranch" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -=head2 holdingbranch +=head2 issues -Type: belongs_to +Type: has_many -Related object: L +Related object: L =cut -__PACKAGE__->belongs_to( - "holdingbranch", - "Koha::Schema::Result::Branch", - { branchcode => "holdingbranch" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, +__PACKAGE__->has_many( + "issues", + "Koha::Schema::Result::Issue", + { "foreign.itemnumber" => "self.itemnumber" }, + { cascade_copy => 0, cascade_delete => 0 }, ); =head2 old_issues @@ -540,8 +585,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:f3HngbnArIKegakzHgcFBg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JV1Q/UVlKQ6QgVFMGBIZCw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ItemCirculationAlertPreference.pm b/Koha/Schema/Result/ItemCirculationAlertPreference.pm index 3e9f0d770c..d7fdf31240 100644 --- a/Koha/Schema/Result/ItemCirculationAlertPreference.pm +++ b/Koha/Schema/Result/ItemCirculationAlertPreference.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ItemCirculationAlertPreference; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ItemCirculationAlertPreference + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ItemCirculationAlertPreference +=head1 TABLE: C =cut @@ -63,11 +67,22 @@ __PACKAGE__->add_columns( "notification", { data_type => "varchar", is_nullable => 0, size => 16 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u0W8zw5k/6shlotWbr/5UA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1JO3F3Wc1jjqKR3jzx2eiw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Itemtype.pm b/Koha/Schema/Result/Itemtype.pm index cc145b4ee2..67f64c5e9d 100644 --- a/Koha/Schema/Result/Itemtype.pm +++ b/Koha/Schema/Result/Itemtype.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Itemtype; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Itemtype + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Itemtype +=head1 TABLE: C =cut @@ -53,6 +57,19 @@ __PACKAGE__->table("itemtypes"); data_type: 'text' is_nullable: 1 +=head2 checkinmsg + + data_type: 'varchar' + is_nullable: 1 + size: 255 + +=head2 checkinmsgtype + + data_type: 'char' + default_value: 'message' + is_nullable: 0 + size: 16 + =cut __PACKAGE__->add_columns( @@ -68,7 +85,27 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 200 }, "summary", { data_type => "text", is_nullable => 1 }, + "checkinmsg", + { data_type => "varchar", is_nullable => 1, size => 255 }, + "checkinmsgtype", + { + data_type => "char", + default_value => "message", + is_nullable => 0, + size => 16, + }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("itemtype"); =head1 RELATIONS @@ -104,8 +141,8 @@ __PACKAGE__->might_have( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:U4zQb4FXeB0GE8+Kyp9X1Q +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BmFEWUxi2Ha50Hv6nQhDKQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageDescription.pm b/Koha/Schema/Result/LanguageDescription.pm index ed4a7e02a1..aed9cb67ec 100644 --- a/Koha/Schema/Result/LanguageDescription.pm +++ b/Koha/Schema/Result/LanguageDescription.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::LanguageDescription; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::LanguageDescription + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::LanguageDescription +=head1 TABLE: C =cut @@ -63,11 +67,22 @@ __PACKAGE__->add_columns( "id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WmYReEEJY/1M9lgDnNVZWA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fQEN7ks3f7aLuoDQWqEv+Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageRfc4646ToIso639.pm b/Koha/Schema/Result/LanguageRfc4646ToIso639.pm index 96e7462014..0ec143c61d 100644 --- a/Koha/Schema/Result/LanguageRfc4646ToIso639.pm +++ b/Koha/Schema/Result/LanguageRfc4646ToIso639.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::LanguageRfc4646ToIso639; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::LanguageRfc4646ToIso639 + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::LanguageRfc4646ToIso639 +=head1 TABLE: C =cut @@ -47,11 +51,22 @@ __PACKAGE__->add_columns( "id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vwUWEmP6tprD5pTK2xnqfw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:80baGnx1j4ZZjs0Qn5VMsw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageScriptBidi.pm b/Koha/Schema/Result/LanguageScriptBidi.pm index dbaa01059c..7272374da4 100644 --- a/Koha/Schema/Result/LanguageScriptBidi.pm +++ b/Koha/Schema/Result/LanguageScriptBidi.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::LanguageScriptBidi; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::LanguageScriptBidi + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::LanguageScriptBidi +=head1 TABLE: C =cut @@ -41,8 +45,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AF0TN1yPhye2rmM2hqjBhw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TBR2kCdB/nvEcdDo8I4rQA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageScriptMapping.pm b/Koha/Schema/Result/LanguageScriptMapping.pm index f216056970..a43ecc0d83 100644 --- a/Koha/Schema/Result/LanguageScriptMapping.pm +++ b/Koha/Schema/Result/LanguageScriptMapping.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::LanguageScriptMapping; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::LanguageScriptMapping + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::LanguageScriptMapping +=head1 TABLE: C =cut @@ -41,8 +45,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JZq4ORzniNZ2ureISmxuYg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c9gZ400zs7OkvI1JDCjyCg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/LanguageSubtagRegistry.pm b/Koha/Schema/Result/LanguageSubtagRegistry.pm index 809f3d2416..b93780295c 100644 --- a/Koha/Schema/Result/LanguageSubtagRegistry.pm +++ b/Koha/Schema/Result/LanguageSubtagRegistry.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::LanguageSubtagRegistry; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::LanguageSubtagRegistry + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::LanguageSubtagRegistry +=head1 TABLE: C =cut @@ -40,6 +44,7 @@ __PACKAGE__->table("language_subtag_registry"); =head2 added data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 id @@ -58,15 +63,26 @@ __PACKAGE__->add_columns( "description", { data_type => "varchar", is_nullable => 1, size => 25 }, "added", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "id", { data_type => "integer", is_auto_increment => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3XkyaSdpFe0F5KktVox9nQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Rauj/sMGM6sskKuMC/XRcQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Letter.pm b/Koha/Schema/Result/Letter.pm index 447f84d5a9..95345f74fa 100644 --- a/Koha/Schema/Result/Letter.pm +++ b/Koha/Schema/Result/Letter.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Letter; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Letter + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Letter +=head1 TABLE: C =cut @@ -83,6 +87,21 @@ __PACKAGE__->add_columns( "content", { data_type => "text", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("module", "code", "branchcode"); =head1 RELATIONS @@ -107,8 +126,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:MDVfBFxikRa6QrFHs549ZA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Lc0RfG7k0QwnWCDywFImLg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Linktracker.pm b/Koha/Schema/Result/Linktracker.pm index 2b272f2b50..a1ca30a800 100644 --- a/Koha/Schema/Result/Linktracker.pm +++ b/Koha/Schema/Result/Linktracker.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Linktracker; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Linktracker + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Linktracker +=head1 TABLE: C =cut @@ -48,6 +52,7 @@ __PACKAGE__->table("linktracker"); =head2 timeclicked data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -64,13 +69,28 @@ __PACKAGE__->add_columns( "url", { data_type => "text", is_nullable => 1 }, "timeclicked", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6e2s/DzzRjvXXrusUC4TZg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4Ox7j2FHewUd09dX9i+T6w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MarcMatcher.pm b/Koha/Schema/Result/MarcMatcher.pm index 5e77317502..3f1750a0bc 100644 --- a/Koha/Schema/Result/MarcMatcher.pm +++ b/Koha/Schema/Result/MarcMatcher.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MarcMatcher; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MarcMatcher + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MarcMatcher +=head1 TABLE: C =cut @@ -71,6 +75,17 @@ __PACKAGE__->add_columns( "threshold", { data_type => "integer", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("matcher_id"); =head1 RELATIONS @@ -121,8 +136,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iZyWhA28vO7VHWXtE473TQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:2K4K9wfjRlJJKDztPgHJDA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MarcSubfieldStructure.pm b/Koha/Schema/Result/MarcSubfieldStructure.pm index 773bcb1c01..3054d8d00d 100644 --- a/Koha/Schema/Result/MarcSubfieldStructure.pm +++ b/Koha/Schema/Result/MarcSubfieldStructure.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MarcSubfieldStructure; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MarcSubfieldStructure + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MarcSubfieldStructure +=head1 TABLE: C =cut @@ -168,11 +172,26 @@ __PACKAGE__->add_columns( "maxlength", { data_type => "integer", default_value => 9999, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("frameworkcode", "tagfield", "tagsubfield"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6UMADnf1NRqg+kxGn1LdrQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4JgqkPKFNSQ90hTeeb30ow # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MarcTagStructure.pm b/Koha/Schema/Result/MarcTagStructure.pm index 9cd74af33b..8873ef35ee 100644 --- a/Koha/Schema/Result/MarcTagStructure.pm +++ b/Koha/Schema/Result/MarcTagStructure.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MarcTagStructure; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MarcTagStructure + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MarcTagStructure +=head1 TABLE: C =cut @@ -83,11 +87,24 @@ __PACKAGE__->add_columns( "frameworkcode", { data_type => "varchar", default_value => "", is_nullable => 0, size => 4 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("frameworkcode", "tagfield"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wQUMc8pLSjTOgr7+Z6sscQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TvdQBCX3rEhJxxqGcqrpWw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Matchcheck.pm b/Koha/Schema/Result/Matchcheck.pm index bb5a847c32..39b94f9c8c 100644 --- a/Koha/Schema/Result/Matchcheck.pm +++ b/Koha/Schema/Result/Matchcheck.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Matchcheck; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Matchcheck + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Matchcheck +=head1 TABLE: C =cut @@ -55,6 +59,17 @@ __PACKAGE__->add_columns( "target_matchpoint_id", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("matchcheck_id"); =head1 RELATIONS @@ -71,7 +86,7 @@ __PACKAGE__->belongs_to( "matcher", "Koha::Schema::Result::MarcMatcher", { matcher_id => "matcher_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 source_matchpoint @@ -86,7 +101,7 @@ __PACKAGE__->belongs_to( "source_matchpoint", "Koha::Schema::Result::Matchpoint", { matchpoint_id => "source_matchpoint_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 target_matchpoint @@ -101,12 +116,12 @@ __PACKAGE__->belongs_to( "target_matchpoint", "Koha::Schema::Result::Matchpoint", { matchpoint_id => "target_matchpoint_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R2duGZidKaVVqnfQP5pSvQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3G4E3DxiD6lCTP7a569BQg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MatcherMatchpoint.pm b/Koha/Schema/Result/MatcherMatchpoint.pm index af3a1363e1..42dfdf0567 100644 --- a/Koha/Schema/Result/MatcherMatchpoint.pm +++ b/Koha/Schema/Result/MatcherMatchpoint.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MatcherMatchpoint; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MatcherMatchpoint + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MatcherMatchpoint +=head1 TABLE: C =cut @@ -54,7 +58,7 @@ __PACKAGE__->belongs_to( "matcher", "Koha::Schema::Result::MarcMatcher", { matcher_id => "matcher_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 matchpoint @@ -69,12 +73,12 @@ __PACKAGE__->belongs_to( "matchpoint", "Koha::Schema::Result::Matchpoint", { matchpoint_id => "matchpoint_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GBxofoXbX0KRwU1fa5bQ2g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:W2mZNvJSe3CC0M52hqJsJg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Matchpoint.pm b/Koha/Schema/Result/Matchpoint.pm index 0f1bf697f1..3b85d9c8d2 100644 --- a/Koha/Schema/Result/Matchpoint.pm +++ b/Koha/Schema/Result/Matchpoint.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Matchpoint; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Matchpoint + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Matchpoint +=head1 TABLE: C =cut @@ -56,6 +60,17 @@ __PACKAGE__->add_columns( "score", { data_type => "integer", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("matchpoint_id"); =head1 RELATIONS @@ -90,6 +105,21 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 matcher + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "matcher", + "Koha::Schema::Result::MarcMatcher", + { matcher_id => "matcher_id" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + =head2 matcher_matchpoints Type: has_many @@ -120,24 +150,9 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 matcher - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "matcher", - "Koha::Schema::Result::MarcMatcher", - { matcher_id => "matcher_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); - -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ltzMXDHk2L7ECkLUrGXyzA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:KvZ0QM+OoJ+xaUKdkPGASg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MatchpointComponent.pm b/Koha/Schema/Result/MatchpointComponent.pm index 2609a260ae..e3b2a65a09 100644 --- a/Koha/Schema/Result/MatchpointComponent.pm +++ b/Koha/Schema/Result/MatchpointComponent.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MatchpointComponent; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MatchpointComponent + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MatchpointComponent +=head1 TABLE: C =cut @@ -87,26 +91,20 @@ __PACKAGE__->add_columns( "length", { data_type => "integer", default_value => 0, is_nullable => 0 }, ); -__PACKAGE__->set_primary_key("matchpoint_component_id"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 matchpoint_component_norms +=over 4 -Type: has_many +=item * L -Related object: L +=back =cut -__PACKAGE__->has_many( - "matchpoint_component_norms", - "Koha::Schema::Result::MatchpointComponentNorm", - { - "foreign.matchpoint_component_id" => "self.matchpoint_component_id", - }, - { cascade_copy => 0, cascade_delete => 0 }, -); +__PACKAGE__->set_primary_key("matchpoint_component_id"); + +=head1 RELATIONS =head2 matchpoint @@ -120,12 +118,29 @@ __PACKAGE__->belongs_to( "matchpoint", "Koha::Schema::Result::Matchpoint", { matchpoint_id => "matchpoint_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 matchpoint_component_norms + +Type: has_many + +Related object: L + +=cut + +__PACKAGE__->has_many( + "matchpoint_component_norms", + "Koha::Schema::Result::MatchpointComponentNorm", + { + "foreign.matchpoint_component_id" => "self.matchpoint_component_id", + }, + { cascade_copy => 0, cascade_delete => 0 }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/7C/jFYOMSF/AtJViHH7jQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:R9niKe/wGJXD+ZVkIP5Wpg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MatchpointComponentNorm.pm b/Koha/Schema/Result/MatchpointComponentNorm.pm index dafc46e263..a885a7cdde 100644 --- a/Koha/Schema/Result/MatchpointComponentNorm.pm +++ b/Koha/Schema/Result/MatchpointComponentNorm.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MatchpointComponentNorm; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MatchpointComponentNorm + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MatchpointComponentNorm +=head1 TABLE: C =cut @@ -69,12 +73,12 @@ __PACKAGE__->belongs_to( "matchpoint_component", "Koha::Schema::Result::MatchpointComponent", { matchpoint_component_id => "matchpoint_component_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:bfVMJiFqfjhc8fSKXNEtBA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Aj5cUNNx7G5iq0w0AFVgtA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Message.pm b/Koha/Schema/Result/Message.pm index 218c1e3c85..d596cb477f 100644 --- a/Koha/Schema/Result/Message.pm +++ b/Koha/Schema/Result/Message.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Message; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Message + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Message +=head1 TABLE: C =cut @@ -50,6 +54,7 @@ __PACKAGE__->table("messages"); =head2 message_date data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -68,16 +73,28 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 0 }, "message_date", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("message_id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:fEt+ILa1HzB4aXmXkk8XXg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:iq+Uo9eMnkDgUQsRR6VFUA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MessageAttribute.pm b/Koha/Schema/Result/MessageAttribute.pm index 34a091b19b..8fc01b3f7e 100644 --- a/Koha/Schema/Result/MessageAttribute.pm +++ b/Koha/Schema/Result/MessageAttribute.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MessageAttribute; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MessageAttribute + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MessageAttribute +=head1 TABLE: C =cut @@ -48,7 +52,31 @@ __PACKAGE__->add_columns( "takes_days", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("message_attribute_id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("message_name", ["message_name"]); =head1 RELATIONS @@ -84,8 +112,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nJqtM1tc/ouojD5I8+qg0A +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N033AvWwG2CDBDuTj2unqQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MessageQueue.pm b/Koha/Schema/Result/MessageQueue.pm index 9e4ceda0ee..417cd78b1f 100644 --- a/Koha/Schema/Result/MessageQueue.pm +++ b/Koha/Schema/Result/MessageQueue.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MessageQueue; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MessageQueue + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MessageQueue +=head1 TABLE: C =cut @@ -69,6 +73,7 @@ __PACKAGE__->table("message_queue"); =head2 time_queued data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -113,9 +118,10 @@ __PACKAGE__->add_columns( }, "time_queued", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "to_address", { data_type => "mediumtext", is_nullable => 1 }, @@ -139,7 +145,12 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 message_transport_type @@ -154,12 +165,12 @@ __PACKAGE__->belongs_to( "message_transport_type", "Koha::Schema::Result::MessageTransportType", { message_transport_type => "message_transport_type" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:kcpiO2MjqoETlnMyCBhP6Q +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+gmGYPCtwCYKHAzfd9xByQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MessageTransport.pm b/Koha/Schema/Result/MessageTransport.pm index 0485bf4374..3a2f9a9377 100644 --- a/Koha/Schema/Result/MessageTransport.pm +++ b/Koha/Schema/Result/MessageTransport.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MessageTransport; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MessageTransport + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MessageTransport +=head1 TABLE: C =cut @@ -96,10 +100,44 @@ __PACKAGE__->add_columns( size => 10, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("message_attribute_id", "message_transport_type", "is_digest"); =head1 RELATIONS +=head2 letter + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "letter", + "Koha::Schema::Result::Letter", + { + branchcode => "branchcode", + code => "letter_code", + module => "letter_module", + }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + =head2 message_attribute Type: belongs_to @@ -112,7 +150,7 @@ __PACKAGE__->belongs_to( "message_attribute", "Koha::Schema::Result::MessageAttribute", { message_attribute_id => "message_attribute_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 message_transport_type @@ -127,31 +165,12 @@ __PACKAGE__->belongs_to( "message_transport_type", "Koha::Schema::Result::MessageTransportType", { message_transport_type => "message_transport_type" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); - -=head2 letter - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "letter", - "Koha::Schema::Result::Letter", - { - branchcode => "branchcode", - code => "letter_code", - module => "letter_module", - }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:erQZqSSp25HrYkWlHaaF9g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:P4Bsq0A7/imUhRBRnD5HrQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/MessageTransportType.pm b/Koha/Schema/Result/MessageTransportType.pm index ed93cf422c..8863a2d5a6 100644 --- a/Koha/Schema/Result/MessageTransportType.pm +++ b/Koha/Schema/Result/MessageTransportType.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::MessageTransportType; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::MessageTransportType + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::MessageTransportType +=head1 TABLE: C =cut @@ -31,6 +35,17 @@ __PACKAGE__->add_columns( "message_transport_type", { data_type => "varchar", is_nullable => 0, size => 20 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("message_transport_type"); =head1 RELATIONS @@ -86,9 +101,23 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 borrower_message_preferences + +Type: many_to_many + +Composing rels: L -> borrower_message_preference + +=cut + +__PACKAGE__->many_to_many( + "borrower_message_preferences", + "borrower_message_transport_preferences", + "borrower_message_preference", +); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mEnlVv5CZ+YeZCHiOlk45g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UApxVVoE1dZpL6HP1kytJQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/NeedMergeAuthority.pm b/Koha/Schema/Result/NeedMergeAuthority.pm index 4e7eca6a7c..2b491b7b00 100644 --- a/Koha/Schema/Result/NeedMergeAuthority.pm +++ b/Koha/Schema/Result/NeedMergeAuthority.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::NeedMergeAuthority; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::NeedMergeAuthority + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::NeedMergeAuthority +=head1 TABLE: C =cut @@ -46,11 +50,22 @@ __PACKAGE__->add_columns( "done", { data_type => "tinyint", default_value => 0, is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8PCvOl9x3QoD3aqi9CCBwA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BL9ArSyPrmUG0QrrWgoPSw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Notify.pm b/Koha/Schema/Result/Notify.pm index 82a3f45d1b..9be1b2a283 100644 --- a/Koha/Schema/Result/Notify.pm +++ b/Koha/Schema/Result/Notify.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Notify; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Notify + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Notify +=head1 TABLE: C =cut @@ -40,11 +44,13 @@ __PACKAGE__->table("notifys"); =head2 notify_date data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 notify_send_date data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 notify_level @@ -70,9 +76,9 @@ __PACKAGE__->add_columns( "itemnumber", { data_type => "integer", default_value => 0, is_nullable => 0 }, "notify_date", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "notify_send_date", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "notify_level", { data_type => "integer", default_value => 0, is_nullable => 0 }, "method", @@ -80,8 +86,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ldEIateKiL5a9392TykxWA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sQc1HF4rGwsMBh6uFNKUnQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OaiSet.pm b/Koha/Schema/Result/OaiSet.pm index c98d6d93a0..32897bf891 100644 --- a/Koha/Schema/Result/OaiSet.pm +++ b/Koha/Schema/Result/OaiSet.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::OaiSet; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::OaiSet + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::OaiSet +=head1 TABLE: C =cut @@ -47,7 +51,31 @@ __PACKAGE__->add_columns( "name", { data_type => "varchar", is_nullable => 0, size => 80 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("spec", ["spec"]); =head1 RELATIONS @@ -97,9 +125,19 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); +=head2 biblionumbers + +Type: many_to_many + +Composing rels: L -> biblionumber + +=cut + +__PACKAGE__->many_to_many("biblionumbers", "oai_sets_biblios", "biblionumber"); + -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HbNoD2MpVTh5RyvbUZYizA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3M30E7wFbGbesAfQYyalTw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OaiSetsBiblio.pm b/Koha/Schema/Result/OaiSetsBiblio.pm index 9f6811bfec..60aaeadd60 100644 --- a/Koha/Schema/Result/OaiSetsBiblio.pm +++ b/Koha/Schema/Result/OaiSetsBiblio.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::OaiSetsBiblio; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::OaiSetsBiblio + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::OaiSetsBiblio +=head1 TABLE: C =cut @@ -39,6 +43,19 @@ __PACKAGE__->add_columns( "set_id", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("biblionumber", "set_id"); =head1 RELATIONS @@ -55,7 +72,7 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 set @@ -70,12 +87,12 @@ __PACKAGE__->belongs_to( "set", "Koha::Schema::Result::OaiSet", { id => "set_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UkR8n4x6yZOGCMP10KvnRg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Zl0mhAt8isigZay80Ie6jA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OaiSetsDescription.pm b/Koha/Schema/Result/OaiSetsDescription.pm index 3a8125454a..6134c02cc2 100644 --- a/Koha/Schema/Result/OaiSetsDescription.pm +++ b/Koha/Schema/Result/OaiSetsDescription.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::OaiSetsDescription; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::OaiSetsDescription + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::OaiSetsDescription +=head1 TABLE: C =cut @@ -54,12 +58,12 @@ __PACKAGE__->belongs_to( "set", "Koha::Schema::Result::OaiSet", { id => "set_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:aOzHC9btK44D6oF9qhpidQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:W8gqXVcVgEpJUdsKQsPn5A # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OaiSetsMapping.pm b/Koha/Schema/Result/OaiSetsMapping.pm index 53b3f617ef..e4dd532d33 100644 --- a/Koha/Schema/Result/OaiSetsMapping.pm +++ b/Koha/Schema/Result/OaiSetsMapping.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::OaiSetsMapping; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::OaiSetsMapping + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::OaiSetsMapping +=head1 TABLE: C =cut @@ -37,6 +41,13 @@ __PACKAGE__->table("oai_sets_mappings"); is_nullable: 0 size: 1 +=head2 operator + + data_type: 'varchar' + default_value: 'equal' + is_nullable: 0 + size: 8 + =head2 marcvalue data_type: 'varchar' @@ -52,6 +63,13 @@ __PACKAGE__->add_columns( { data_type => "char", is_nullable => 0, size => 3 }, "marcsubfield", { data_type => "char", is_nullable => 0, size => 1 }, + "operator", + { + data_type => "varchar", + default_value => "equal", + is_nullable => 0, + size => 8, + }, "marcvalue", { data_type => "varchar", is_nullable => 0, size => 80 }, ); @@ -70,12 +88,12 @@ __PACKAGE__->belongs_to( "set", "Koha::Schema::Result::OaiSet", { id => "set_id" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vWEr0nzPAHZAmjsA2NAaQQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A2fchnI85JftSuruZ1CykQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OldIssue.pm b/Koha/Schema/Result/OldIssue.pm index 40c1bbce59..4050f06a08 100644 --- a/Koha/Schema/Result/OldIssue.pm +++ b/Koha/Schema/Result/OldIssue.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::OldIssue; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::OldIssue + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::OldIssue +=head1 TABLE: C =cut @@ -34,6 +38,7 @@ __PACKAGE__->table("old_issues"); =head2 date_due data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 branchcode @@ -51,11 +56,13 @@ __PACKAGE__->table("old_issues"); =head2 returndate data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 lastreneweddate data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 return @@ -72,12 +79,14 @@ __PACKAGE__->table("old_issues"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 =head2 issuedate data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -88,27 +97,44 @@ __PACKAGE__->add_columns( "itemnumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "date_due", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "branchcode", { data_type => "varchar", is_nullable => 1, size => 10 }, "issuingbranch", { data_type => "varchar", is_nullable => 1, size => 18 }, "returndate", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "lastreneweddate", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "return", { data_type => "varchar", is_nullable => 1, size => 4 }, "renewals", { data_type => "tinyint", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "issuedate", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); =head1 RELATIONS @@ -125,7 +151,12 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 itemnumber @@ -140,12 +171,17 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OmCAF2QYzR59eHr1w51seA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uPOxNROoMMRZ0qZsXsxEjA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm index 384dbf3eca..84ba18c78a 100644 --- a/Koha/Schema/Result/OldReserve.pm +++ b/Koha/Schema/Result/OldReserve.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::OldReserve; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::OldReserve + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::OldReserve +=head1 TABLE: C =cut @@ -33,6 +37,7 @@ __PACKAGE__->table("old_reserves"); =head2 reservedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 biblionumber @@ -56,16 +61,19 @@ __PACKAGE__->table("old_reserves"); =head2 notificationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 reminderdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 cancellationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 reservenotes @@ -87,6 +95,7 @@ __PACKAGE__->table("old_reserves"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -99,11 +108,13 @@ __PACKAGE__->table("old_reserves"); =head2 waitingdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 expirationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 lowestpriority @@ -120,11 +131,7 @@ __PACKAGE__->table("old_reserves"); =head2 suspend_until data_type: 'datetime' - is_nullable: 1 - -=head2 maxpickupdate - - data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -135,7 +142,7 @@ __PACKAGE__->add_columns( "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "reservedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "biblionumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "constrainttype", @@ -143,11 +150,11 @@ __PACKAGE__->add_columns( "branchcode", { data_type => "varchar", is_nullable => 1, size => 10 }, "notificationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reminderdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "cancellationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reservenotes", { data_type => "mediumtext", is_nullable => 1 }, "priority", @@ -156,43 +163,42 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "itemnumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "waitingdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "expirationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "lowestpriority", { data_type => "tinyint", is_nullable => 0 }, "suspend", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "suspend_until", - { data_type => "datetime", is_nullable => 1 }, - "maxpickupdate", - { data_type => "date", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); -__PACKAGE__->set_primary_key("reserve_id"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 borrowernumber +=over 4 -Type: belongs_to +=item * L -Related object: L +=back =cut -__PACKAGE__->belongs_to( - "borrowernumber", - "Koha::Schema::Result::Borrower", - { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("reserve_id"); + +=head1 RELATIONS =head2 biblionumber @@ -206,7 +212,32 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +=head2 borrowernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 itemnumber @@ -221,12 +252,17 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ni1RNxdeOoypM+GwYu1vAQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:g/WiYGPOyzJGtMWiAHvIxA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OpacNews.pm b/Koha/Schema/Result/OpacNews.pm index eafc7e1366..a3be8e82db 100644 --- a/Koha/Schema/Result/OpacNews.pm +++ b/Koha/Schema/Result/OpacNews.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::OpacNews; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::OpacNews + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::OpacNews +=head1 TABLE: C =cut @@ -49,12 +53,14 @@ __PACKAGE__->table("opac_news"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 =head2 expirationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 number @@ -80,20 +86,32 @@ __PACKAGE__->add_columns( { data_type => "varchar", default_value => "", is_nullable => 0, size => 25 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "expirationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "number", { data_type => "integer", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("idnew"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8SrbfmWUXmR8I47YLpPUrQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0tkil0XyRwcT+abM2XoADw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Overduerule.pm b/Koha/Schema/Result/Overduerule.pm index be568fd4fd..e985dd8db1 100644 --- a/Koha/Schema/Result/Overduerule.pm +++ b/Koha/Schema/Result/Overduerule.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Overduerule; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Overduerule + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Overduerule +=head1 TABLE: C =cut @@ -112,11 +116,24 @@ __PACKAGE__->add_columns( "debarred3", { data_type => "integer", default_value => 0, is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("branchcode", "categorycode"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+T3rLwxGA8EmTYnW2sbxQA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hP/0cV6iad2dz8kIhCYFjw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Patroncard.pm b/Koha/Schema/Result/Patroncard.pm index 9332cf3458..454e958aaf 100644 --- a/Koha/Schema/Result/Patroncard.pm +++ b/Koha/Schema/Result/Patroncard.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Patroncard; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Patroncard + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Patroncard +=head1 TABLE: C =cut @@ -41,6 +45,7 @@ __PACKAGE__->table("patroncards"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -55,11 +60,23 @@ __PACKAGE__->add_columns( { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("cardid"); =head1 RELATIONS @@ -76,12 +93,12 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:b/bNxn2Ca/bwRUjZjkoYBg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZDpN4iw7+y9YP7Dc+ou8lQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Patronimage.pm b/Koha/Schema/Result/Patronimage.pm index 8b1cb4d187..8feb4a0ef8 100644 --- a/Koha/Schema/Result/Patronimage.pm +++ b/Koha/Schema/Result/Patronimage.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Patronimage; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Patronimage + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Patronimage +=head1 TABLE: C =cut @@ -19,12 +23,11 @@ __PACKAGE__->table("patronimage"); =head1 ACCESSORS -=head2 cardnumber +=head2 borrowernumber - data_type: 'varchar' + data_type: 'integer' is_foreign_key: 1 is_nullable: 0 - size: 16 =head2 mimetype @@ -40,18 +43,29 @@ __PACKAGE__->table("patronimage"); =cut __PACKAGE__->add_columns( - "cardnumber", - { data_type => "varchar", is_foreign_key => 1, is_nullable => 0, size => 16 }, + "borrowernumber", + { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, "mimetype", { data_type => "varchar", is_nullable => 0, size => 15 }, "imagefile", { data_type => "mediumblob", is_nullable => 0 }, ); -__PACKAGE__->set_primary_key("cardnumber"); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + +__PACKAGE__->set_primary_key("borrowernumber"); =head1 RELATIONS -=head2 cardnumber +=head2 borrowernumber Type: belongs_to @@ -60,15 +74,15 @@ Related object: L =cut __PACKAGE__->belongs_to( - "cardnumber", + "borrowernumber", "Koha::Schema::Result::Borrower", - { cardnumber => "cardnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { borrowernumber => "borrowernumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uUZssek71kRNmlil85374w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uuRGyWlemwOH1PCkvhqxdQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/PendingOfflineOperation.pm b/Koha/Schema/Result/PendingOfflineOperation.pm index b5ba9c7945..969d38077c 100644 --- a/Koha/Schema/Result/PendingOfflineOperation.pm +++ b/Koha/Schema/Result/PendingOfflineOperation.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::PendingOfflineOperation; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::PendingOfflineOperation + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::PendingOfflineOperation +=head1 TABLE: C =cut @@ -40,6 +44,7 @@ __PACKAGE__->table("pending_offline_operations"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -78,9 +83,10 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 0, size => 10 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "action", { data_type => "varchar", is_nullable => 0, size => 10 }, @@ -91,11 +97,22 @@ __PACKAGE__->add_columns( "amount", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("operationid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ECj0ps97NmZowYLZv++zbA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hU8G7b8om2DKesFTwuGrJA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Permission.pm b/Koha/Schema/Result/Permission.pm index 6a356e5fc7..e2444ee0ad 100644 --- a/Koha/Schema/Result/Permission.pm +++ b/Koha/Schema/Result/Permission.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Permission; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Permission + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Permission +=head1 TABLE: C =cut @@ -54,6 +58,19 @@ __PACKAGE__->add_columns( "description", { data_type => "varchar", is_nullable => 1, size => 255 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("module_bit", "code"); =head1 RELATIONS @@ -70,7 +87,7 @@ __PACKAGE__->belongs_to( "module_bit", "Koha::Schema::Result::Userflag", { bit => "module_bit" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 user_permissions @@ -92,8 +109,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7SlWDbIpDYaLcMUnNAH0tA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ut3lzlxoPPoIIwmhJViV1Q # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/PluginData.pm b/Koha/Schema/Result/PluginData.pm index 9e5dcabf3d..869e450ee0 100644 --- a/Koha/Schema/Result/PluginData.pm +++ b/Koha/Schema/Result/PluginData.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::PluginData; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::PluginData + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::PluginData +=head1 TABLE: C =cut @@ -46,11 +50,24 @@ __PACKAGE__->add_columns( "plugin_value", { data_type => "text", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("plugin_class", "plugin_key"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XC9EptLCJK8QWBHGy1TnPw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/incxJUcobgYLR1a9g8cOQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Printer.pm b/Koha/Schema/Result/Printer.pm index 6849ab4a3d..7386f2a525 100644 --- a/Koha/Schema/Result/Printer.pm +++ b/Koha/Schema/Result/Printer.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Printer; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Printer + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Printer +=head1 TABLE: C =cut @@ -48,11 +52,22 @@ __PACKAGE__->add_columns( "printtype", { data_type => "varchar", is_nullable => 1, size => 20 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("printername"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:p7tep/srWDawkdyyilJbOw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:OaIxwtdwn0TJLggwOygC2w # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/PrintersProfile.pm b/Koha/Schema/Result/PrintersProfile.pm index 69d8eb06e6..b02f027250 100644 --- a/Koha/Schema/Result/PrintersProfile.pm +++ b/Koha/Schema/Result/PrintersProfile.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::PrintersProfile; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::PrintersProfile + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::PrintersProfile +=head1 TABLE: C =cut @@ -122,15 +126,45 @@ __PACKAGE__->add_columns( size => 15, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("profile_id"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=item * L + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint( "printername", ["printer_name", "template_id", "paper_bin", "creator"], ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1hyMy9lC23Te5l2gW++DVA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GJid4zfVF0MmMnUn3xyVbA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Quote.pm b/Koha/Schema/Result/Quote.pm index 521274a31f..2f34bb2e75 100644 --- a/Koha/Schema/Result/Quote.pm +++ b/Koha/Schema/Result/Quote.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Quote; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Quote + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Quote +=head1 TABLE: C =cut @@ -38,6 +42,7 @@ __PACKAGE__->table("quotes"); =head2 timestamp data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 0 =cut @@ -50,13 +55,28 @@ __PACKAGE__->add_columns( "text", { data_type => "mediumtext", is_nullable => 0 }, "timestamp", - { data_type => "datetime", is_nullable => 0 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 0, + }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:hvVwAMhaq9dIxuEMbWPNZA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WhRbBrQ4jMV+pjgKnOhErg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Rating.pm b/Koha/Schema/Result/Rating.pm index 1782f7ee81..a8fe6e436b 100644 --- a/Koha/Schema/Result/Rating.pm +++ b/Koha/Schema/Result/Rating.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Rating; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Rating + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Rating +=head1 TABLE: C =cut @@ -39,6 +43,7 @@ __PACKAGE__->table("ratings"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -53,29 +58,28 @@ __PACKAGE__->add_columns( { data_type => "tinyint", is_nullable => 0 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); -__PACKAGE__->set_primary_key("borrowernumber", "biblionumber"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 borrowernumber +=over 4 -Type: belongs_to +=item * L -Related object: L +=item * L + +=back =cut -__PACKAGE__->belongs_to( - "borrowernumber", - "Koha::Schema::Result::Borrower", - { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("borrowernumber", "biblionumber"); + +=head1 RELATIONS =head2 biblionumber @@ -89,12 +93,27 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 borrowernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oLsBtL2RwbArN1s9DYlrow +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:YT3jPQbA2TBuOuUXfEt7gQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/RepeatableHoliday.pm b/Koha/Schema/Result/RepeatableHoliday.pm index 304ec0ec3f..44515138d9 100644 --- a/Koha/Schema/Result/RepeatableHoliday.pm +++ b/Koha/Schema/Result/RepeatableHoliday.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::RepeatableHoliday; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::RepeatableHoliday + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::RepeatableHoliday +=head1 TABLE: C =cut @@ -77,11 +81,22 @@ __PACKAGE__->add_columns( "description", { data_type => "text", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9CaAbUmcE7O8TT5NZivX1Q +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:15Ot3jdlgFpmCbVgUDqZRg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ReportsDictionary.pm b/Koha/Schema/Result/ReportsDictionary.pm index b6f64c24ab..de433a5d91 100644 --- a/Koha/Schema/Result/ReportsDictionary.pm +++ b/Koha/Schema/Result/ReportsDictionary.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ReportsDictionary; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ReportsDictionary + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ReportsDictionary +=head1 TABLE: C =cut @@ -39,11 +43,13 @@ __PACKAGE__->table("reports_dictionary"); =head2 date_created data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 date_modified data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 saved_sql @@ -67,19 +73,38 @@ __PACKAGE__->add_columns( "description", { data_type => "text", is_nullable => 1 }, "date_created", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "date_modified", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "saved_sql", { data_type => "text", is_nullable => 1 }, "report_area", { data_type => "varchar", is_nullable => 1, size => 6 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ko3D4HyI5Uspi17YOtowbQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Cnru3/NTfEScxeVggDa5RA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm index b85f8f84b9..527651d506 100644 --- a/Koha/Schema/Result/Reserve.pm +++ b/Koha/Schema/Result/Reserve.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Reserve; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Reserve + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Reserve +=head1 TABLE: C =cut @@ -35,6 +39,7 @@ __PACKAGE__->table("reserves"); =head2 reservedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 biblionumber @@ -60,16 +65,19 @@ __PACKAGE__->table("reserves"); =head2 notificationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 reminderdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 cancellationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 reservenotes @@ -91,6 +99,7 @@ __PACKAGE__->table("reserves"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -103,11 +112,13 @@ __PACKAGE__->table("reserves"); =head2 waitingdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 expirationdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 lowestpriority @@ -124,11 +135,7 @@ __PACKAGE__->table("reserves"); =head2 suspend_until data_type: 'datetime' - is_nullable: 1 - -=head2 maxpickupdate - - data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -144,7 +151,7 @@ __PACKAGE__->add_columns( is_nullable => 0, }, "reservedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "biblionumber", { data_type => "integer", @@ -157,11 +164,11 @@ __PACKAGE__->add_columns( "branchcode", { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 }, "notificationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reminderdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "cancellationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "reservenotes", { data_type => "mediumtext", is_nullable => 1 }, "priority", @@ -170,43 +177,42 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "itemnumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "waitingdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "expirationdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "lowestpriority", { data_type => "tinyint", is_nullable => 0 }, "suspend", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "suspend_until", - { data_type => "datetime", is_nullable => 1 }, - "maxpickupdate", - { data_type => "date", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); -__PACKAGE__->set_primary_key("reserve_id"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 borrowernumber +=over 4 -Type: belongs_to +=item * L -Related object: L +=back =cut -__PACKAGE__->belongs_to( - "borrowernumber", - "Koha::Schema::Result::Borrower", - { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("reserve_id"); + +=head1 RELATIONS =head2 biblionumber @@ -220,22 +226,22 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -=head2 itemnumber +=head2 borrowernumber Type: belongs_to -Related object: L +Related object: L =cut __PACKAGE__->belongs_to( - "itemnumber", - "Koha::Schema::Result::Item", - { itemnumber => "itemnumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 branchcode @@ -250,12 +256,37 @@ __PACKAGE__->belongs_to( "branchcode", "Koha::Schema::Result::Branch", { branchcode => "branchcode" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +=head2 itemnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "itemnumber", + "Koha::Schema::Result::Item", + { itemnumber => "itemnumber" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RqJFYCoDl4dMH1cwZilLKA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ig/fobzvZf1OgAHZFtkyyQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Reserveconstraint.pm b/Koha/Schema/Result/Reserveconstraint.pm index a5da942874..69d7a2b18d 100644 --- a/Koha/Schema/Result/Reserveconstraint.pm +++ b/Koha/Schema/Result/Reserveconstraint.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Reserveconstraint; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Reserveconstraint + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Reserveconstraint +=head1 TABLE: C =cut @@ -28,6 +32,7 @@ __PACKAGE__->table("reserveconstraints"); =head2 reservedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 biblionumber @@ -44,6 +49,7 @@ __PACKAGE__->table("reserveconstraints"); =head2 timestamp data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -53,22 +59,23 @@ __PACKAGE__->add_columns( "borrowernumber", { data_type => "integer", default_value => 0, is_nullable => 0 }, "reservedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "biblionumber", { data_type => "integer", default_value => 0, is_nullable => 0 }, "biblioitemnumber", { data_type => "integer", is_nullable => 1 }, "timestamp", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:yniuV8y2QVTDUjDCz/Y3Sg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qsSPIwQxTBxw3s2a3hD34g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Review.pm b/Koha/Schema/Result/Review.pm index 4eb6301df0..37b822d009 100644 --- a/Koha/Schema/Result/Review.pm +++ b/Koha/Schema/Result/Review.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Review; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Review + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Review +=head1 TABLE: C =cut @@ -50,6 +54,7 @@ __PACKAGE__->table("reviews"); =head2 datereviewed data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -66,26 +71,26 @@ __PACKAGE__->add_columns( "approved", { data_type => "tinyint", is_nullable => 1 }, "datereviewed", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); -__PACKAGE__->set_primary_key("reviewid"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 borrowernumber +=over 4 -Type: belongs_to +=item * L -Related object: L +=back =cut -__PACKAGE__->belongs_to( - "borrowernumber", - "Koha::Schema::Result::Borrower", - { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("reviewid"); + +=head1 RELATIONS =head2 biblionumber @@ -99,12 +104,37 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +=head2 borrowernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Wh7pS4fMj7YtJDl6GJ94lA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:/gg7wEkOzJ7yI3UXoDcQKA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Roadtype.pm b/Koha/Schema/Result/Roadtype.pm index 3fc4da691a..f4b20f8331 100644 --- a/Koha/Schema/Result/Roadtype.pm +++ b/Koha/Schema/Result/Roadtype.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Roadtype; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Roadtype + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Roadtype +=head1 TABLE: C =cut @@ -40,11 +44,22 @@ __PACKAGE__->add_columns( "road_type", { data_type => "varchar", default_value => "", is_nullable => 0, size => 100 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("roadtypeid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wy1V1m2xfTm4hD+FLRHh/g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5kGeIy5frUgC5wj646dC3g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/SavedReport.pm b/Koha/Schema/Result/SavedReport.pm index a2a2329744..a5d8ca4971 100644 --- a/Koha/Schema/Result/SavedReport.pm +++ b/Koha/Schema/Result/SavedReport.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::SavedReport; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::SavedReport + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::SavedReport +=head1 TABLE: C =cut @@ -38,6 +42,7 @@ __PACKAGE__->table("saved_reports"); =head2 date_run data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -50,13 +55,28 @@ __PACKAGE__->add_columns( "report", { data_type => "longtext", is_nullable => 1 }, "date_run", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sChe1C7Uh2kfpYP40UItJQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wvI6/eIxRIm+WWeDVepQaw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/SavedSql.pm b/Koha/Schema/Result/SavedSql.pm index 076a064e6b..d8780349fb 100644 --- a/Koha/Schema/Result/SavedSql.pm +++ b/Koha/Schema/Result/SavedSql.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::SavedSql; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::SavedSql + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::SavedSql +=head1 TABLE: C =cut @@ -33,11 +37,13 @@ __PACKAGE__->table("saved_sql"); =head2 date_created data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 last_modified data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 savedsql @@ -48,6 +54,7 @@ __PACKAGE__->table("saved_sql"); =head2 last_run data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 report_name @@ -105,13 +112,25 @@ __PACKAGE__->add_columns( "borrowernumber", { data_type => "integer", is_nullable => 1 }, "date_created", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "last_modified", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "savedsql", { data_type => "text", is_nullable => 1 }, "last_run", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "report_name", { data_type => "varchar", is_nullable => 1, size => 255 }, "type", @@ -129,11 +148,22 @@ __PACKAGE__->add_columns( "report_subgroup", { data_type => "varchar", is_nullable => 1, size => 80 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1R30mLFqauqtbEo86gnInw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:laD/JwzxzYnUhBABofprEA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/SearchHistory.pm b/Koha/Schema/Result/SearchHistory.pm index f27fc8063c..224d9f0847 100644 --- a/Koha/Schema/Result/SearchHistory.pm +++ b/Koha/Schema/Result/SearchHistory.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::SearchHistory; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::SearchHistory - Opac search history results + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::SearchHistory +=head1 TABLE: C =cut @@ -49,6 +53,7 @@ __PACKAGE__->table("search_history"); =head2 time data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -67,15 +72,16 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 0 }, "time", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:drsMVfTISlgQofUC0W7btg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:HLDQ0HfcjBkl6y1rXoX0qA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Serial.pm b/Koha/Schema/Result/Serial.pm index 7284ed24d7..c3f711e826 100644 --- a/Koha/Schema/Result/Serial.pm +++ b/Koha/Schema/Result/Serial.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Serial; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Serial + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Serial +=head1 TABLE: C =cut @@ -55,6 +59,7 @@ __PACKAGE__->table("serial"); =head2 planneddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 notes @@ -65,11 +70,13 @@ __PACKAGE__->table("serial"); =head2 publisheddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 claimdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 routingnotes @@ -91,16 +98,27 @@ __PACKAGE__->add_columns( "status", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "planneddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "notes", { data_type => "text", is_nullable => 1 }, "publisheddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "claimdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "routingnotes", { data_type => "text", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("serialid"); =head1 RELATIONS @@ -121,8 +139,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6kL+JePSa/pT8Fvyrp2xow +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xloe1BJrVD7sU07AnA4P2g # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Serialitem.pm b/Koha/Schema/Result/Serialitem.pm index fc23ea5115..6f805d39c7 100644 --- a/Koha/Schema/Result/Serialitem.pm +++ b/Koha/Schema/Result/Serialitem.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Serialitem; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Serialitem + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Serialitem +=head1 TABLE: C =cut @@ -39,24 +43,22 @@ __PACKAGE__->add_columns( "serialid", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); -__PACKAGE__->add_unique_constraint("serialitemsidx", ["itemnumber"]); -=head1 RELATIONS +=head1 UNIQUE CONSTRAINTS -=head2 serialid +=head2 C -Type: belongs_to +=over 4 -Related object: L +=item * L + +=back =cut -__PACKAGE__->belongs_to( - "serialid", - "Koha::Schema::Result::Serial", - { serialid => "serialid" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->add_unique_constraint("serialitemsidx", ["itemnumber"]); + +=head1 RELATIONS =head2 itemnumber @@ -70,12 +72,27 @@ __PACKAGE__->belongs_to( "itemnumber", "Koha::Schema::Result::Item", { itemnumber => "itemnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 serialid + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "serialid", + "Koha::Schema::Result::Serial", + { serialid => "serialid" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A1aGwJJeHrbyhAAtZkFl7g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JZcKy2QIB2c39vgpntWahQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ServicesThrottle.pm b/Koha/Schema/Result/ServicesThrottle.pm index 38d02d87f3..d9e34e4f2b 100644 --- a/Koha/Schema/Result/ServicesThrottle.pm +++ b/Koha/Schema/Result/ServicesThrottle.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::ServicesThrottle; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::ServicesThrottle + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::ServicesThrottle +=head1 TABLE: C =cut @@ -40,11 +44,22 @@ __PACKAGE__->add_columns( "service_count", { data_type => "varchar", is_nullable => 1, size => 45 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("service_type"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7zRTP55443DiLZKCWNjYug +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:XxtEV+cJ5qa/3oCHd2GrSw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Session.pm b/Koha/Schema/Result/Session.pm index 06aecaad35..bbbe5a6f73 100644 --- a/Koha/Schema/Result/Session.pm +++ b/Koha/Schema/Result/Session.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Session; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Session + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Session +=head1 TABLE: C =cut @@ -38,11 +42,22 @@ __PACKAGE__->add_columns( "a_session", { data_type => "text", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WGXVdUE5P5R+omVu4a+t/g +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:N/DKx6NVPCcbDVK3SSMfGQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/SocialData.pm b/Koha/Schema/Result/SocialData.pm index ad402f3b14..b21e5088e4 100644 --- a/Koha/Schema/Result/SocialData.pm +++ b/Koha/Schema/Result/SocialData.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::SocialData; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::SocialData + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::SocialData +=head1 TABLE: C =cut @@ -75,11 +79,22 @@ __PACKAGE__->add_columns( "num_scores", { data_type => "integer", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("isbn"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:jj5Z4o+iItaaMj9+9ZptTg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Medc/ZzPVp5Eq+adFoqQoA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/SpecialHoliday.pm b/Koha/Schema/Result/SpecialHoliday.pm index 8be58c334f..45f884f87a 100644 --- a/Koha/Schema/Result/SpecialHoliday.pm +++ b/Koha/Schema/Result/SpecialHoliday.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::SpecialHoliday; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::SpecialHoliday + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::SpecialHoliday +=head1 TABLE: C =cut @@ -88,11 +92,22 @@ __PACKAGE__->add_columns( "description", { data_type => "text", is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IhSBoiyihNmEgIVcGbwZRg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:mRo3D1nPRJsMY6hPxp/Ojg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Statistic.pm b/Koha/Schema/Result/Statistic.pm index d2ffd16dda..d6fd976f65 100644 --- a/Koha/Schema/Result/Statistic.pm +++ b/Koha/Schema/Result/Statistic.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Statistic; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Statistic + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Statistic +=head1 TABLE: C =cut @@ -22,6 +26,7 @@ __PACKAGE__->table("statistics"); =head2 datetime data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 branch @@ -90,7 +95,11 @@ __PACKAGE__->table("statistics"); __PACKAGE__->add_columns( "datetime", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "branch", { data_type => "varchar", is_nullable => 1, size => 10 }, "proccode", @@ -116,8 +125,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JYb2c/mWBks4WwV/WDm5RA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:THELVmdFFi1RCI4DfqwGIw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Stopword.pm b/Koha/Schema/Result/Stopword.pm index 25f51d0672..2fd88b607f 100644 --- a/Koha/Schema/Result/Stopword.pm +++ b/Koha/Schema/Result/Stopword.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Stopword; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Stopword + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Stopword +=head1 TABLE: C =cut @@ -33,8 +37,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0iOCRqsG2oTw6Djq2O/6+w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:8cIdWFpf7DlA61On1F7cVg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Subscription.pm b/Koha/Schema/Result/Subscription.pm index 752f8ba0d0..77fde73349 100644 --- a/Koha/Schema/Result/Subscription.pm +++ b/Koha/Schema/Result/Subscription.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Subscription; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Subscription + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Subscription +=head1 TABLE: C =cut @@ -41,6 +45,7 @@ __PACKAGE__->table("subscription"); =head2 startdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 aqbooksellerid @@ -222,6 +227,7 @@ __PACKAGE__->table("subscription"); =head2 firstacquidate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 manualhistory @@ -315,6 +321,7 @@ __PACKAGE__->table("subscription"); =head2 enddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 closed @@ -326,6 +333,7 @@ __PACKAGE__->table("subscription"); =head2 reneweddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -338,7 +346,7 @@ __PACKAGE__->add_columns( "librarian", { data_type => "varchar", default_value => "", is_nullable => 1, size => 100 }, "startdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "aqbooksellerid", { data_type => "integer", default_value => 0, is_nullable => 1 }, "cost", @@ -400,7 +408,7 @@ __PACKAGE__->add_columns( "issuesatonce", { data_type => "tinyint", default_value => 1, is_nullable => 0 }, "firstacquidate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "manualhistory", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "irregularity", @@ -432,12 +440,23 @@ __PACKAGE__->add_columns( "graceperiod", { data_type => "integer", default_value => 0, is_nullable => 0 }, "enddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "closed", { data_type => "integer", default_value => 0, is_nullable => 0 }, "reneweddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("subscriptionid"); =head1 RELATIONS @@ -473,8 +492,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dNaDbtGiAeSsPKEu2vd9sw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pzAIpQKBqHodOb1Q4/xIfg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Subscriptionhistory.pm b/Koha/Schema/Result/Subscriptionhistory.pm index 471dc529cb..b15044a0df 100644 --- a/Koha/Schema/Result/Subscriptionhistory.pm +++ b/Koha/Schema/Result/Subscriptionhistory.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Subscriptionhistory; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Subscriptionhistory + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Subscriptionhistory +=head1 TABLE: C =cut @@ -34,11 +38,13 @@ __PACKAGE__->table("subscriptionhistory"); =head2 histstartdate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 histenddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 missinglist @@ -73,9 +79,9 @@ __PACKAGE__->add_columns( "subscriptionid", { data_type => "integer", default_value => 0, is_nullable => 0 }, "histstartdate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "histenddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "missinglist", { data_type => "longtext", is_nullable => 0 }, "recievedlist", @@ -85,11 +91,22 @@ __PACKAGE__->add_columns( "librariannote", { data_type => "varchar", default_value => "", is_nullable => 0, size => 150 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("subscriptionid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:sAkoymtV5cqWuY1fJi/UXg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:+cXluRE1oKiCGOgwq1bhJw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Subscriptionroutinglist.pm b/Koha/Schema/Result/Subscriptionroutinglist.pm index 64a9ad7e05..7741142229 100644 --- a/Koha/Schema/Result/Subscriptionroutinglist.pm +++ b/Koha/Schema/Result/Subscriptionroutinglist.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Subscriptionroutinglist; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Subscriptionroutinglist + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Subscriptionroutinglist +=head1 TABLE: C =cut @@ -54,7 +58,33 @@ __PACKAGE__->add_columns( "subscriptionid", { data_type => "integer", is_foreign_key => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("routingid"); + +=head1 UNIQUE CONSTRAINTS + +=head2 C + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->add_unique_constraint("subscriptionid", ["subscriptionid", "borrowernumber"]); =head1 RELATIONS @@ -71,7 +101,7 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 subscriptionid @@ -86,12 +116,12 @@ __PACKAGE__->belongs_to( "subscriptionid", "Koha::Schema::Result::Subscription", { subscriptionid => "subscriptionid" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qzF+UEtZnlyDm5KBWgAODw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:AK595c56vgTa7ZjwZjberw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Suggestion.pm b/Koha/Schema/Result/Suggestion.pm index 638bf94136..5e394fc2ab 100644 --- a/Koha/Schema/Result/Suggestion.pm +++ b/Koha/Schema/Result/Suggestion.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Suggestion; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Suggestion + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Suggestion +=head1 TABLE: C =cut @@ -34,6 +38,7 @@ __PACKAGE__->table("suggestions"); =head2 suggesteddate data_type: 'date' + datetime_undef_if_invalid: 1 default_value: '0000-00-00' is_nullable: 0 @@ -45,6 +50,7 @@ __PACKAGE__->table("suggestions"); =head2 manageddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 acceptedby @@ -55,6 +61,7 @@ __PACKAGE__->table("suggestions"); =head2 accepteddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 rejectedby @@ -65,6 +72,7 @@ __PACKAGE__->table("suggestions"); =head2 rejecteddate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 status @@ -105,6 +113,7 @@ __PACKAGE__->table("suggestions"); =head2 date data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -206,19 +215,24 @@ __PACKAGE__->add_columns( "suggestedby", { data_type => "integer", default_value => 0, is_nullable => 0 }, "suggesteddate", - { data_type => "date", default_value => "0000-00-00", is_nullable => 0 }, + { + data_type => "date", + datetime_undef_if_invalid => 1, + default_value => "0000-00-00", + is_nullable => 0, + }, "managedby", { data_type => "integer", is_nullable => 1 }, "manageddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "acceptedby", { data_type => "integer", is_nullable => 1 }, "accepteddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "rejectedby", { data_type => "integer", is_nullable => 1 }, "rejecteddate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "status", { data_type => "varchar", default_value => "", is_nullable => 0, size => 10 }, "note", @@ -233,9 +247,10 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 255 }, "date", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "volumedesc", { data_type => "varchar", is_nullable => 1, size => 255 }, @@ -270,11 +285,22 @@ __PACKAGE__->add_columns( "total", { data_type => "decimal", is_nullable => 1, size => [28, 6] }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("suggestionid"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:FCZjU1DjqLCAcw+dSjpP/w +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:CQRbWbu5MBouyD67ArSRNw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Systempreference.pm b/Koha/Schema/Result/Systempreference.pm index 27f115ac57..ef05bd8031 100644 --- a/Koha/Schema/Result/Systempreference.pm +++ b/Koha/Schema/Result/Systempreference.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Systempreference; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Systempreference + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Systempreference +=head1 TABLE: C =cut @@ -61,11 +65,22 @@ __PACKAGE__->add_columns( "type", { data_type => "varchar", is_nullable => 1, size => 20 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("variable"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:qx8G91nKoJnDCDAMLg0ZUg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WalVf/kVVNRcfYely910iQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Tag.pm b/Koha/Schema/Result/Tag.pm index 37d6aafdb7..321d2e9b27 100644 --- a/Koha/Schema/Result/Tag.pm +++ b/Koha/Schema/Result/Tag.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Tag; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Tag + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Tag +=head1 TABLE: C =cut @@ -40,11 +44,22 @@ __PACKAGE__->add_columns( "weight", { data_type => "bigint", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("entry"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:c4CkWGECpxog9RqQrxw1Gg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:oXXMdTe9zYBblKs7SE8uPg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TagAll.pm b/Koha/Schema/Result/TagAll.pm index efeb2f3963..ca1a47039e 100644 --- a/Koha/Schema/Result/TagAll.pm +++ b/Koha/Schema/Result/TagAll.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::TagAll; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::TagAll + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::TagAll +=head1 TABLE: C =cut @@ -51,6 +55,7 @@ __PACKAGE__->table("tags_all"); =head2 date_created data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 0 =cut @@ -67,26 +72,26 @@ __PACKAGE__->add_columns( "language", { data_type => "integer", is_nullable => 1 }, "date_created", - { data_type => "datetime", is_nullable => 0 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 0, + }, ); -__PACKAGE__->set_primary_key("tag_id"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 borrowernumber +=over 4 -Type: belongs_to +=item * L -Related object: L +=back =cut -__PACKAGE__->belongs_to( - "borrowernumber", - "Koha::Schema::Result::Borrower", - { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("tag_id"); + +=head1 RELATIONS =head2 biblionumber @@ -100,12 +105,27 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 borrowernumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "borrowernumber", + "Koha::Schema::Result::Borrower", + { borrowernumber => "borrowernumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SunUKfsdQ6hNupUkD2ygzw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xhJn9d2lS8crFWog28ENnw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TagsApproval.pm b/Koha/Schema/Result/TagsApproval.pm index 28d6b2e936..50abeb2091 100644 --- a/Koha/Schema/Result/TagsApproval.pm +++ b/Koha/Schema/Result/TagsApproval.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::TagsApproval; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::TagsApproval + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::TagsApproval +=head1 TABLE: C =cut @@ -34,6 +38,7 @@ __PACKAGE__->table("tags_approval"); =head2 date_approved data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 approved_by @@ -56,12 +61,27 @@ __PACKAGE__->add_columns( "approved", { data_type => "integer", default_value => 0, is_nullable => 0 }, "date_approved", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, "approved_by", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, "weight_total", { data_type => "integer", default_value => 1, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("term"); =head1 RELATIONS @@ -78,7 +98,12 @@ __PACKAGE__->belongs_to( "approved_by", "Koha::Schema::Result::Borrower", { borrowernumber => "approved_by" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); =head2 tags_indexes @@ -97,8 +122,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:0C4z7rRUg2mcdmdrUOGcYw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TcnMQQTB5F8hjyLoJ7VBHQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TagsIndex.pm b/Koha/Schema/Result/TagsIndex.pm index af08b8ce8d..49d2c1b1da 100644 --- a/Koha/Schema/Result/TagsIndex.pm +++ b/Koha/Schema/Result/TagsIndex.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::TagsIndex; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::TagsIndex + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::TagsIndex +=head1 TABLE: C =cut @@ -48,24 +52,22 @@ __PACKAGE__->add_columns( "weight", { data_type => "integer", default_value => 1, is_nullable => 0 }, ); -__PACKAGE__->set_primary_key("term", "biblionumber"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 term +=over 4 -Type: belongs_to +=item * L -Related object: L +=item * L + +=back =cut -__PACKAGE__->belongs_to( - "term", - "Koha::Schema::Result::TagsApproval", - { term => "term" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("term", "biblionumber"); + +=head1 RELATIONS =head2 biblionumber @@ -79,12 +81,27 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, +); + +=head2 term + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "term", + "Koha::Schema::Result::TagsApproval", + { term => "term" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:X0OvXQjDYLVCMgHHWx/kpw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LCvvyig+memFWmWUdCStXQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TmpHoldsqueue.pm b/Koha/Schema/Result/TmpHoldsqueue.pm index 8373ed465b..9f2a8e452b 100644 --- a/Koha/Schema/Result/TmpHoldsqueue.pm +++ b/Koha/Schema/Result/TmpHoldsqueue.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::TmpHoldsqueue; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::TmpHoldsqueue + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::TmpHoldsqueue +=head1 TABLE: C =cut @@ -64,6 +68,7 @@ __PACKAGE__->table("tmp_holdsqueue"); =head2 reservedate data_type: 'date' + datetime_undef_if_invalid: 1 is_nullable: 1 =head2 title @@ -120,7 +125,7 @@ __PACKAGE__->add_columns( "cardnumber", { data_type => "varchar", is_nullable => 1, size => 16 }, "reservedate", - { data_type => "date", is_nullable => 1 }, + { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "title", { data_type => "mediumtext", is_nullable => 1 }, "itemcallnumber", @@ -136,8 +141,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uzRfXFE7Kjkoh5H5e1akEw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZD6xOAdXuMjglFtNa+DMEQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/TransportCost.pm b/Koha/Schema/Result/TransportCost.pm index 135988eb70..9defb97554 100644 --- a/Koha/Schema/Result/TransportCost.pm +++ b/Koha/Schema/Result/TransportCost.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::TransportCost; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::TransportCost + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::TransportCost +=head1 TABLE: C =cut @@ -57,6 +61,19 @@ __PACKAGE__->add_columns( "disable_transfer", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("frombranch", "tobranch"); =head1 RELATIONS @@ -73,7 +90,7 @@ __PACKAGE__->belongs_to( "frombranch", "Koha::Schema::Result::Branch", { branchcode => "frombranch" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 tobranch @@ -88,12 +105,12 @@ __PACKAGE__->belongs_to( "tobranch", "Koha::Schema::Result::Branch", { branchcode => "tobranch" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:xaYbVRwPFyhljmGybBzTqA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gMs7dT/xK4ClGqQEHI7HOQ # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/UserPermission.pm b/Koha/Schema/Result/UserPermission.pm index bec2856eac..948c2e18a0 100644 --- a/Koha/Schema/Result/UserPermission.pm +++ b/Koha/Schema/Result/UserPermission.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::UserPermission; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::UserPermission + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::UserPermission +=head1 TABLE: C =cut @@ -75,7 +79,7 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 permission @@ -90,12 +94,17 @@ __PACKAGE__->belongs_to( "permission", "Koha::Schema::Result::Permission", { code => "code", module_bit => "module_bit" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:uj0+AqPSrddrRPjAEbeDUA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9dMAYxSmVQ1cVKxmnMiMkg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Userflag.pm b/Koha/Schema/Result/Userflag.pm index f8ef9e8fa4..7ece4a6d7d 100644 --- a/Koha/Schema/Result/Userflag.pm +++ b/Koha/Schema/Result/Userflag.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Userflag; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Userflag + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Userflag +=head1 TABLE: C =cut @@ -54,6 +58,17 @@ __PACKAGE__->add_columns( "defaulton", { data_type => "integer", is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("bit"); =head1 RELATIONS @@ -74,8 +89,8 @@ __PACKAGE__->has_many( ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7eKK9jZ+GryvazfRyKOIBw +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A4wiP/AM/pdmYrJmuiYIYg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Virtualshelfcontent.pm b/Koha/Schema/Result/Virtualshelfcontent.pm index f1f35c3b12..dfb8d466d8 100644 --- a/Koha/Schema/Result/Virtualshelfcontent.pm +++ b/Koha/Schema/Result/Virtualshelfcontent.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Virtualshelfcontent; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Virtualshelfcontent + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Virtualshelfcontent +=head1 TABLE: C =cut @@ -41,6 +45,7 @@ __PACKAGE__->table("virtualshelfcontents"); =head2 dateadded data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -71,9 +76,10 @@ __PACKAGE__->add_columns( { data_type => "integer", is_nullable => 1 }, "dateadded", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "borrowernumber", { data_type => "integer", is_foreign_key => 1, is_nullable => 1 }, @@ -81,21 +87,6 @@ __PACKAGE__->add_columns( =head1 RELATIONS -=head2 shelfnumber - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "shelfnumber", - "Koha::Schema::Result::Virtualshelve", - { shelfnumber => "shelfnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); - =head2 biblionumber Type: belongs_to @@ -108,7 +99,7 @@ __PACKAGE__->belongs_to( "biblionumber", "Koha::Schema::Result::Biblio", { biblionumber => "biblionumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); =head2 borrowernumber @@ -123,12 +114,32 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +=head2 shelfnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "shelfnumber", + "Koha::Schema::Result::Virtualshelve", + { shelfnumber => "shelfnumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2013-06-18 13:13:57 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Hno59ucoCC6fZqGi1A2yIA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nhcu0n7BoSNsoY76SYSYFw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Virtualshelfshare.pm b/Koha/Schema/Result/Virtualshelfshare.pm index 7e0a985486..93aa7dd8bc 100644 --- a/Koha/Schema/Result/Virtualshelfshare.pm +++ b/Koha/Schema/Result/Virtualshelfshare.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Virtualshelfshare; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Virtualshelfshare + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Virtualshelfshare +=head1 TABLE: C =cut @@ -46,6 +50,7 @@ __PACKAGE__->table("virtualshelfshares"); =head2 sharedate data_type: 'datetime' + datetime_undef_if_invalid: 1 is_nullable: 1 =cut @@ -60,26 +65,26 @@ __PACKAGE__->add_columns( "invitekey", { data_type => "varchar", is_nullable => 1, size => 10 }, "sharedate", - { data_type => "datetime", is_nullable => 1 }, + { + data_type => "datetime", + datetime_undef_if_invalid => 1, + is_nullable => 1, + }, ); -__PACKAGE__->set_primary_key("id"); -=head1 RELATIONS +=head1 PRIMARY KEY -=head2 shelfnumber +=over 4 -Type: belongs_to +=item * L -Related object: L +=back =cut -__PACKAGE__->belongs_to( - "shelfnumber", - "Koha::Schema::Result::Virtualshelve", - { shelfnumber => "shelfnumber" }, - { on_delete => "CASCADE", on_update => "CASCADE" }, -); +__PACKAGE__->set_primary_key("id"); + +=head1 RELATIONS =head2 borrowernumber @@ -93,12 +98,32 @@ __PACKAGE__->belongs_to( "borrowernumber", "Koha::Schema::Result::Borrower", { borrowernumber => "borrowernumber" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + +=head2 shelfnumber + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "shelfnumber", + "Koha::Schema::Result::Virtualshelve", + { shelfnumber => "shelfnumber" }, + { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" }, ); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:wbmtFrbzS+jaFaiZRZ0uwg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Eu/4NPwsXI+UMs5QWVsUmA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Virtualshelve.pm b/Koha/Schema/Result/Virtualshelve.pm index c28cc36404..fa4759da7d 100644 --- a/Koha/Schema/Result/Virtualshelve.pm +++ b/Koha/Schema/Result/Virtualshelve.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Virtualshelve; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Virtualshelve + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Virtualshelve +=head1 TABLE: C =cut @@ -52,6 +56,7 @@ __PACKAGE__->table("virtualshelves"); =head2 lastmodified data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -88,9 +93,10 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 16 }, "lastmodified", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, "allow_add", { data_type => "tinyint", default_value => 0, is_nullable => 1 }, @@ -99,10 +105,41 @@ __PACKAGE__->add_columns( "allow_delete_other", { data_type => "tinyint", default_value => 0, is_nullable => 1 }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("shelfnumber"); =head1 RELATIONS +=head2 owner + +Type: belongs_to + +Related object: L + +=cut + +__PACKAGE__->belongs_to( + "owner", + "Koha::Schema::Result::Borrower", + { borrowernumber => "owner" }, + { + is_deferrable => 1, + join_type => "LEFT", + on_delete => "CASCADE", + on_update => "CASCADE", + }, +); + =head2 virtualshelfcontents Type: has_many @@ -133,24 +170,9 @@ __PACKAGE__->has_many( { cascade_copy => 0, cascade_delete => 0 }, ); -=head2 owner - -Type: belongs_to - -Related object: L - -=cut - -__PACKAGE__->belongs_to( - "owner", - "Koha::Schema::Result::Borrower", - { borrowernumber => "owner" }, - { join_type => "LEFT", on_delete => "CASCADE", on_update => "CASCADE" }, -); - -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:GitYLGGw2F/bqc511p2oTg +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WdBpWgSdrE0l13vKgDRcGg # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Z3950server.pm b/Koha/Schema/Result/Z3950server.pm index 48e6747e26..a185f570ed 100644 --- a/Koha/Schema/Result/Z3950server.pm +++ b/Koha/Schema/Result/Z3950server.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Z3950server; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Z3950server + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Z3950server +=head1 TABLE: C =cut @@ -90,7 +94,7 @@ __PACKAGE__->table("z3950servers"); data_type: 'enum' default_value: 'primary' - extra: {list => ["primary","secondary",""]} + extra: {list => ["primary","secondary"]} is_nullable: 0 =head2 type @@ -110,6 +114,13 @@ __PACKAGE__->table("z3950servers"); data_type: 'text' is_nullable: 0 +=head2 recordtype + + data_type: 'varchar' + default_value: 'biblio' + is_nullable: 0 + size: 45 + =cut __PACKAGE__->add_columns( @@ -141,7 +152,7 @@ __PACKAGE__->add_columns( { data_type => "enum", default_value => "primary", - extra => { list => ["primary", "secondary", ""] }, + extra => { list => ["primary", "secondary"] }, is_nullable => 0, }, "type", @@ -155,12 +166,30 @@ __PACKAGE__->add_columns( { data_type => "text", is_nullable => 1 }, "description", { data_type => "text", is_nullable => 0 }, + "recordtype", + { + data_type => "varchar", + default_value => "biblio", + is_nullable => 0, + size => 45, + }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:3D8BWcZZVQlK8zrPw4GTtQ +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:j/AgGQDMyR5wm1wooSYYDw # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Zebraqueue.pm b/Koha/Schema/Result/Zebraqueue.pm index 6620144687..25e6bf9659 100644 --- a/Koha/Schema/Result/Zebraqueue.pm +++ b/Koha/Schema/Result/Zebraqueue.pm @@ -1,17 +1,21 @@ +use utf8; package Koha::Schema::Result::Zebraqueue; # Created by DBIx::Class::Schema::Loader # DO NOT MODIFY THE FIRST PART OF THIS FILE +=head1 NAME + +Koha::Schema::Result::Zebraqueue + +=cut + use strict; use warnings; use base 'DBIx::Class::Core'; - -=head1 NAME - -Koha::Schema::Result::Zebraqueue +=head1 TABLE: C =cut @@ -55,6 +59,7 @@ __PACKAGE__->table("zebraqueue"); =head2 time data_type: 'timestamp' + datetime_undef_if_invalid: 1 default_value: current_timestamp is_nullable: 0 @@ -78,16 +83,28 @@ __PACKAGE__->add_columns( { data_type => "integer", default_value => 0, is_nullable => 0 }, "time", { - data_type => "timestamp", + data_type => "timestamp", + datetime_undef_if_invalid => 1, default_value => \"current_timestamp", - is_nullable => 0, + is_nullable => 0, }, ); + +=head1 PRIMARY KEY + +=over 4 + +=item * L + +=back + +=cut + __PACKAGE__->set_primary_key("id"); -# Created by DBIx::Class::Schema::Loader v0.07000 @ 2012-09-02 08:44:15 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:WrwJr7Op+i6ck0EwiBADCA +# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-14 20:56:21 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vU9ROiVUwXc7jhKt728dRg # You can replace this text with custom content, and it will be preserved on regeneration -- 2.39.5