Skip to content

feat: add TypeORM migrations for webhook_subscriptions, soroban_event_logs and index - #197

Merged
chizzy192 merged 1 commit into
StellarState:devfrom
silifatzoffun74-art:feat/issues-168-167-166
Jul 29, 2026
Merged

feat: add TypeORM migrations for webhook_subscriptions, soroban_event_logs and index#197
chizzy192 merged 1 commit into
StellarState:devfrom
silifatzoffun74-art:feat/issues-168-167-166

Conversation

@silifatzoffun74-art

Copy link
Copy Markdown
Contributor
  • Add webhook_subscriptions table migration with user_id FK to users(id) (ON DELETE CASCADE), url, secret, event_types (jsonb), active, timestamps, plus a WebhookSubscription entity model.
  • Add soroban_event_logs table migration with contract_id, ledger_sequence (bigint), topic, tx_hash, payload (jsonb), processed, created_at, plus a SorobanEventLog entity model.
  • Add composite index IDX_SOROBAN_EVENTS_CONTRACT_LEDGER on soroban_event_logs (contract_id, ledger_sequence DESC) in its own migration, ordered after the table-creation migration.

Migration timestamps are ordered so TypeORM runs them in the correct sequence: webhook_subscriptions table → soroban_event_logs table → composite index.

Test plan

  • npx tsc --noEmit — no errors
  • npx eslint src/**/*.ts — clean (also runs via pre-commit hook)
  • npx jest — 400/401 passing; 1 pre-existing failure in tests/validate-invoice-for-publish.test.ts unrelated to this change (invoice validation error ordering), left untouched
  • Migration up/down verified against a live Postgres instance (not run — no local DB available in this environment; migrations follow the exact raw-SQL style of existing migrations in src/migrations)

Closes #168
Closes #167
Closes #166

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@silifatzoffun74-art Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@chizzy192
chizzy192 merged commit 68d09dc into StellarState:dev Jul 29, 2026
3 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

2 participants