From ea7fa8d011afc6d2337aebb440c1bf1f4732b143 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 13 Feb 2018 14:09:12 -0300 Subject: [PATCH] Bug 20144: DBIC Schema changes Signed-off-by: Jonathan Druart --- Koha/Schema/Result/Borrower.pm | 16 ++++++++-------- Koha/Schema/Result/Deletedborrower.pm | 16 ++++++++-------- Koha/Schema/Result/ExportFormat.pm | 23 +++++++++++++++-------- Koha/Schema/Result/OldReserve.pm | 12 +++++++++--- Koha/Schema/Result/Reserve.pm | 12 +++++++++--- 5 files changed, 49 insertions(+), 30 deletions(-) diff --git a/Koha/Schema/Result/Borrower.pm b/Koha/Schema/Result/Borrower.pm index e90dd783d5..21ad72f0b1 100644 --- a/Koha/Schema/Result/Borrower.pm +++ b/Koha/Schema/Result/Borrower.pm @@ -38,7 +38,7 @@ __PACKAGE__->table("borrowers"); =head2 surname data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 firstname @@ -75,7 +75,7 @@ __PACKAGE__->table("borrowers"); =head2 address data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 address2 @@ -85,7 +85,7 @@ __PACKAGE__->table("borrowers"); =head2 city data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 state @@ -459,7 +459,7 @@ __PACKAGE__->add_columns( "cardnumber", { data_type => "varchar", is_nullable => 1, size => 32 }, "surname", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "firstname", { data_type => "text", is_nullable => 1 }, "title", @@ -473,11 +473,11 @@ __PACKAGE__->add_columns( "streettype", { data_type => "varchar", is_nullable => 1, size => 50 }, "address", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "address2", { data_type => "text", is_nullable => 1 }, "city", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "state", { data_type => "text", is_nullable => 1 }, "zipcode", @@ -1386,8 +1386,8 @@ Composing rels: L -> ordernumber __PACKAGE__->many_to_many("ordernumbers", "aqorder_users", "ordernumber"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-11-09 11:42:45 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:UitEC1xK/a76Ff4ZCS2BKA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-13 14:08:33 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:pxhUnV9IMvVGml9HFheMLw __PACKAGE__->belongs_to( "guarantor", diff --git a/Koha/Schema/Result/Deletedborrower.pm b/Koha/Schema/Result/Deletedborrower.pm index e4df081353..825b503532 100644 --- a/Koha/Schema/Result/Deletedborrower.pm +++ b/Koha/Schema/Result/Deletedborrower.pm @@ -38,7 +38,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 surname data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 firstname @@ -75,7 +75,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 address data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 address2 @@ -85,7 +85,7 @@ __PACKAGE__->table("deletedborrowers"); =head2 city data_type: 'mediumtext' - is_nullable: 0 + is_nullable: 1 =head2 state @@ -456,7 +456,7 @@ __PACKAGE__->add_columns( "cardnumber", { data_type => "varchar", is_nullable => 1, size => 32 }, "surname", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "firstname", { data_type => "text", is_nullable => 1 }, "title", @@ -470,11 +470,11 @@ __PACKAGE__->add_columns( "streettype", { data_type => "varchar", is_nullable => 1, size => 50 }, "address", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "address2", { data_type => "text", is_nullable => 1 }, "city", - { data_type => "mediumtext", is_nullable => 0 }, + { data_type => "mediumtext", is_nullable => 1 }, "state", { data_type => "text", is_nullable => 1 }, "zipcode", @@ -641,8 +641,8 @@ __PACKAGE__->add_columns( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-10-27 13:24:06 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:LZK8S3YPK3zZAhH28j8gng +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-13 14:08:33 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:C0Zr5b+5mXPKJKCMWL0Q/w # You can replace this text with custom code or comments, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/ExportFormat.pm b/Koha/Schema/Result/ExportFormat.pm index 3ada5dc265..9d486e4c28 100644 --- a/Koha/Schema/Result/ExportFormat.pm +++ b/Koha/Schema/Result/ExportFormat.pm @@ -48,24 +48,26 @@ __PACKAGE__->table("export_format"); =head2 csv_separator data_type: 'varchar' + default_value: ',' is_nullable: 0 size: 2 =head2 field_separator data_type: 'varchar' - is_nullable: 0 + is_nullable: 1 size: 2 =head2 subfield_separator data_type: 'varchar' - is_nullable: 0 + is_nullable: 1 size: 2 =head2 encoding data_type: 'varchar' + default_value: 'utf8' is_nullable: 0 size: 255 @@ -95,13 +97,18 @@ __PACKAGE__->add_columns( "content", { data_type => "mediumtext", is_nullable => 0 }, "csv_separator", - { data_type => "varchar", is_nullable => 0, size => 2 }, + { data_type => "varchar", default_value => ",", is_nullable => 0, size => 2 }, "field_separator", - { data_type => "varchar", is_nullable => 0, size => 2 }, + { data_type => "varchar", is_nullable => 1, size => 2 }, "subfield_separator", - { data_type => "varchar", is_nullable => 0, size => 2 }, + { data_type => "varchar", is_nullable => 1, size => 2 }, "encoding", - { data_type => "varchar", is_nullable => 0, size => 255 }, + { + data_type => "varchar", + default_value => "utf8", + is_nullable => 0, + size => 255, + }, "type", { data_type => "varchar", @@ -131,8 +138,8 @@ __PACKAGE__->add_columns( __PACKAGE__->set_primary_key("export_format_id"); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2017-03-20 10:12:28 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cHdb+bBmBVTAK71TNjdqgg +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-13 14:16:55 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:RTcPpu1SdseBlKI9MEdUWA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/OldReserve.pm b/Koha/Schema/Result/OldReserve.pm index 0265e28641..b1c44e25ac 100644 --- a/Koha/Schema/Result/OldReserve.pm +++ b/Koha/Schema/Result/OldReserve.pm @@ -115,6 +115,7 @@ __PACKAGE__->table("old_reserves"); accessor: 'lowest_priority' data_type: 'tinyint' + default_value: 0 is_nullable: 0 =head2 suspend @@ -175,7 +176,12 @@ __PACKAGE__->add_columns( "expirationdate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "lowestPriority", - { accessor => "lowest_priority", data_type => "tinyint", is_nullable => 0 }, + { + accessor => "lowest_priority", + data_type => "tinyint", + default_value => 0, + is_nullable => 0, + }, "suspend", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "suspend_until", @@ -283,8 +289,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2016-05-02 15:00:01 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cKmTD43jb4WnCrw57+ixrw +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-13 14:08:34 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:1QLyttziZfEWRa64oTH1yA # You can replace this text with custom content, and it will be preserved on regeneration diff --git a/Koha/Schema/Result/Reserve.pm b/Koha/Schema/Result/Reserve.pm index eb5d07fa8a..3bfb1a41d1 100644 --- a/Koha/Schema/Result/Reserve.pm +++ b/Koha/Schema/Result/Reserve.pm @@ -119,6 +119,7 @@ __PACKAGE__->table("reserves"); accessor: 'lowest_priority' data_type: 'tinyint' + default_value: 0 is_nullable: 0 =head2 suspend @@ -189,7 +190,12 @@ __PACKAGE__->add_columns( "expirationdate", { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 }, "lowestPriority", - { accessor => "lowest_priority", data_type => "tinyint", is_nullable => 0 }, + { + accessor => "lowest_priority", + data_type => "tinyint", + default_value => 0, + is_nullable => 0, + }, "suspend", { data_type => "tinyint", default_value => 0, is_nullable => 0 }, "suspend_until", @@ -307,8 +313,8 @@ __PACKAGE__->belongs_to( ); -# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-12-26 12:22:09 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:v9+wPKUT381CLNlusQ4LMA +# Created by DBIx::Class::Schema::Loader v0.07042 @ 2018-02-13 14:08:34 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:IP2cVX4M3BKM4zZvpyGHPQ __PACKAGE__->belongs_to( "item", -- 2.39.5