Bug 24476: Add boolean for TINYINT
[koha-ffzg.git] / Koha / Schema / Result / Borrower.pm
index 67642d1..0d2829d 100644 (file)
@@ -33,31 +33,31 @@ __PACKAGE__->table("borrowers");
 
   data_type: 'varchar'
   is_nullable: 1
-  size: 16
+  size: 32
 
 =head2 surname
 
-  data_type: 'mediumtext'
-  is_nullable: 0
+  data_type: 'longtext'
+  is_nullable: 1
 
 =head2 firstname
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 title
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 othernames
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 initials
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 streetnumber
@@ -74,22 +74,22 @@ __PACKAGE__->table("borrowers");
 
 =head2 address
 
-  data_type: 'mediumtext'
-  is_nullable: 0
+  data_type: 'longtext'
+  is_nullable: 1
 
 =head2 address2
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 city
 
-  data_type: 'mediumtext'
-  is_nullable: 0
+  data_type: 'longtext'
+  is_nullable: 1
 
 =head2 state
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 zipcode
@@ -100,17 +100,17 @@ __PACKAGE__->table("borrowers");
 
 =head2 country
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 email
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 phone
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 mobile
@@ -121,71 +121,81 @@ __PACKAGE__->table("borrowers");
 
 =head2 fax
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 emailpro
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 phonepro
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
-=head2 b_streetnumber
+=head2 B_streetnumber
 
+  accessor: 'b_streetnumber'
   data_type: 'varchar'
   is_nullable: 1
   size: 10
 
-=head2 b_streettype
+=head2 B_streettype
 
+  accessor: 'b_streettype'
   data_type: 'varchar'
   is_nullable: 1
   size: 50
 
-=head2 b_address
+=head2 B_address
 
+  accessor: 'b_address'
   data_type: 'varchar'
   is_nullable: 1
   size: 100
 
-=head2 b_address2
+=head2 B_address2
 
-  data_type: 'text'
+  accessor: 'b_address2'
+  data_type: 'mediumtext'
   is_nullable: 1
 
-=head2 b_city
+=head2 B_city
 
-  data_type: 'mediumtext'
+  accessor: 'b_city'
+  data_type: 'longtext'
   is_nullable: 1
 
-=head2 b_state
+=head2 B_state
 
-  data_type: 'text'
+  accessor: 'b_state'
+  data_type: 'mediumtext'
   is_nullable: 1
 
-=head2 b_zipcode
+=head2 B_zipcode
 
+  accessor: 'b_zipcode'
   data_type: 'varchar'
   is_nullable: 1
   size: 25
 
-=head2 b_country
+=head2 B_country
 
-  data_type: 'text'
+  accessor: 'b_country'
+  data_type: 'mediumtext'
   is_nullable: 1
 
-=head2 b_email
+=head2 B_email
 
-  data_type: 'text'
+  accessor: 'b_email'
+  data_type: 'mediumtext'
   is_nullable: 1
 
-=head2 b_phone
+=head2 B_phone
 
-  data_type: 'mediumtext'
+  accessor: 'b_phone'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 dateofbirth
@@ -222,6 +232,12 @@ __PACKAGE__->table("borrowers");
   datetime_undef_if_invalid: 1
   is_nullable: 1
 
+=head2 date_renewed
+
+  data_type: 'date'
+  datetime_undef_if_invalid: 1
+  is_nullable: 1
+
 =head2 gonenoaddress
 
   data_type: 'tinyint'
@@ -246,27 +262,22 @@ __PACKAGE__->table("borrowers");
 
 =head2 contactname
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 contactfirstname
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 contacttitle
 
-  data_type: 'text'
-  is_nullable: 1
-
-=head2 guarantorid
-
-  data_type: 'integer'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 borrowernotes
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 relationship
@@ -275,18 +286,6 @@ __PACKAGE__->table("borrowers");
   is_nullable: 1
   size: 100
 
