| contactfirstname | text | YES | | NULL | |
| contacttitle | text | YES | | NULL | |
| borrowernotes | mediumtext | YES | | NULL | |
- | relationship | varchar(100) | YES | | NULL | |
| ethnicity | varchar(50) | YES | | NULL | |
| ethnotes | varchar(255) | YES | | NULL | |
| sex | varchar(1) | YES | | NULL | |
| contactfirstname | text | YES | | NULL | |
| contacttitle | text | YES | | NULL | |
| borrowernotes | mediumtext | YES | | NULL | |
-| relationship | varchar(100) | YES | | NULL | |
| ethnicity | varchar(50) | YES | | NULL | |
| ethnotes | varchar(255) | YES | | NULL | |
| sex | varchar(1) | YES | | NULL | |
--- /dev/null
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ if ( !column_exists( 'borrowers', 'relationship' ) ) {
+ $dbh->do(q{
+ ALTER TABLE borrowers DROP COLUMN relationship
+ });
+ }
+
+ if ( !column_exists( 'deletedborrowers', 'relationship' ) ) {
+ $dbh->do(q{
+ ALTER TABLE deletedborrowers DROP COLUMN relationship
+ });
+ }
+
+ if ( !column_exists( 'borrower_modifications', 'relationship' ) ) {
+ $dbh->do(q{
+ ALTER TABLE borrower_modifications DROP COLUMN relationship
+ });
+ }
+
+ # Always end with this (adjust the bug info)
+ NewVersion( $DBversion, 26995, "Drop column relationship from borrower tables");
+}
`contactfirstname` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`contacttitle` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`borrowernotes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL,
- `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`password` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`flags` int(11) DEFAULT NULL,
`contactfirstname` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include first name of guarantor',
`contacttitle` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include title (Mr., Mrs., etc) of guarantor',
`borrowernotes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is only visible in the staff interface',
- `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor',
`sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender',
`password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s Bcrypt encrypted password',
`flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions',
`contactfirstname` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include first name of guarantor',
`contacttitle` mediumtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include title (Mr., Mrs., etc) of guarantor',
`borrowernotes` longtext COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'a note on the patron/borrower''s account that is only visible in the staff interface',
- `relationship` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'used for children to include the relationship to their guarantor',
`sex` varchar(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s gender',
`password` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'patron/borrower''s encrypted password',
`flags` int(11) DEFAULT NULL COMMENT 'will include a number associated with the staff member''s permissions',