Bugzilla – Attachment 94832 Details for
Bug 23805
Add a dedicated credit_types table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23805: (follow-up) [alternative] Re-order check constraint
Bug-23805-follow-up-alternative-Re-order-check-con.patch (text/plain), 1.82 KB, created by
Martin Renvoize (ashimema)
on 2019-10-29 13:42:34 UTC
(
hide
)
Description:
Bug 23805: (follow-up) [alternative] Re-order check constraint
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-10-29 13:42:34 UTC
Size:
1.82 KB
patch
obsolete
>From c43e167255e63a2ff02f09af5d20ed67b6ffc816 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 29 Oct 2019 13:34:09 +0000 >Subject: [PATCH] Bug 23805: (follow-up) [alternative] Re-order check > constraint > >--- > installer/data/mysql/updatedatabase.pl | 28 +++++++++----------------- > 1 file changed, 9 insertions(+), 19 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index a0c00b43fb..7d069353c3 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -20010,16 +20010,6 @@ if ( CheckVersion($DBversion) ) { > ); > } > >- # Dropping the check constraint in accountlines >- $dbh->do( >- qq{ >- ALTER TABLE >- accountlines >- DROP CHECK >- `accountlines_check_type` >- } >- ); >- > # Update accountype 'C' to 'CREDIT' > $dbh->do( > qq{ >@@ -20075,11 +20065,19 @@ if ( CheckVersion($DBversion) ) { > UPDATE > accountlines > SET >- credit_type_code = accounttype, accounttype = NULL >+ credit_type_code = accounttype > WHERE accounttype IN (SELECT code from account_credit_types) > } > ); > >+ # Drop accounttype field >+ $dbh->do( >+ qq{ >+ ALTER TABLE accountlines >+ DROP COLUMN `accounttype` >+ } >+ ); >+ > # Adding a check constraints to accountlines > $dbh->do( > qq{ >@@ -20091,14 +20089,6 @@ if ( CheckVersion($DBversion) ) { > } > ); > >- # Drop accounttype field >- $dbh->do( >- qq{ >- ALTER TABLE accountlines >- DROP COLUMN `accounttype` >- } >- ); >- > SetVersion($DBversion); > print "Upgrade to $DBversion done (Bug 23805 - Add account credit_types)\n"; > } >-- >2.20.1
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 23805
:
94153
|
94154
|
94155
|
94156
|
94157
|
94158
|
94159
|
94160
|
94161
|
94162
|
94163
|
94164
|
94166
|
94167
|
94168
|
94169
|
94170
|
94171
|
94172
|
94173
|
94174
|
94175
|
94176
|
94177
|
94178
|
94801
|
94815
| 94832 |
94895