-=head2 ethnicity
-
-  data_type: 'varchar'
-  is_nullable: 1
-  size: 50
-
-=head2 ethnotes
-
-  data_type: 'varchar'
-  is_nullable: 1
-  size: 255
-
 =head2 sex
 
   data_type: 'varchar'
@@ -312,7 +311,7 @@ __PACKAGE__->table("borrowers");
 
 =head2 opacnote
 
-  data_type: 'mediumtext'
+  data_type: 'longtext'
   is_nullable: 1
 
 =head2 contactnote
@@ -365,7 +364,7 @@ __PACKAGE__->table("borrowers");
 
 =head2 altcontactstate
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 altcontactzipcode
@@ -376,7 +375,7 @@ __PACKAGE__->table("borrowers");
 
 =head2 altcontactcountry
 
-  data_type: 'text'
+  data_type: 'mediumtext'
   is_nullable: 1
 
 =head2 altcontactphone
@@ -391,77 +390,165 @@ __PACKAGE__->table("borrowers");
   is_nullable: 1
   size: 50
 
+=head2 sms_provider_id
+
+  data_type: 'integer'
+  is_foreign_key: 1
+  is_nullable: 1
+
 =head2 privacy
 
   data_type: 'integer'
   default_value: 1
   is_nullable: 0
 
