Bug 8798: (follow-up) update the DBIC schema class files
authorGalen Charlton <gmc@esilibrary.com>
Mon, 14 Oct 2013 21:03:40 +0000 (21:03 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Oct 2013 21:08:03 +0000 (21:08 +0000)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
157 files changed:
Koha/Schema.pm
Koha/Schema/Result/Accountline.pm
Koha/Schema/Result/Accountoffset.pm
Koha/Schema/Result/ActionLog.pm [new file with mode: 0644]
Koha/Schema/Result/Alert.pm
Koha/Schema/Result/Aqbasket.pm
Koha/Schema/Result/Aqbasketgroup.pm
Koha/Schema/Result/Aqbookseller.pm
Koha/Schema/Result/Aqbudget.pm
Koha/Schema/Result/Aqbudgetborrower.pm
Koha/Schema/Result/Aqbudgetperiod.pm
Koha/Schema/Result/AqbudgetsPlanning.pm
Koha/Schema/Result/Aqcontract.pm
Koha/Schema/Result/Aqinvoice.pm
Koha/Schema/Result/Aqorder.pm
Koha/Schema/Result/Aqorderdelivery.pm
Koha/Schema/Result/AqordersItem.pm
Koha/Schema/Result/AqordersTransfer.pm [new file with mode: 0644]
Koha/Schema/Result/AuthHeader.pm
Koha/Schema/Result/AuthSubfieldStructure.pm
Koha/Schema/Result/AuthTagStructure.pm
Koha/Schema/Result/AuthType.pm
Koha/Schema/Result/AuthorisedValue.pm
Koha/Schema/Result/AuthorisedValuesBranch.pm
Koha/Schema/Result/Biblio.pm
Koha/Schema/Result/BiblioFramework.pm
Koha/Schema/Result/Biblioimage.pm
Koha/Schema/Result/Biblioitem.pm
Koha/Schema/Result/Borrower.pm
Koha/Schema/Result/BorrowerAttribute.pm
Koha/Schema/Result/BorrowerAttributeType.pm
Koha/Schema/Result/BorrowerAttributeTypesBranch.pm
Koha/Schema/Result/BorrowerFile.pm
Koha/Schema/Result/BorrowerMessagePreference.pm
Koha/Schema/Result/BorrowerMessageTransportPreference.pm
Koha/Schema/Result/BorrowerModification.pm
Koha/Schema/Result/Branch.pm
Koha/Schema/Result/BranchBorrowerCircRule.pm
Koha/Schema/Result/BranchItemRule.pm
Koha/Schema/Result/BranchTransferLimit.pm
Koha/Schema/Result/Branchcategory.pm
Koha/Schema/Result/Branchrelation.pm
Koha/Schema/Result/Branchtransfer.pm
Koha/Schema/Result/Browser.pm
Koha/Schema/Result/CategoriesBranch.pm
Koha/Schema/Result/Category.pm
Koha/Schema/Result/City.pm
Koha/Schema/Result/ClassSortRule.pm
Koha/Schema/Result/ClassSource.pm
Koha/Schema/Result/Collection.pm
Koha/Schema/Result/CollectionTracking.pm
Koha/Schema/Result/Course.pm
Koha/Schema/Result/CourseInstructor.pm
Koha/Schema/Result/CourseItem.pm
Koha/Schema/Result/CourseReserve.pm
Koha/Schema/Result/CreatorBatch.pm
Koha/Schema/Result/CreatorImage.pm
Koha/Schema/Result/CreatorLayout.pm
Koha/Schema/Result/CreatorTemplate.pm
Koha/Schema/Result/Currency.pm
Koha/Schema/Result/DefaultBorrowerCircRule.pm
Koha/Schema/Result/DefaultBranchCircRule.pm
Koha/Schema/Result/DefaultBranchItemRule.pm
Koha/Schema/Result/DefaultCircRule.pm
Koha/Schema/Result/Deletedbiblio.pm
Koha/Schema/Result/Deletedbiblioitem.pm
Koha/Schema/Result/Deletedborrower.pm
Koha/Schema/Result/Deleteditem.pm
Koha/Schema/Result/Ethnicity.pm
Koha/Schema/Result/ExportFormat.pm
Koha/Schema/Result/Fieldmapping.pm
Koha/Schema/Result/HoldFillTarget.pm
Koha/Schema/Result/ImportAuth.pm
Koha/Schema/Result/ImportBatch.pm
Koha/Schema/Result/ImportBiblio.pm
Koha/Schema/Result/ImportItem.pm
Koha/Schema/Result/ImportRecord.pm
Koha/Schema/Result/ImportRecordMatches.pm
Koha/Schema/Result/Issue.pm
Koha/Schema/Result/Issuingrule.pm
Koha/Schema/Result/Item.pm
Koha/Schema/Result/ItemCirculationAlertPreference.pm
Koha/Schema/Result/Itemtype.pm
Koha/Schema/Result/LanguageDescription.pm
Koha/Schema/Result/LanguageRfc4646ToIso639.pm
Koha/Schema/Result/LanguageScriptBidi.pm
Koha/Schema/Result/LanguageScriptMapping.pm
Koha/Schema/Result/LanguageSubtagRegistry.pm
Koha/Schema/Result/Letter.pm
Koha/Schema/Result/Linktracker.pm
Koha/Schema/Result/MarcMatcher.pm
Koha/Schema/Result/MarcSubfieldStructure.pm
Koha/Schema/Result/MarcTagStructure.pm
Koha/Schema/Result/Matchcheck.pm
Koha/Schema/Result/MatcherMatchpoint.pm
Koha/Schema/Result/Matchpoint.pm
Koha/Schema/Result/MatchpointComponent.pm
Koha/Schema/Result/MatchpointComponentNorm.pm
Koha/Schema/Result/Message.pm
Koha/Schema/Result/MessageAttribute.pm
Koha/Schema/Result/MessageQueue.pm
Koha/Schema/Result/MessageTransport.pm
Koha/Schema/Result/MessageTransportType.pm
Koha/Schema/Result/NeedMergeAuthority.pm
Koha/Schema/Result/Notify.pm
Koha/Schema/Result/OaiSet.pm
Koha/Schema/Result/OaiSetsBiblio.pm
Koha/Schema/Result/OaiSetsDescription.pm
Koha/Schema/Result/OaiSetsMapping.pm
Koha/Schema/Result/OldIssue.pm
Koha/Schema/Result/OldReserve.pm
Koha/Schema/Result/OpacNews.pm
Koha/Schema/Result/Overduerule.pm
Koha/Schema/Result/Patroncard.pm
Koha/Schema/Result/Patronimage.pm
Koha/Schema/Result/PendingOfflineOperation.pm
Koha/Schema/Result/Permission.pm
Koha/Schema/Result/PluginData.pm
Koha/Schema/Result/Printer.pm
Koha/Schema/Result/PrintersProfile.pm
Koha/Schema/Result/Quote.pm
Koha/Schema/Result/Rating.pm
Koha/Schema/Result/RepeatableHoliday.pm
Koha/Schema/Result/ReportsDictionary.pm
Koha/Schema/Result/Reserve.pm
Koha/Schema/Result/Reserveconstraint.pm
Koha/Schema/Result/Review.pm
Koha/Schema/Result/Roadtype.pm
Koha/Schema/Result/SavedReport.pm
Koha/Schema/Result/SavedSql.pm
Koha/Schema/Result/SearchHistory.pm
Koha/Schema/Result/Serial.pm
Koha/Schema/Result/Serialitem.pm
Koha/Schema/Result/ServicesThrottle.pm
Koha/Schema/Result/Session.pm
Koha/Schema/Result/SocialData.pm
Koha/Schema/Result/SpecialHoliday.pm
Koha/Schema/Result/Statistic.pm
Koha/Schema/Result/Stopword.pm
Koha/Schema/Result/Subscription.pm
Koha/Schema/Result/Subscriptionhistory.pm
Koha/Schema/Result/Subscriptionroutinglist.pm
Koha/Schema/Result/Suggestion.pm
Koha/Schema/Result/Systempreference.pm
Koha/Schema/Result/Tag.pm
Koha/Schema/Result/TagAll.pm
Koha/Schema/Result/TagsApproval.pm
Koha/Schema/Result/TagsIndex.pm
Koha/Schema/Result/TmpHoldsqueue.pm
Koha/Schema/Result/TransportCost.pm
Koha/Schema/Result/UserPermission.pm
Koha/Schema/Result/Userflag.pm
Koha/Schema/Result/Virtualshelfcontent.pm
Koha/Schema/Result/Virtualshelfshare.pm
Koha/Schema/Result/Virtualshelve.pm
Koha/Schema/Result/Z3950server.pm
Koha/Schema/Result/Zebraqueue.pm

index f1db97f..cffc631 100644 (file)
@@ -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
index c8a21e2..3b977fa 100644 (file)
@@ -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<accountlines>
 
 =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</accountlines_id>
+
+=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
index 058893b..e9d8c2f 100644 (file)
@@ -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<accountoffsets>
 
 =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 (file)
index 0000000..054693e
--- /dev/null
@@ -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<action_logs>
+
+=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</action_id>
+
+=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;
index 8fe9469..2fae361 100644 (file)
@@ -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<alert>
 
 =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</alertid>
+
+=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
index e53abe9..2ce507d 100644 (file)
@@ -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<aqbasket>
 
 =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</basketno>
 
-Related object: L<Koha::Schema::Result::Aqbookseller>
+=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<Koha::Schema::Result::Aqcontract>
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Aqorder>
 
 =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<Koha::Schema::Result::Aqorder>
+Related object: L<Koha::Schema::Result::Aqbookseller>
 
 =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<Koha::Schema::Result::Aqcontract>
+
+=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
index d591ac3..6b3348e 100644 (file)
@@ -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<aqbasketgroups>
 
 =cut
 
@@ -85,6 +89,17 @@ __PACKAGE__->add_columns(
   "billingplace",
   { data_type => "varchar", is_nullable => 1, size => 10 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=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
index af2d97d..ee2f4bd 100644 (file)
@@ -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<aqbooksellers>
 
 =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</id>
 
-Related object: L<Koha::Schema::Result::Aqbasket>
+=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<Koha::Schema::Result::Currency>
-
-=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<Koha::Schema::Result::Currency>
+Related object: L<Koha::Schema::Result::Aqbasket>
 
 =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<Koha::Schema::Result::Currency>
+
+=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<Koha::Schema::Result::Currency>
+
+=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
index fb42c6f..336e2db 100644 (file)
@@ -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<aqbudgets>
 
 =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</budget_id>
+
+=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</aqbudgetborrowers> -> 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
index f11f9a7..d6b416f 100644 (file)
@@ -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<aqbudgetborrowers>
 
 =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</budget_id>
 
-Related object: L<Koha::Schema::Result::Aqbudget>
+=item * L</borrowernumber>
+
+=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<Koha::Schema::Result::Aqbudget>
+
+=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
index e281c6d..6015893 100644 (file)
@@ -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<aqbudgetperiods>
 
 =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</budget_period_id>
+
+=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
index 3685d8c..990e04e 100644 (file)
@@ -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<aqbudgets_planning>
 
 =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</plan_id>
+
+=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
index 10218a7..59fe41a 100644 (file)
@@ -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<aqcontract>
 
 =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</contractnumber>
+
+=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
index 9fc9b36..c063d30 100644 (file)
@@ -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<aqinvoices>
 
 =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</invoiceid>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("invoiceid");
 
 =head1 RELATIONS
 
+=head2 aqorders
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Aqorder>
+
+=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<Koha::Schema::Result::Aqorder>
-
-=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
index 7204b75..00193e2 100644 (file)
@@ -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<aqorders>
 
 =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</ordernumber>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("ordernumber");
 
 =head1 RELATIONS
 
+=head2 aqorders_items
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::AqordersItem>
+
+=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<Koha::Schema::Result::AqordersTransfer>
+
+=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<Koha::Schema::Result::AqordersTransfer>
+
+=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<Koha::Schema::Result::AqordersItem>
-
-=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
index fa297cb..453d8ff 100644 (file)
@@ -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<aqorderdelivery>
 
 =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
index c434105..ac99f2e 100644 (file)
@@ -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<aqorders_items>
 
 =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</itemnumber>
+
+=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 (file)
index 0000000..0a4ec88
--- /dev/null
@@ -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<aqorders_transfers>
+
+=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<ordernumber_from>
+
+=over 4
+
+=item * L</ordernumber_from>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("ordernumber_from", ["ordernumber_from"]);
+
+=head2 C<ordernumber_to>
+
+=over 4
+
+=item * L</ordernumber_to>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("ordernumber_to", ["ordernumber_to"]);
+
+=head1 RELATIONS
+
+=head2 ordernumber_from
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Aqorder>
+
+=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<Koha::Schema::Result::Aqorder>
+
+=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;
index 5efd30f..095c5d4 100644 (file)
@@ -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<auth_header>
 
 =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</authid>
+
+=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
index fcb424a..8c16d3e 100644 (file)
@@ -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<auth_subfield_structure>
 
 =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</authtypecode>
+
+=item * L</tagfield>
+
+=item * L</tagsubfield>
+
+=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
index 01f0578..4612b32 100644 (file)
@@ -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<auth_tag_structure>
 
 =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</authtypecode>
+
+=item * L</tagfield>
+
+=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
index a84d931..d4a7d77 100644 (file)
@@ -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<auth_types>
 
 =cut
 
@@ -57,6 +61,17 @@ __PACKAGE__->add_columns(
   "summary",
   { data_type => "mediumtext", is_nullable => 0 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</authtypecode>
+
+=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
index 3e71f33..0366aec 100644 (file)
@@ -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<authorised_values>
 
 =cut
 
@@ -73,6 +77,17 @@ __PACKAGE__->add_columns(
   "imageurl",
   { data_type => "varchar", is_nullable => 1, size => 200 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=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
index 1d81c4b..0c6e2d9 100644 (file)
@@ -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<authorised_values_branches>
 
 =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
index 1192307..2a8c28e 100644 (file)
@@ -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<biblio>
 
 =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</biblionumber>
+
+=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</oai_sets_biblios> -> 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
index e2a34d5..36c223b 100644 (file)
@@ -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<biblio_framework>
 
 =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</frameworkcode>
+
+=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
index 39b69b8..400eef5 100644 (file)
@@ -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<biblioimages>
 
 =cut
 
@@ -61,6 +65,17 @@ __PACKAGE__->add_columns(
   "thumbnail",
   { data_type => "mediumblob", is_nullable => 0 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</imagenumber>
+
+=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
index 18ea787..085251e 100644 (file)
@@ -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<biblioitems>
 
 =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</biblioitemnumber>
+
+=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
index 2b700bf..3fe4362 100644 (file)
@@ -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<borrowers>
 
 =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</borrowernumber>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("borrowernumber");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<cardnumber>
+
+=over 4
+
+=item * L</cardnumber>
+
+=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<Koha::Schema::Result::Category>
+Related object: L<Koha::Schema::Result::Branch>
 
 =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<Koha::Schema::Result::Branch>
+Related object: L<Koha::Schema::Result::Category>
 
 =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<Koha::Schema::Result::Patronimage>
 __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</aqbudgetborrowers> -> budget
+
+=cut
+
+__PACKAGE__->many_to_many("budgets", "aqbudgetborrowers", "budget");
+
+=head2 courses
+
+Type: many_to_many
+
+Composing rels: L</course_instructors> -> 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
index 3ac3b83..0b7a96c 100644 (file)
@@ -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<borrower_attributes>
 
 =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
index 94e96f3..f2f5120 100644 (file)
@@ -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<borrower_attribute_types>
 
 =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</code>
+
+=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
index e867b8c..362b5cc 100644 (file)
@@ -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<borrower_attribute_types_branches>
 
 =cut
 
@@ -44,39 +48,49 @@ __PACKAGE__->add_columns(
 
 =head1 RELATIONS
 
-=head2 bat_code
+=head2 b_branchcode
 
 Type: belongs_to
 
-Related object: L<Koha::Schema::Result::BorrowerAttributeType>
+Related object: L<Koha::Schema::Result::Branch>
 
 =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<Koha::Schema::Result::Branch>
+Related object: L<Koha::Schema::Result::BorrowerAttributeType>
 
 =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
index d967be9..6f0982d 100644 (file)
@@ -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<borrower_files>
 
 =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</file_id>
+
+=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
index 03cecfb..3069df5 100644 (file)
@@ -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<borrower_message_preferences>
 
 =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</borrower_message_preference_id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("borrower_message_preference_id");
 
 =head1 RELATIONS
 
+=head2 borrower_message_transport_preferences
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::BorrowerMessageTransportPreference>
+
+=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<Koha::Schema::Result::MessageAttribute>
+Related object: L<Koha::Schema::Result::Category>
 
 =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<Koha::Schema::Result::Category>
+Related object: L<Koha::Schema::Result::MessageAttribute>
 
 =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<Koha::Schema::Result::BorrowerMessageTransportPreference>
+Composing rels: L</borrower_message_transport_preferences> -> 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
index d898a60..10f3f46 100644 (file)
@@ -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<borrower_message_transport_preferences>
 
 =cut
 
@@ -53,6 +57,19 @@ __PACKAGE__->add_columns(
     size => 20,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</borrower_message_preference_id>
+
+=item * L</message_transport_type>
+
+=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
index 4b65a16..08cf62b 100644 (file)
@@ -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<borrower_modifications>
 
 =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</verification_token>
+
+=item * L</borrowernumber>
+
+=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
index 1542325..a2cfba3 100644 (file)
@@ -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<branches>
 
 =cut
 
@@ -154,6 +158,17 @@ __PACKAGE__->add_columns(
   "opac_info",
   { data_type => "text", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</branchcode>
+
+=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<Koha::Schema::Result::Item>
 =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<Koha::Schema::Result::Item>
 =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</branchrelations> -> 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
index 071df51..fce2914 100644 (file)
@@ -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<branch_borrower_circ_rules>
 
 =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</categorycode>
 
-Related object: L<Koha::Schema::Result::Category>
+=item * L</branchcode>
+
+=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<Koha::Schema::Result::Category>
+
+=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
index c73c04c..a074597 100644 (file)
@@ -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<branch_item_rules>
 
 =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</itemtype>
 
-Related object: L<Koha::Schema::Result::Itemtype>
+=item * L</branchcode>
+
+=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<Koha::Schema::Result::Itemtype>
+
+=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
index f82ff05..2c3011f 100644 (file)
@@ -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<branch_transfer_limits>
 
 =cut
 
@@ -63,11 +67,22 @@ __PACKAGE__->add_columns(
   "ccode",
   { data_type => "varchar", is_nullable => 1, size => 10 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</limitid>
+
+=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
index 592a1d7..6417ca9 100644 (file)
@@ -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<branchcategories>
 
 =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</categorycode>
+
+=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</branchrelations> -> 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
index f84ff27..e44412b 100644 (file)
@@ -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<branchrelations>
 
 =cut
 
@@ -55,6 +59,19 @@ __PACKAGE__->add_columns(
     size => 10,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</branchcode>
+
+=item * L</categorycode>
+
+=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
index 05691c5..1976ffd 100644 (file)
@@ -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<branchtransfers>
 
 =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<Koha::Schema::Result::Branch>
+Related object: L<Koha::Schema::Result::Item>
 
 =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<Koha::Schema::Result::Item>
+Related object: L<Koha::Schema::Result::Branch>
 
 =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
index e8d403c..3e9c1d3 100644 (file)
@@ -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<browser>
 
 =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
index 756d014..584c177 100644 (file)
@@ -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<categories_branches>
 
 =cut
 
@@ -44,39 +48,49 @@ __PACKAGE__->add_columns(
 
 =head1 RELATIONS
 
-=head2 categorycode
+=head2 branchcode
 
 Type: belongs_to
 
-Related object: L<Koha::Schema::Result::Category>
+Related object: L<Koha::Schema::Result::Branch>
 
 =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<Koha::Schema::Result::Branch>
+Related object: L<Koha::Schema::Result::Category>
 
 =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
index 7b61cb3..12ac12f 100644 (file)
@@ -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<categories>
 
 =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</categorycode>
+
+=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
index 4174602..9f9ce6b 100644 (file)
@@ -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<cities>
 
 =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</cityid>
+
+=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
index c32533c..567c01a 100644 (file)
@@ -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<class_sort_rules>
 
 =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</class_sort_rule>
+
+=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
index 640b03a..a0b27cd 100644 (file)
@@ -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<class_sources>
 
 =cut
 
@@ -63,6 +67,17 @@ __PACKAGE__->add_columns(
     size => 10,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</cn_source>
+
+=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
index 6761a8a..92b0f6c 100644 (file)
@@ -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<collections>
 
 =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</colid>
+
+=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
index 3ab741f..907ff68 100644 (file)
@@ -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<collections_tracking>
 
 =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</ctid>
+
+=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
index 91615f0..ceef5bc 100644 (file)
@@ -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<courses>
 
 =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</course_id>
+
+=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</course_instructors> -> 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
index 6f38227..c1d183c 100644 (file)
@@ -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<course_instructors>
 
 =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</course_id>
 
-Related object: L<Koha::Schema::Result::Course>
+=item * L</borrowernumber>
+
+=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<Koha::Schema::Result::Course>
+
+=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
index 5a59bd8..a37263d 100644 (file)
@@ -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<course_items>
 
 =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</ci_id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("ci_id");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<itemnumber>
+
+=over 4
+
+=item * L</itemnumber>
+
+=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
index 607046a..bb937b2 100644 (file)
@@ -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<course_reserves>
 
 =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</cr_id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("cr_id");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<pseudo_key>
+
+=over 4
+
+=item * L</course_id>
+
+=item * L</ci_id>
+
+=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
index 9a6ffc8..3fdc97c 100644 (file)
@@ -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<creator_batches>
 
 =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</label_id>
+
+=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
index 3e90c89..70a669e 100644 (file)
@@ -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<creator_images>
 
 =cut
 
@@ -52,12 +56,36 @@ __PACKAGE__->add_columns(
     size => 20,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</image_id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("image_id");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<image_name_index>
+
+=over 4
+
+=item * L</image_name>
+
+=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
index f044fac..5dc03d4 100644 (file)
@@ -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<creator_layouts>
 
 =cut
 
@@ -162,11 +166,22 @@ __PACKAGE__->add_columns(
     size => 15,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</layout_id>
+
+=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
index 67943ae..b96c64d 100644 (file)
@@ -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<creator_templates>
 
 =cut
 
@@ -185,11 +189,22 @@ __PACKAGE__->add_columns(
     size => 15,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</template_id>
+
+=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
index a09337b..7528869 100644 (file)
@@ -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<currency>
 
 =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</currency>
+
+=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<Koha::Schema::Result::Aqbookseller>
 =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<Koha::Schema::Result::Aqbookseller>
 =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
index 00f9266..0f9c8f1 100644 (file)
@@ -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<default_borrower_circ_rules>
 
 =cut
 
@@ -39,6 +43,17 @@ __PACKAGE__->add_columns(
   "maxissueqty",
   { data_type => "integer", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</categorycode>
+
+=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
index 7457fb4..55fd2b2 100644 (file)
@@ -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<default_branch_circ_rules>
 
 =cut
 
@@ -54,6 +58,17 @@ __PACKAGE__->add_columns(
   "returnbranch",
   { data_type => "varchar", is_nullable => 1, size => 15 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</branchcode>
+
+=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
index 1df7bf9..f31aa00 100644 (file)
@@ -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<default_branch_item_rules>
 
 =cut
 
@@ -47,6 +51,17 @@ __PACKAGE__->add_columns(
   "returnbranch",
   { data_type => "varchar", is_nullable => 1, size => 15 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</itemtype>
+
+=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
index f3b09ff..7bd1564 100644 (file)
@@ -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<default_circ_rules>
 
 =cut
 
@@ -59,11 +63,22 @@ __PACKAGE__->add_columns(
   "returnbranch",
   { data_type => "varchar", is_nullable => 1, size => 15 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</singleton>
+
+=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
index d41dfaf..61adcd1 100644 (file)
@@ -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<deletedbiblio>
 
 =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</biblionumber>
+
+=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
index 04f5351..6d520ea 100644 (file)
@@ -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<deletedbiblioitems>
 
 =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</biblioitemnumber>
+
+=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
index 8a38a5d..9ede8ac 100644 (file)
@@ -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<deletedborrowers>
 
 =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
index 13ffa66..be28986 100644 (file)
@@ -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<deleteditems>
 
 =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</itemnumber>
+
+=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
index a925c4c..039fcb7 100644 (file)
@@ -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<ethnicity>
 
 =cut
 
@@ -40,11 +44,22 @@ __PACKAGE__->add_columns(
   "name",
   { data_type => "varchar", is_nullable => 1, size => 255 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</code>
+
+=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
index ed21a64..0882bcf 100644 (file)
@@ -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<export_format>
 
 =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</export_format_id>
+
+=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
index 684f755..d0b8730 100644 (file)
@@ -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<fieldmapping>
 
 =cut
 
@@ -64,11 +68,22 @@ __PACKAGE__->add_columns(
   "subfieldcode",
   { data_type => "char", is_nullable => 0, size => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("id");
 
 
-# Created by DBIx::Class::Schema::Loader v0.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
index 6958cb6..b6735b6 100644 (file)
@@ -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<hold_fill_targets>
 
 =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</itemnumber>
 
-Related object: L<Koha::Schema::Result::Borrower>
+=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<Koha::Schema::Result::Borrower>
+
+=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
index e8b6a84..a8fc448 100644 (file)
@@ -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<import_auths>
 
 =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
index 14ee242..7075e4b 100644 (file)
@@ -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<import_batches>
 
 =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</import_batch_id>
+
+=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
index a8fc48f..1b6c50d 100644 (file)
@@ -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<import_biblios>
 
 =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
index 08ca980..2949e36 100644 (file)
@@ -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<import_items>
 
 =cut
 
@@ -82,6 +86,17 @@ __PACKAGE__->add_columns(
   "import_error",
   { data_type => "mediumtext", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</import_items_id>
+
+=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
index 6922ad7..c010138 100644 (file)
@@ -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<import_records>
 
 =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</import_record_id>
+
+=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<Koha::Schema::Result::ImportBatch>
+
+=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<Koha::Schema::Result::ImportBatch>
-
-=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
index 5f34d30..934e381 100644 (file)
@@ -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<import_record_matches>
 
 =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
index d10a338..3bf4545 100644 (file)
@@ -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<issues>
 
 =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
index 57323e5..aaaabb4 100644 (file)
@@ -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<issuingrules>
 
 =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</branchcode>
+
+=item * L</categorycode>
+
+=item * L</itemtype>
+
+=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
index 69edbe6..b65e7d5 100644 (file)
@@ -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<items>
 
 =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</itemnumber>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("itemnumber");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<itembarcodeidx>
+
+=over 4
+
+=item * L</barcode>
+
+=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<Koha::Schema::Result::Biblioitem>
+
+=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<Koha::Schema::Result::Issue>
-
-=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<Koha::Schema::Result::Biblioitem>
+Related object: L<Koha::Schema::Result::Branch>
 
 =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<Koha::Schema::Result::Branch>
+Related object: L<Koha::Schema::Result::Issue>
 
 =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
index 3e9f0d7..d7fdf31 100644 (file)
@@ -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<item_circulation_alert_preferences>
 
 =cut
 
@@ -63,11 +67,22 @@ __PACKAGE__->add_columns(
   "notification",
   { data_type => "varchar", is_nullable => 0, size => 16 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=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
index cc145b4..67f64c5 100644 (file)
@@ -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<itemtypes>
 
 =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</itemtype>
+
+=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
index ed4a7e0..aed9cb6 100644 (file)
@@ -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<language_descriptions>
 
 =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</id>
+
+=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
index 96e7462..0ec143c 100644 (file)
@@ -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<language_rfc4646_to_iso639>
 
 =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</id>
+
+=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
index dbaa010..7272374 100644 (file)
@@ -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<language_script_bidi>
 
 =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
index f216056..a43ecc0 100644 (file)
@@ -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<language_script_mapping>
 
 =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
index 809f3d2..b937802 100644 (file)
@@ -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<language_subtag_registry>
 
 =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</id>
+
+=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
index 447f84d..95345f7 100644 (file)
@@ -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<letter>
 
 =cut
 
@@ -83,6 +87,21 @@ __PACKAGE__->add_columns(
   "content",
   { data_type => "text", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</module>
+
+=item * L</code>
+
+=item * L</branchcode>
+
+=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
index 2b272f2..a1ca30a 100644 (file)
@@ -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<linktracker>
 
 =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</id>
+
+=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
index 5e77317..3f1750a 100644 (file)
@@ -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<marc_matchers>
 
 =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</matcher_id>
+
+=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
index 773bcb1..3054d8d 100644 (file)
@@ -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<marc_subfield_structure>
 
 =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</frameworkcode>
+
+=item * L</tagfield>
+
+=item * L</tagsubfield>
+
+=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
index 9cd74af..8873ef3 100644 (file)
@@ -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<marc_tag_structure>
 
 =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</frameworkcode>
+
+=item * L</tagfield>
+
+=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
index bb5a847..39b94f9 100644 (file)
@@ -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<matchchecks>
 
 =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</matchcheck_id>
+
+=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
index af3a136..42dfdf0 100644 (file)
@@ -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<matcher_matchpoints>
 
 =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
index 0f1bf69..3b85d9c 100644 (file)
@@ -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<matchpoints>
 
 =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</matchpoint_id>
+
+=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<Koha::Schema::Result::MarcMatcher>
+
+=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<Koha::Schema::Result::MarcMatcher>
-
-=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
index 2609a26..e3b2a65 100644 (file)
@@ -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<matchpoint_components>
 
 =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</matchpoint_component_id>
 
-Related object: L<Koha::Schema::Result::MatchpointComponentNorm>
+=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<Koha::Schema::Result::MatchpointComponentNorm>
+
+=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
index dafc46e..a885a7c 100644 (file)
@@ -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<matchpoint_component_norms>
 
 =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
index 218c1e3..d596cb4 100644 (file)
@@ -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<messages>
 
 =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</message_id>
+
+=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
index 34a091b..8fc01b3 100644 (file)
@@ -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<message_attributes>
 
 =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</message_attribute_id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("message_attribute_id");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<message_name>
+
+=over 4
+
+=item * L</message_name>
+
+=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
index 9e4ceda..417cd78 100644 (file)
@@ -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<message_queue>
 
 =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
index 0485bf4..3a2f9a9 100644 (file)
@@ -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<message_transports>
 
 =cut
 
@@ -96,10 +100,44 @@ __PACKAGE__->add_columns(
     size => 10,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</message_attribute_id>
+
+=item * L</message_transport_type>
+
+=item * L</is_digest>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("message_attribute_id", "message_transport_type", "is_digest");
 
 =head1 RELATIONS
 
+=head2 letter
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Letter>
+
+=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<Koha::Schema::Result::Letter>
-
-=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
index ed93cf4..8863a2d 100644 (file)
@@ -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<message_transport_types>
 
 =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</message_transport_type>
+
+=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_transport_preferences> -> 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
index 4e7eca6..2b491b7 100644 (file)
@@ -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<need_merge_authorities>
 
 =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</id>
+
+=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
index 82a3f45..9be1b2a 100644 (file)
@@ -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<notifys>
 
 =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
index c98d6d9..32897bf 100644 (file)
@@ -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<oai_sets>
 
 =cut
 
@@ -47,7 +51,31 @@ __PACKAGE__->add_columns(
   "name",
   { data_type => "varchar", is_nullable => 0, size => 80 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("id");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<spec>
+
+=over 4
+
+=item * L</spec>
+
+=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</oai_sets_biblios> -> 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
index 9f6811b..60aaead 100644 (file)
@@ -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<oai_sets_biblios>
 
 =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</biblionumber>
+
+=item * L</set_id>
+
+=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
index 3a81254..6134c02 100644 (file)
@@ -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<oai_sets_descriptions>
 
 =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
index 53b3f61..e4dd532 100644 (file)
@@ -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<oai_sets_mappings>
 
 =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
index 40c1bbc..4050f06 100644 (file)
@@ -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<old_issues>
 
 =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
index 384dbf3..84ba18c 100644 (file)
@@ -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<old_reserves>
 
 =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</reserve_id>
 
-Related object: L<Koha::Schema::Result::Borrower>
+=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<Koha::Schema::Result::Borrower>
+
+=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
index eafc7e1..a3be8e8 100644 (file)
@@ -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<opac_news>
 
 =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</idnew>
+
+=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
index be568fd..e985dd8 100644 (file)
@@ -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<overduerules>
 
 =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</branchcode>
+
+=item * L</categorycode>
+
+=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
index 9332cf3..454e958 100644 (file)
@@ -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<patroncards>
 
 =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</cardid>
+
+=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
index 8b1cb4d..8feb4a0 100644 (file)
@@ -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<patronimage>
 
 =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</borrowernumber>
+
+=back
+
+=cut
+
+__PACKAGE__->set_primary_key("borrowernumber");
 
 =head1 RELATIONS
 
-=head2 cardnumber
+=head2 borrowernumber
 
 Type: belongs_to
 
@@ -60,15 +74,15 @@ Related object: L<Koha::Schema::Result::Borrower>
 =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
index b5ba9c7..969d380 100644 (file)
@@ -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<pending_offline_operations>
 
 =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</operationid>
+
+=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
index 6a356e5..e2444ee 100644 (file)
@@ -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<permissions>
 
 =cut
 
@@ -54,6 +58,19 @@ __PACKAGE__->add_columns(
   "description",
   { data_type => "varchar", is_nullable => 1, size => 255 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</module_bit>
+
+=item * L</code>
+
+=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
index 9e5dcab..869e450 100644 (file)
@@ -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<plugin_data>
 
 =cut
 
@@ -46,11 +50,24 @@ __PACKAGE__->add_columns(
   "plugin_value",
   { data_type => "text", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</plugin_class>
+
+=item * L</plugin_key>
+
+=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
index 6849ab4..7386f2a 100644 (file)
@@ -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<printers>
 
 =cut
 
@@ -48,11 +52,22 @@ __PACKAGE__->add_columns(
   "printtype",
   { data_type => "varchar", is_nullable => 1, size => 20 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</printername>
+
+=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
index 69d8eb0..b02f027 100644 (file)
@@ -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<printers_profile>
 
 =cut
 
@@ -122,15 +126,45 @@ __PACKAGE__->add_columns(
     size => 15,
   },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</profile_id>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("profile_id");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<printername>
+
+=over 4
+
+=item * L</printer_name>
+
+=item * L</template_id>
+
+=item * L</paper_bin>
+
+=item * L</creator>
+
+=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
index 521274a..2f34bb2 100644 (file)
@@ -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<quotes>
 
 =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</id>
+
+=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
index 1782f7e..a8fe6e4 100644 (file)
@@ -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<ratings>
 
 =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</borrowernumber>
 
-Related object: L<Koha::Schema::Result::Borrower>
+=item * L</biblionumber>
+
+=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<Koha::Schema::Result::Borrower>
+
+=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
index 304ec0e..4451513 100644 (file)
@@ -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<repeatable_holidays>
 
 =cut
 
@@ -77,11 +81,22 @@ __PACKAGE__->add_columns(
   "description",
   { data_type => "text", is_nullable => 0 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=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
index b6f64c2..de433a5 100644 (file)
@@ -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<reports_dictionary>
 
 =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</id>
+
+=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
index b85f8f8..527651d 100644 (file)
@@ -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<reserves>
 
 =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</reserve_id>
 
-Related object: L<Koha::Schema::Result::Borrower>
+=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<Koha::Schema::Result::Item>
+Related object: L<Koha::Schema::Result::Borrower>
 
 =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<Koha::Schema::Result::Item>
+
+=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
index a5da942..69d7a2b 100644 (file)
@@ -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<reserveconstraints>
 
 =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
index 4eb6301..37b822d 100644 (file)
@@ -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<reviews>
 
 =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</reviewid>
 
-Related object: L<Koha::Schema::Result::Borrower>
+=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<Koha::Schema::Result::Borrower>
+
+=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
index 3fc4da6..f4b20f8 100644 (file)
@@ -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<roadtype>
 
 =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</roadtypeid>
+
+=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
index a2a2329..a5d8ca4 100644 (file)
@@ -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<saved_reports>
 
 =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</id>
+
+=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
index 076a064..d878034 100644 (file)
@@ -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<saved_sql>
 
 =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</id>
+
+=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
index f27fc80..224d9f0 100644 (file)
@@ -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<search_history>
 
 =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
index 7284ed2..c3f711e 100644 (file)
@@ -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<serial>
 
 =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</serialid>
+
+=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
index fc23ea5..6f805d3 100644 (file)
@@ -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<serialitems>
 
 =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<serialitemsidx>
 
-Type: belongs_to
+=over 4
 
-Related object: L<Koha::Schema::Result::Serial>
+=item * L</itemnumber>
+
+=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<Koha::Schema::Result::Serial>
+
+=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
index 38d02d8..d9e34e4 100644 (file)
@@ -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<services_throttle>
 
 =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</service_type>
+
+=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
index 06aecaa..bbbe5a6 100644 (file)
@@ -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<sessions>
 
 =cut
 
@@ -38,11 +42,22 @@ __PACKAGE__->add_columns(
   "a_session",
   { data_type => "text", is_nullable => 0 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=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
index ad402f3..b21e508 100644 (file)
@@ -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<social_data>
 
 =cut
 
@@ -75,11 +79,22 @@ __PACKAGE__->add_columns(
   "num_scores",
   { data_type => "integer", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</isbn>
+
+=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
index 8be58c3..45f884f 100644 (file)
@@ -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<special_holidays>
 
 =cut
 
@@ -88,11 +92,22 @@ __PACKAGE__->add_columns(
   "description",
   { data_type => "text", is_nullable => 0 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</id>
+
+=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
index d2ffd16..d6fd976 100644 (file)
@@ -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<statistics>
 
 =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
index 25f51d0..2fd88b6 100644 (file)
@@ -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<stopwords>
 
 =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
index 752f8ba..77fde73 100644 (file)
@@ -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<subscription>
 
 =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</subscriptionid>
+
+=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
index 471dc52..b15044a 100644 (file)
@@ -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<subscriptionhistory>
 
 =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</subscriptionid>
+
+=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
index 64a9ad7..7741142 100644 (file)
@@ -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<subscriptionroutinglist>
 
 =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</routingid>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("routingid");
+
+=head1 UNIQUE CONSTRAINTS
+
+=head2 C<subscriptionid>
+
+=over 4
+
+=item * L</subscriptionid>
+
+=item * L</borrowernumber>
+
+=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
index 638bf94..5e394fc 100644 (file)
@@ -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<suggestions>
 
 =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</suggestionid>
+
+=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
index 27f115a..ef05bd8 100644 (file)
@@ -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<systempreferences>
 
 =cut
 
@@ -61,11 +65,22 @@ __PACKAGE__->add_columns(
   "type",
   { data_type => "varchar", is_nullable => 1, size => 20 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</variable>
+
+=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
index 37d6aaf..321d2e9 100644 (file)
@@ -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<tags>
 
 =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</entry>
+
+=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
index efeb2f3..ca1a470 100644 (file)
@@ -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<tags_all>
 
 =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</tag_id>
 
-Related object: L<Koha::Schema::Result::Borrower>
+=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<Koha::Schema::Result::Borrower>
+
+=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
index 28d6b2e..50abeb2 100644 (file)
@@ -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<tags_approval>
 
 =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</term>
+
+=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
index af08b8c..49d2c1b 100644 (file)
@@ -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<tags_index>
 
 =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</term>
 
-Related object: L<Koha::Schema::Result::TagsApproval>
+=item * L</biblionumber>
+
+=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<Koha::Schema::Result::TagsApproval>
+
+=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
index 8373ed4..9f2a8e4 100644 (file)
@@ -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<tmp_holdsqueue>
 
 =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
index 135988e..9defb97 100644 (file)
@@ -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<transport_cost>
 
 =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</frombranch>
+
+=item * L</tobranch>
+
+=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
index bec2856..948c2e1 100644 (file)
@@ -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<user_permissions>
 
 =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
index f8ef9e8..7ece4a6 100644 (file)
@@ -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<userflags>
 
 =cut
 
@@ -54,6 +58,17 @@ __PACKAGE__->add_columns(
   "defaulton",
   { data_type => "integer", is_nullable => 1 },
 );
+
+=head1 PRIMARY KEY
+
+=over 4
+
+=item * L</bit>
+
+=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
index f1f35c3..dfb8d46 100644 (file)
@@ -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<virtualshelfcontents>
 
 =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<Koha::Schema::Result::Virtualshelve>
-
-=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<Koha::Schema::Result::Virtualshelve>
+
+=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
index 7e0a985..93aa7dd 100644 (file)
@@ -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<virtualshelfshares>
 
 =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</id>
 
-Related object: L<Koha::Schema::Result::Virtualshelve>
+=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<Koha::Schema::Result::Virtualshelve>
+
+=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
index c28cc36..fa4759d 100644 (file)
@@ -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<virtualshelves>
 
 =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</shelfnumber>
+
+=back
+
+=cut
+
 __PACKAGE__->set_primary_key("shelfnumber");
 
 =head1 RELATIONS
 
+=head2 owner
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::Borrower>
+
+=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<Koha::Schema::Result::Borrower>
-
-=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
index 48e6747..a185f57 100644 (file)
@@ -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<z3950servers>
 
 =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</id>
+
+=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
index 6620144..25e6bf9 100644 (file)
@@ -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<zebraqueue>
 
 =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</id>
+
+=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