Bugzilla – Attachment 71410 Details for
Bug 20144
Test suite is failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20144: [sql_modes] Fix borrowers table structure
Bug-20144-sqlmodes-Fix-borrowers-table-structure.patch (text/plain), 4.86 KB, created by
Julian Maurice
on 2018-02-12 09:18:15 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Fix borrowers table structure
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 09:18:15 UTC
Size:
4.86 KB
patch
obsolete
>From 47f4a6f2bfe370aa08f27c5160cfb563abbf90ff Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 5 Feb 2018 14:28:31 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Fix borrowers table structure > >surname, address and city can be NULL > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > .../mysql/atomicupdate/bug_20144_update_borrowers_table.sql | 2 ++ > installer/data/mysql/kohastructure.sql | 12 ++++++------ > 2 files changed, 8 insertions(+), 6 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_20144_update_borrowers_table.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_20144_update_borrowers_table.sql b/installer/data/mysql/atomicupdate/bug_20144_update_borrowers_table.sql >new file mode 100644 >index 0000000000..f1d5c46fc5 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_20144_update_borrowers_table.sql >@@ -0,0 +1,2 @@ >+ALTER TABLE borrowers MODIFY surname MEDIUMTEXT, MODIFY address MEDIUMTEXT, MODIFY city MEDIUMTEXT; >+ALTER TABLE deletedborrowers MODIFY surname MEDIUMTEXT, MODIFY address MEDIUMTEXT, MODIFY city MEDIUMTEXT; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 36b8120139..f8fcf04c91 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -569,16 +569,16 @@ DROP TABLE IF EXISTS `deletedborrowers`; > CREATE TABLE `deletedborrowers` ( -- stores data related to the patrons/borrowers you have deleted > `borrowernumber` int(11) NOT NULL default 0, -- primary key, Koha assigned ID number for patrons/borrowers > `cardnumber` varchar(32) default NULL, -- unique key, library assigned ID number for patrons/borrowers >- `surname` mediumtext NOT NULL, -- patron/borrower's last name (surname) >+ `surname` mediumtext, -- patron/borrower's last name (surname) > `firstname` text, -- patron/borrower's first name > `title` mediumtext, -- patron/borrower's title, for example: Mr. or Mrs. > `othernames` mediumtext, -- any other names associated with the patron/borrower > `initials` text, -- initials for your patron/borrower > `streetnumber` varchar(10) default NULL, -- the house number for your patron/borrower's primary address > `streettype` varchar(50) default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's primary address >- `address` mediumtext NOT NULL, -- the first address line for your patron/borrower's primary address >+ `address` mediumtext, -- the first address line for your patron/borrower's primary address > `address2` text, -- the second address line for your patron/borrower's primary address >- `city` mediumtext NOT NULL, -- the city or town for your patron/borrower's primary address >+ `city` mediumtext, -- the city or town for your patron/borrower's primary address > `state` text default NULL, -- the state or province for your patron/borrower's primary address > `zipcode` varchar(25) default NULL, -- the zip or postal code for your patron/borrower's primary address > `country` text, -- the country for your patron/borrower's primary address >@@ -1594,16 +1594,16 @@ DROP TABLE IF EXISTS `borrowers`; > CREATE TABLE `borrowers` ( -- this table includes information about your patrons/borrowers/members > `borrowernumber` int(11) NOT NULL auto_increment, -- primary key, Koha assigned ID number for patrons/borrowers > `cardnumber` varchar(32) default NULL, -- unique key, library assigned ID number for patrons/borrowers >- `surname` mediumtext NOT NULL, -- patron/borrower's last name (surname) >+ `surname` mediumtext, -- patron/borrower's last name (surname) > `firstname` text, -- patron/borrower's first name > `title` mediumtext, -- patron/borrower's title, for example: Mr. or Mrs. > `othernames` mediumtext, -- any other names associated with the patron/borrower > `initials` text, -- initials for your patron/borrower > `streetnumber` varchar(10) default NULL, -- the house number for your patron/borrower's primary address > `streettype` varchar(50) default NULL, -- the street type (Rd., Blvd, etc) for your patron/borrower's primary address >- `address` mediumtext NOT NULL, -- the first address line for your patron/borrower's primary address >+ `address` mediumtext, -- the first address line for your patron/borrower's primary address > `address2` text, -- the second address line for your patron/borrower's primary address >- `city` mediumtext NOT NULL, -- the city or town for your patron/borrower's primary address >+ `city` mediumtext, -- the city or town for your patron/borrower's primary address > `state` text default NULL, -- the state or province for your patron/borrower's primary address > `zipcode` varchar(25) default NULL, -- the zip or postal code for your patron/borrower's primary address > `country` text, -- the country for your patron/borrower's primary address >-- >2.14.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20144
: 71410 |
71411
|
71412
|
71413
|
71414
|
71415
|
71416
|
71417
|
71418
|
71419
|
71420
|
71421
|
71422
|
71423
|
71424
|
71425
|
71427
|
71428
|
71429
|
71430
|
71431
|
71432
|
71434
|
71435
|
71436
|
71437
|
71438
|
71440
|
71441
|
71442
|
71443
|
71444
|
71445
|
71446
|
71447
|
71448
|
71449
|
71450
|
71451
|
71452
|
71453
|
71454
|
71455
|
71456
|
71457
|
71458
|
71459
|
71460
|
71461
|
71462
|
71463
|
71467
|
71564