+=head2 privacy_guarantor_fines
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
+=head2 privacy_guarantor_checkouts
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
+=head2 checkprevcheckout
+
+  data_type: 'varchar'
+  default_value: 'inherit'
+  is_nullable: 0
+  size: 7
+
+=head2 updated_on
+
+  data_type: 'timestamp'
+  datetime_undef_if_invalid: 1
+  default_value: 'current_timestamp()'
+  is_nullable: 0
+
+=head2 lastseen
+
+  data_type: 'datetime'
+  datetime_undef_if_invalid: 1
+  is_nullable: 1
+
+=head2 lang
+
+  data_type: 'varchar'
+  default_value: 'default'
+  is_nullable: 0
+  size: 25
+
+=head2 login_attempts
+
+  data_type: 'integer'
+  default_value: 0
+  is_nullable: 1
+
+=head2 overdrive_auth_token
+
+  data_type: 'mediumtext'
+  is_nullable: 1
+
+=head2 anonymized
+
+  data_type: 'tinyint'
+  default_value: 0
+  is_nullable: 0
+
+=head2 autorenew_checkouts
+
+  data_type: 'tinyint'
+  default_value: 1
+  is_nullable: 0
+
 =cut
 
 __PACKAGE__->add_columns(
   "borrowernumber",
   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
   "cardnumber",
-  { data_type => "varchar", is_nullable => 1, size => 16 },
+  { data_type => "varchar", is_nullable => 1, size => 32 },
   "surname",
-  { data_type => "mediumtext", is_nullable => 0 },
+  { data_type => "longtext", is_nullable => 1 },
   "firstname",
-  { data_type => "text", is_nullable => 1 },
-  "title",
   { data_type => "mediumtext", is_nullable => 1 },
+  "title",
+  { data_type => "longtext", is_nullable => 1 },
   "othernames",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "initials",
-  { data_type => "text", is_nullable => 1 },
+  { data_type => "mediumtext", is_nullable => 1 },
   "streetnumber",
   { data_type => "varchar", is_nullable => 1, size => 10 },
   "streettype",
   { data_type => "varchar", is_nullable => 1, size => 50 },
   "address",
-  { data_type => "mediumtext", is_nullable => 0 },
+  { data_type => "longtext", is_nullable => 1 },
   "address2",
-  { data_type => "text", is_nullable => 1 },
+  { data_type => "mediumtext", is_nullable => 1 },
   "city",
-  { data_type => "mediumtext", is_nullable => 0 },
+  { data_type => "longtext", is_nullable => 1 },
   "state",
-  { data_type => "text", is_nullable => 1 },
+  { data_type => "mediumtext", is_nullable => 1 },
   "zipcode",
   { data_type => "varchar", is_nullable => 1, size => 25 },
   "country",
-  { data_type => "text", is_nullable => 1 },
-  "email",
   { data_type => "mediumtext", is_nullable => 1 },
+  "email",
+  { data_type => "longtext", is_nullable => 1 },
   "phone",
-  { data_type => "text", is_nullable => 1 },
+  { data_type => "mediumtext", is_nullable => 1 },
   "mobile",
   { data_type => "varchar", is_nullable => 1, size => 50 },
   "fax",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "emailpro",
-  { data_type => "text", is_nullable => 1 },
-  "phonepro",
-  { data_type => "text", is_nullable => 1 },
-  "b_streetnumber",
-  { data_type => "varchar", is_nullable => 1, size => 10 },
-  "b_streettype",
-  { data_type => "varchar", is_nullable => 1, size => 50 },
-  "b_address",
-  { data_type => "varchar", is_nullable => 1, size => 100 },
-  "b_address2",
-  { data_type => "text", is_nullable => 1 },
-  "b_city",
   { data_type => "mediumtext", is_nullable => 1 },
-  "b_state",
-  { data_type => "text", is_nullable => 1 },
-  "b_zipcode",
-  { data_type => "varchar", is_nullable => 1, size => 25 },
-  "b_country",
-  { data_type => "text", is_nullable => 1 },
-  "b_email",
-  { data_type => "text", is_nullable => 1 },
-  "b_phone",
+  "phonepro",
   { data_type => "mediumtext", is_nullable => 1 },
+  "B_streetnumber",
+  {
+    accessor => "b_streetnumber",
+    data_type => "varchar",
+    is_nullable => 1,
+    size => 10,
+  },
+  "B_streettype",
+  {
+    accessor => "b_streettype",
+    data_type => "varchar",
+    is_nullable => 1,
+    size => 50,
+  },
+  "B_address",
+  {
+    accessor => "b_address",
+    data_type => "varchar",
+    is_nullable => 1,
+    size => 100,
+  },
+  "B_address2",
+  { accessor => "b_address2", data_type => "mediumtext", is_nullable => 1 },
+  "B_city",
+  { accessor => "b_city", data_type => "longtext", is_nullable => 1 },
+  "B_state",
+  { accessor => "b_state", data_type => "mediumtext", is_nullable => 1 },
+  "B_zipcode",
+  {
+    accessor => "b_zipcode",
+    data_type => "varchar",
+    is_nullable => 1,
+    size => 25,
+  },
+  "B_country",
+  { accessor => "b_country", data_type => "mediumtext", is_nullable => 1 },
+  "B_email",
+  { accessor => "b_email", data_type => "mediumtext", is_nullable => 1 },
+  "B_phone",
+  { accessor => "b_phone", data_type => "longtext", is_nullable => 1 },
   "dateofbirth",
   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
   "branchcode",
@@ -484,6 +571,8 @@ __PACKAGE__->add_columns(
   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
   "dateexpiry",
   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
+  "date_renewed",
+  { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
   "gonenoaddress",
   { data_type => "tinyint", is_nullable => 1 },
   "lost",
@@ -493,21 +582,15 @@ __PACKAGE__->add_columns(
   "debarredcomment",
   { data_type => "varchar", is_nullable => 1, size => 255 },
   "contactname",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "contactfirstname",
-  { data_type => "text", is_nullable => 1 },
+  { data_type => "mediumtext", is_nullable => 1 },
   "contacttitle",
-  { data_type => "text", is_nullable => 1 },
-  "guarantorid",
-  { data_type => "integer", is_nullable => 1 },
-  "borrowernotes",
   { data_type => "mediumtext", is_nullable => 1 },
+  "borrowernotes",
+  { data_type => "longtext", is_nullable => 1 },
   "relationship",
   { data_type => "varchar", is_nullable => 1, size => 100 },
-  "ethnicity",
-  { data_type => "varchar", is_nullable => 1, size => 50 },
-  "ethnotes",
-  { data_type => "varchar", is_nullable => 1, size => 255 },
   "sex",
   { data_type => "varchar", is_nullable => 1, size => 1 },
   "password",
@@ -517,7 +600,7 @@ __PACKAGE__->add_columns(
   "userid",
   { data_type => "varchar", is_nullable => 1, size => 75 },
   "opacnote",
-  { data_type => "mediumtext", is_nullable => 1 },
+  { data_type => "longtext", is_nullable => 1 },
   "contactnote",
   { data_type => "varchar", is_nullable => 1, size => 255 },
   "sort1",
@@ -535,17 +618,58 @@ __PACKAGE__->add_columns(
   "altcontactaddress3",
   { data_type => "varchar", is_nullable => 1, size => 255 },
   "altcontactstate",
-  { data_type => "text", is_nullable => 1 },
+  { data_type => "mediumtext", is_nullable => 1 },
   "altcontactzipcode",
   { data_type => "varchar", is_nullable => 1, size => 50 },
   "altcontactcountry",
-  { data_type => "text", is_nullable => 1 },
+  { data_type => "mediumtext", is_nullable => 1 },
   "altcontactphone",
   { data_type => "varchar", is_nullable => 1, size => 50 },
   "smsalertnumber",
   { data_type => "varchar", is_nullable => 1, size => 50 },
+  "sms_provider_id",
+  { data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
   "privacy",
   { data_type => "integer", default_value => 1, is_nullable => 0 },
+  "privacy_guarantor_fines",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "privacy_guarantor_checkouts",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "checkprevcheckout",
+  {
+    data_type => "varchar",
+    default_value => "inherit",
+    is_nullable => 0,
+    size => 7,
+  },
+  "updated_on",
+  {
+    data_type => "timestamp",
+    datetime_undef_if_invalid => 1,
+    default_value => "current_timestamp()",
+    is_nullable => 0,
+  },
+  "lastseen",
+  {
+    data_type => "datetime",
+    datetime_undef_if_invalid => 1,
+    is_nullable => 1,
+  },
+  "lang",
+  {
+    data_type => "varchar",
+    default_value => "default",
+    is_nullable => 0,
+    size => 25,
+  },
+  "login_attempts",
+  { data_type => "integer", default_value => 0, is_nullable => 1 },
+  "overdrive_auth_token",
+  { data_type => "mediumtext", is_nullable => 1 },
+  "anonymized",
+  { data_type => "tinyint", default_value => 0, is_nullable => 0 },
+  "autorenew_checkouts",
+  { data_type => "tinyint", default_value => 1, is_nullable => 0 },
 );
 
 =head1 PRIMARY KEY
@@ -574,6 +698,18 @@ __PACKAGE__->set_primary_key("borrowernumber");
 
 __PACKAGE__->add_unique_constraint("cardnumber", ["cardnumber"]);
 
+=head2 C<userid>
+
+=over 4
+
+=item * L</userid>
+
+=back
+
+=cut
+
+__PACKAGE__->add_unique_constraint("userid", ["userid"]);
+
 =head1 RELATIONS
 
 =head2 accountlines
@@ -591,17 +727,47 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
-=head2 accountoffsets
+=head2 accountlines_managers
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Accountline>
+
+=cut
+
+__PACKAGE__->has_many(
+  "accountlines_managers",
+  "Koha::Schema::Result::Accountline",
+  { "foreign.manager_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 api_keys
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ApiKey>
+
+=cut
+
+__PACKAGE__->has_many(
+  "api_keys",
+  "Koha::Schema::Result::ApiKey",
+  { "foreign.patron_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 aqbasketusers
 
 Type: has_many
 
-Related object: L<Koha::Schema::Result::Accountoffset>
+Related object: L<Koha::Schema::Result::Aqbasketuser>
 
 =cut
 
 __PACKAGE__->has_many(
-  "accountoffsets",
-  "Koha::Schema::Result::Accountoffset",
+  "aqbasketusers",
+  "Koha::Schema::Result::Aqbasketuser",
   { "foreign.borrowernumber" => "self.borrowernumber" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
@@ -621,6 +787,51 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 aqorder_users
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::AqorderUser>
+
+=cut
+
+__PACKAGE__->has_many(
+  "aqorder_users",
+  "Koha::Schema::Result::AqorderUser",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 aqorders
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Aqorder>
+
+=cut
+
+__PACKAGE__->has_many(
+  "aqorders",
+  "Koha::Schema::Result::Aqorder",
+  { "foreign.created_by" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 article_requests
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ArticleRequest>
+
+=cut
+
+__PACKAGE__->has_many(
+  "article_requests",
+  "Koha::Schema::Result::ArticleRequest",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 borrower_attributes
 
 Type: has_many
@@ -681,6 +892,36 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 borrower_relationships_guarantees
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::BorrowerRelationship>
+
+=cut
+
+__PACKAGE__->has_many(
+  "borrower_relationships_guarantees",
+  "Koha::Schema::Result::BorrowerRelationship",
+  { "foreign.guarantee_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 borrower_relationships_guarantors
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::BorrowerRelationship>
+
+=cut
+
+__PACKAGE__->has_many(
+  "borrower_relationships_guarantors",
+  "Koha::Schema::Result::BorrowerRelationship",
+  { "foreign.guarantor_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 branchcode
 
 Type: belongs_to
@@ -693,7 +934,22 @@ __PACKAGE__->belongs_to(
   "branchcode",
   "Koha::Schema::Result::Branch",
   { branchcode => "branchcode" },
-  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
+  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
+);
+
+=head2 cash_register_actions
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::CashRegisterAction>
+
+=cut
+
+__PACKAGE__->has_many(
+  "cash_register_actions",
+  "Koha::Schema::Result::CashRegisterAction",
+  { "foreign.manager_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
 );
 
 =head2 categorycode
@@ -708,7 +964,37 @@ __PACKAGE__->belongs_to(
   "categorycode",
   "Koha::Schema::Result::Category",
   { categorycode => "categorycode" },
-  { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
+  { is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
+);
+
+=head2 club_enrollments
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ClubEnrollment>
+
+=cut
+
+__PACKAGE__->has_many(
+  "club_enrollments",
+  "Koha::Schema::Result::ClubEnrollment",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 club_holds_to_patron_holds
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ClubHoldsToPatronHold>
+
+=cut
+
+__PACKAGE__->has_many(
+  "club_holds_to_patron_holds",
+  "Koha::Schema::Result::ClubHoldsToPatronHold",
+  { "foreign.patron_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
 );
 
 =head2 course_instructors
@@ -741,6 +1027,21 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 discharges
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Discharge>
+
+=cut
+
+__PACKAGE__->has_many(
+  "discharges",
+  "Koha::Schema::Result::Discharge",
+  { "foreign.borrower" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 hold_fill_targets
 
 Type: has_many
@@ -756,6 +1057,96 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 housebound_profile
+
+Type: might_have
+
+Related object: L<Koha::Schema::Result::HouseboundProfile>
+
+=cut
+
+__PACKAGE__->might_have(
+  "housebound_profile",
+  "Koha::Schema::Result::HouseboundProfile",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 housebound_role
+
+Type: might_have
+
+Related object: L<Koha::Schema::Result::HouseboundRole>
+
+=cut
+
+__PACKAGE__->might_have(
+  "housebound_role",
+  "Koha::Schema::Result::HouseboundRole",
+  { "foreign.borrowernumber_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 housebound_visit_chooser_brwnumbers
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::HouseboundVisit>
+
+=cut
+
+__PACKAGE__->has_many(
+  "housebound_visit_chooser_brwnumbers",
+  "Koha::Schema::Result::HouseboundVisit",
+  { "foreign.chooser_brwnumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 housebound_visit_deliverer_brwnumbers
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::HouseboundVisit>
+
+=cut
+
+__PACKAGE__->has_many(
+  "housebound_visit_deliverer_brwnumbers",
+  "Koha::Schema::Result::HouseboundVisit",
+  { "foreign.deliverer_brwnumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 illcomments
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Illcomment>
+
+=cut
+
+__PACKAGE__->has_many(
+  "illcomments",
+  "Koha::Schema::Result::Illcomment",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 illrequests
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Illrequest>
+
+=cut
+
+__PACKAGE__->has_many(
+  "illrequests",
+  "Koha::Schema::Result::Illrequest",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 issues
 
 Type: has_many
@@ -771,6 +1162,21 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 items_last_borrowers
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ItemsLastBorrower>
+
+=cut
+
+__PACKAGE__->has_many(
+  "items_last_borrowers",
+  "Koha::Schema::Result::ItemsLastBorrower",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 message_queues
 
 Type: has_many
@@ -786,6 +1192,36 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 messages
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Message>
+
+=cut
+
+__PACKAGE__->has_many(
+  "messages",
+  "Koha::Schema::Result::Message",
+  { "foreign.manager_id" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 messages_borrowernumbers
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Message>
+
+=cut
+
+__PACKAGE__->has_many(
+  "messages_borrowernumbers",
+  "Koha::Schema::Result::Message",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 old_issues
 
 Type: has_many
@@ -816,51 +1252,66 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
-=head2 patron_list_patrons
+=head2 opac_news
 
 Type: has_many
 
-Related object: L<Koha::Schema::Result::PatronListPatron>
+Related object: L<Koha::Schema::Result::OpacNews>
 
 =cut
 
 __PACKAGE__->has_many(
-  "patron_list_patrons",
-  "Koha::Schema::Result::PatronListPatron",
+  "opac_news",
+  "Koha::Schema::Result::OpacNews",
   { "foreign.borrowernumber" => "self.borrowernumber" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
-=head2 patron_lists
+=head2 patron_consents
 
 Type: has_many
 
-Related object: L<Koha::Schema::Result::PatronList>
+Related object: L<Koha::Schema::Result::PatronConsent>
 
 =cut
 
 __PACKAGE__->has_many(
-  "patron_lists",
-  "Koha::Schema::Result::PatronList",
-  { "foreign.owner" => "self.borrowernumber" },
+  "patron_consents",
+  "Koha::Schema::Result::PatronConsent",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
-=head2 patroncards
+=head2 patron_list_patrons
 
 Type: has_many
 
-Related object: L<Koha::Schema::Result::Patroncard>
+Related object: L<Koha::Schema::Result::PatronListPatron>
 
 =cut
 
 __PACKAGE__->has_many(
-  "patroncards",
-  "Koha::Schema::Result::Patroncard",
+  "patron_list_patrons",
+  "Koha::Schema::Result::PatronListPatron",
   { "foreign.borrowernumber" => "self.borrowernumber" },
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 patron_lists
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::PatronList>
+
+=cut
+
+__PACKAGE__->has_many(
+  "patron_lists",
+  "Koha::Schema::Result::PatronList",
+  { "foreign.owner" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 patronimage
 
 Type: might_have
@@ -906,6 +1357,66 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 return_claims_borrowernumbers
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ReturnClaim>
+
+=cut
+
+__PACKAGE__->has_many(
+  "return_claims_borrowernumbers",
+  "Koha::Schema::Result::ReturnClaim",
+  { "foreign.borrowernumber" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 return_claims_created_by
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ReturnClaim>
+
+=cut
+
+__PACKAGE__->has_many(
+  "return_claims_created_by",
+  "Koha::Schema::Result::ReturnClaim",
+  { "foreign.created_by" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 return_claims_resolved_by
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ReturnClaim>
+
+=cut
+
+__PACKAGE__->has_many(
+  "return_claims_resolved_by",
+  "Koha::Schema::Result::ReturnClaim",
+  { "foreign.resolved_by" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 return_claims_updated_by
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::ReturnClaim>
+
+=cut
+
+__PACKAGE__->has_many(
+  "return_claims_updated_by",
+  "Koha::Schema::Result::ReturnClaim",
+  { "foreign.updated_by" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 reviews
 
 Type: has_many
@@ -921,6 +1432,26 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 sms_provider
+
+Type: belongs_to
+
+Related object: L<Koha::Schema::Result::SmsProvider>
+
+=cut
+
+__PACKAGE__->belongs_to(
+  "sms_provider",
+  "Koha::Schema::Result::SmsProvider",
+  { id => "sms_provider_id" },
+  {
+    is_deferrable => 1,
+    join_type     => "LEFT",
+    on_delete     => "SET NULL",
+    on_update     => "CASCADE",
+  },
+);
+
 =head2 subscriptionroutinglists
 
 Type: has_many
@@ -936,6 +1467,66 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 suggestions_acceptedbies
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Suggestion>
+
+=cut
+
+__PACKAGE__->has_many(
+  "suggestions_acceptedbies",
+  "Koha::Schema::Result::Suggestion",
+  { "foreign.acceptedby" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 suggestions_managedbies
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Suggestion>
+
+=cut
+
+__PACKAGE__->has_many(
+  "suggestions_managedbies",
+  "Koha::Schema::Result::Suggestion",
+  { "foreign.managedby" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 suggestions_rejectedbies
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Suggestion>
+
+=cut
+
+__PACKAGE__->has_many(
+  "suggestions_rejectedbies",
+  "Koha::Schema::Result::Suggestion",
+  { "foreign.rejectedby" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
+=head2 suggestions_suggestedbies
+
+Type: has_many
+
+Related object: L<Koha::Schema::Result::Suggestion>
+
+=cut
+
+__PACKAGE__->has_many(
+  "suggestions_suggestedbies",
+  "Koha::Schema::Result::Suggestion",
+  { "foreign.suggestedby" => "self.borrowernumber" },
+  { cascade_copy => 0, cascade_delete => 0 },
+);
+
 =head2 tags_all
 
 Type: has_many
@@ -1026,6 +1617,16 @@ __PACKAGE__->has_many(
   { cascade_copy => 0, cascade_delete => 0 },
 );
 
+=head2 basketnoes
+
+Type: many_to_many
+
+Composing rels: L</aqbasketusers> -> basketno
+
+=cut
+
+__PACKAGE__->many_to_many("basketnoes", "aqbasketusers", "basketno");
+
 =head2 budgets
 
 Type: many_to_many
@@ -1046,10 +1647,33 @@ Composing rels: L</course_instructors> -> course
 
 __PACKAGE__->many_to_many("courses", "course_instructors", "course");
 
+=head2 ordernumbers
+
+Type: many_to_many
+
+Composing rels: L</aqorder_users> -> ordernumber
 
-# Created by DBIx::Class::Schema::Loader v0.07025 @ 2013-10-31 01:30:23
-# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eZfDBeShjI29Q8P6Z8CQNA
+=cut
+
+__PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber");
+
+
+# Created by DBIx::Class::Schema::Loader v0.07046 @ 2020-03-23 11:45:25
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:SkCqcE0Wpja6r/hZ0yZLNA
+
+__PACKAGE__->add_columns(
+    '+anonymized'    => { is_boolean => 1 },
+    '+lost'          => { is_boolean => 1 },
+    '+gonenoaddress' => { is_boolean => 1 },
+    '+privacy_guarantor_fines' => { is_boolean => 1 },
+    '+autorenew_checkouts' => { is_boolean => 1 }
+);
 
+sub koha_objects_class {
+    'Koha::Patrons';
+}
+sub koha_object_class {
+    'Koha::Patron';
+}
 
-# You can replace this text with custom content, and it will be preserved on regeneration
 1;