Skip to content

Functional fixes - #72

Open
trasher wants to merge 15 commits into
developfrom
feature/functional-fixes
Open

trasher wants to merge 15 commits into
developfrom
feature/functional-fixes

Conversation

@trasher

@trasher trasher commented Sep 30, 2026

Copy link
Copy Markdown
Member

No description provided.

@trasher
trasher requested a review from gagnieray September 30, 2026 12:33

@gagnieray gagnieray left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you completely regarding the changes related to PostgreSQL 😉

Comment thread _define.php Outdated
Comment thread scripts/upgrade-to-1.1-pgsql.sql Outdated
Comment on lines -38 to -39
method = JSON_UNQUOTE(JSON_EXTRACT(request, '$.data.object.payment_method_types[0]')),
receipt_url = JSON_UNQUOTE(JSON_EXTRACT(request, '$.receipt_url'));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ones shouldn't be dropped. Eventually use COALESCE if they are not part of the original request.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method: createPaymentIntent() was always using ['card'] in v0.0.3 (_routes.php:200, Stripe.php:413); I've added it below - no need for a complex JSON query.
As far as I understood, recipt_url was previousely not stored - information about the URL or the METHOD is not present.

Also, you use JSON methods, while it was serialized in last table - upgrading from a 0.3 would have failed. I guess this works as expected only from on of the unstable releases :/

To be honest, this is not easy to follow or understand... :D

Comment on lines -26 to -27
method = request #>> '{data,object,payment_method_types,0}',
receipt_url = request #>> '{receipt_url}';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as for upgrade-to-1.0.0-mysql.sql : these ones shouldn't be dropped. Eventually use COALESCE id they are not part of the original request.

Comment thread scripts/upgrade-to-1.0.0-pgsql.sql Outdated
),
method = request #>> '{data,object,payment_method_types,0}',
receipt_url = request #>> '{receipt_url}';
member_id = COALESCE(substring(request from '"adherent_id";s:[0-9]+:"([0-9]+)"')::integer, 0);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as for upgrade-to-1.0.0-mysql.sql : did you make this change because you think it is more reliable/simple to use the previous adherent_id than the value in the original request ?

state = CASE state
WHEN 0 THEN 3
WHEN 2 THEN 1
WHEN 3 THEN 2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
WHEN 3 THEN 2
WHEN 3 THEN 4

Comment thread scripts/upgrade-to-1.0.0-pgsql.sql Outdated
state = CASE state
WHEN 0 THEN 3
WHEN 2 THEN 1
WHEN 3 THEN 2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
WHEN 3 THEN 2
WHEN 3 THEN 4

WHEN state = 0 THEN 3
state = CASE state
WHEN 0 THEN 3
WHEN 2 THEN 1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ? 🤔

Comment thread scripts/upgrade-to-1.0.0-mysql.sql Outdated
@trasher
trasher force-pushed the feature/functional-fixes branch from 0138b0d to a52fe8e Compare October 4, 2026 14:20
trasher and others added 2 commits October 4, 2026 16:32
Co-authored-by: Guillaume AGNIERAY <107203963+gagnieray@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants