You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shared row-storage DDL is order-dependent; name the exact DROP CONSTRAINT in the refusal and the docs #1495
The Python and JavaScript row-storage migrations create the same tables, with one difference: the JavaScript adcp_reporting_row_sets declares obligation_id ... REFERENCES adcp_reporting_obligations(obligation_id), and the Python table does not, because Python obligations live in reporting_obligations. When both SDKs share one database (the supported reader topology, and what the interop test exercises), the order of the two migrations decides whether Python can write. If the JavaScript migration runs first, ready_row_storage refuses with STATE_UNAVAILABLE. The refusal names the constraint and says "or drop the constraint"; neither it nor the docs give the statement to run.
Evidence
All references are to main at 47084e83a; the JS SDK is adcp-clientmain at 7c7f730f4.
"adcp_reporting_row_sets has a foreign key to another SDK's core table "f"({row[0]}); apply reporting_row_storage.sql before that SDK's migration, ""or drop the constraint",
docs/reporting-row-storage.md:60-63: "If the JavaScript migration created the table first, ready_row_storage refuses with the constraint name; apply this migration first, or drop that constraint."
docs/reporting-row-storage.md:349-350: "The row-storage migration applied by this SDK first, because the JavaScript adcp_reporting_row_sets has a foreign key to its own obligations table that Python obligations can never satisfy."
docs/reporting-row-storage.md:32-33: "A ledger database has exactly one writer SDK. Python and JavaScript can read each other's chunks (that is what the interop test proves)", so the two-migration database remains a supported layout.
Suggested fix
The refusal already has conname; append the statement: ALTER TABLE adcp_reporting_row_sets DROP CONSTRAINT "<conname>"; (quoted with quote_ident). Put the same statement, with the default constraint name PostgreSQL generates (adcp_reporting_row_sets_obligation_id_fkey), in both places in docs/reporting-row-storage.md.
Ask the JS SDK to drop the foreign key from row-storage-migration.ts, so the two DDLs are identical and the order stops mattering. That is a one-line change on their side and removes _refuse_foreign_core_keys here.
Activity