From 83e75e667a2f58b78cc4a503be89230a9c1f9146 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 21 Mar 2022 10:57:04 +0100 Subject: [PATCH] Bug 28786: DBIC schema --- Koha/Schema/Result/Borrower.pm | 29 +++++++++++++++++++++++++-- Koha/Schema/Result/Deletedborrower.pm | 29 +++++++++++++++++++++++++-- Koha/Schema/Result/Recall.pm | 10 ++++----- 3 files changed, 58 insertions(+), 10 deletions(-) diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index d2b5c6015fe..e3e7740f074 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -386,6 +386,22 @@ patron/borrower's gender patron/borrower's Bcrypt encrypted password +=head2 secret + + data_type: 'mediumtext' + is_nullable: 1 + +Secret for 2FA + +=head2 auth_method + + data_type: 'enum' + default_value: 'password' + extra: {list => ["password","two-factor"]} + is_nullable: 0 + +Authentication method + =head2 flags data_type: 'integer' @@ -720,6 +736,15 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 1 }, "password", { data_type => "varchar", is_nullable => 1, size => 60 }, + "secret", + { data_type => "mediumtext", is_nullable => 1 }, + "auth_method", + { + data_type => "enum", + default_value => "password", + extra => { list => ["password", "two-factor"] }, + is_nullable => 0, + }, "flags", { data_type => "integer", is_nullable => 1 }, "userid", @@ -1930,8 +1955,8 @@ Composing rels: L -> permission __PACKAGE__->many_to_many("permissions", "user_permissions", "permission"); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-15 06:51:43 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ozDOfb67H7/GHLI0o4DdyA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-21 09:55:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:S06iXy+eYMq2qEkE4MhK4Q __PACKAGE__->has_many( "extended_attributes", diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm index f0d7395d8dd..f6fdbc06e6c 100644 --- a/Koha/Schema/Result/Deletedborrower.pm +++ b/Koha/Schema/Result/Deletedborrower.pm @@ -384,6 +384,22 @@ patron/borrower's gender patron/borrower's encrypted password +=head2 secret + + data_type: 'mediumtext' + is_nullable: 1 + +Secret for 2FA + +=head2 auth_method + + data_type: 'enum' + default_value: 'password' + extra: {list => ["password","two-factor"]} + is_nullable: 0 + +Authentication method + =head2 flags data_type: 'integer' @@ -705,6 +721,15 @@ __PACKAGE__->add_columns( { data_type => "varchar", is_nullable => 1, size => 1 }, "password", { data_type => "varchar", is_nullable => 1, size => 60 }, + "secret", + { data_type => "mediumtext", is_nullable => 1 }, + "auth_method", + { + data_type => "enum", + default_value => "password", + extra => { list => ["password", "two-factor"] }, + is_nullable => 0, + }, "flags", { data_type => "integer", is_nullable => 1 }, "userid", @@ -785,8 +810,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2021-07-12 13:40:00 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:9q8LmKrfO6bAAFaJ4Z3Jrg +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-21 09:55:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JG+WuQbfSB830wRDlncB0A __PACKAGE__->add_columns( '+anonymized' => { is_boolean => 1 }, diff --git a/Koha/Schema/Result/Recall.pm b/Koha/Schema/Result/Recall.pm index 0b53e38299f..aa7a43284f5 100644 --- a/Koha/Schema/Result/Recall.pm +++ b/Koha/Schema/Result/Recall.pm @@ -79,8 +79,6 @@ __PACKAGE__->table("recalls"); extra: {list => ["requested","overdue","waiting","in_transit","cancelled","expired","fulfilled"]} is_nullable: 1 -Request status - =head2 timestamp data_type: 'timestamp' @@ -110,7 +108,7 @@ Request status data_type: 'tinyint' default_value: 0 - is_nullable: 1 + is_nullable: 0 =head2 item_level_recall @@ -194,7 +192,7 @@ __PACKAGE__->add_columns( is_nullable => 1, }, "old", - { data_type => "tinyint", default_value => 0, is_nullable => 1 }, + { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "item_level_recall", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, ); @@ -284,8 +282,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-15 06:51:43 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:nG6sAMWzjgfD+r6aUsITzA +# Created by DBIx::Class::Schema::Loader v0.07049 @ 2022-03-21 09:55:08 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E3qCbGM+iyoUMfJnzZ4C9w __PACKAGE__->add_columns( '+old' => { is_boolean => 1 }, -- 2.25.1