Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stripe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Extensions
Stripe
Commits
a615584e
Commit
a615584e
authored
2 years ago
by
mattwire
Browse files
Options
Downloads
Patches
Plain Diff
Fix upgrader on some versions of mysql
parent
47c1dd9a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!209
6.8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Stripe/Upgrader.php
+2
-1
2 additions, 1 deletion
CRM/Stripe/Upgrader.php
with
2 additions
and
1 deletion
CRM/Stripe/Upgrader.php
+
2
−
1
View file @
a615584e
...
...
@@ -425,7 +425,8 @@ class CRM_Stripe_Upgrader extends CRM_Stripe_Upgrader_Base {
// ALTER TABLE ... RENAME COLUMN only in MySQL8+
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civicrm_stripe_customers CHANGE COLUMN id customer_id varchar(255) COMMENT 'Stripe Customer ID'"
);
if
(
CRM_Core_BAO_SchemaHandler
::
checkIfIndexExists
(
'civicrm_stripe_customers'
,
'id'
))
{
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civicrm_stripe_customers RENAME INDEX id TO customer_id"
);
CRM_Core_DAO
::
executeQuery
(
'ALTER TABLE civicrm_stripe_customers DROP INDEX id'
);
CRM_Core_DAO
::
executeQuery
(
'CREATE INDEX customer_id ON civicrm_stripe_customers (customer_id)'
);
}
CRM_Core_DAO
::
executeQuery
(
"ALTER TABLE civicrm_stripe_customers ADD COLUMN id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Unique ID' FIRST"
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment