Skip to content

Fix: compatibility for postgres - #4058

Merged
motorina0 merged 9 commits into
lnbits:extensions_for_allfrom
talvasconcelos:fix/extensions-for-all-postgres-compat
Jul 14, 2026
Merged

motorina0 merged 9 commits into
lnbits:extensions_for_allfrom
talvasconcelos:fix/extensions-for-all-postgres-compat

Conversation

@talvasconcelos

@talvasconcelos talvasconcelos commented Jul 13, 2026 •

Copy link
Copy Markdown
Collaborator

There was a timestamp compatibility issue with PostgreSQL. WASM storage uses Unix timestamps, but PostgreSQL expects timestamp values. It now uses LNbits existing timestamp_placeholder helper to convert them into the correct database format. A small _value_placeholder helper was added to apply this conversion only to datetime fields.

@codecov

codecov Bot commented Jul 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.51%. Comparing base (b9549bb) to head (b51b41a).
⚠️ Report is 1 commits behind head on extensions_for_all.

Additional details and impacted files
@@                  Coverage Diff                   @@
##           extensions_for_all    #4058      +/-   ##
======================================================
+ Coverage               65.48%   65.51%   +0.03%     
======================================================
  Files                     156      156              
  Lines                   21973    21986      +13     
======================================================
+ Hits                    14388    14404      +16     
+ Misses                   7585     7582       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@motorina0
motorina0 force-pushed the fix/extensions-for-all-postgres-compat branch from 2144eb6 to caa0edf Compare July 13, 2026 11:22
""",
WHERE status != 'running' AND started_at < {placeholder}
""", # noqa: S608
{"cutoff": cutoff},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

is this still needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes! ruff doesn't like it...

@dni dni 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.

:o

@talvasconcelos
talvasconcelos force-pushed the fix/extensions-for-all-postgres-compat branch 2 times, most recently from 2fadd67 to d7156a4 Compare July 14, 2026 10:09
@motorina0
motorina0 force-pushed the fix/extensions-for-all-postgres-compat branch 2 times, most recently from 584f2df to e42bcdd Compare July 14, 2026 11:04
@motorina0
motorina0 force-pushed the fix/extensions-for-all-postgres-compat branch from e42bcdd to 511d57d Compare July 14, 2026 11:18
@motorina0
motorina0 merged commit 805869e into lnbits:extensions_for_all Jul 14, 2026
56 of 59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants