Firebase Data Connect lacks ON DELETE RESTRICT support and causes brownfield schema mismatch
Hi Firebase Data Connect team,
I’m currently using Firebase Data Connect with Cloud SQL (PostgreSQL) and facing a limitation related to foreign key delete constraints.
PostgreSQL natively supports ON DELETE RESTRICT, and when I manually apply this constraint directly in Cloud SQL, everything works perfectly and the application behaves exactly as intended.
However, Data Connect does not provide any way to define or preserve ON DELETE RESTRICT in its schema. While Data Connect does expose an explicit directive (the ! notation) to define ON DELETE CASCADE, there is no equivalent option for RESTRICT or other delete behaviors.
Because of this, when the database contains a valid ON DELETE RESTRICT constraint, Data Connect reports a brownfield schema mismatch error, stating that the SQL schema does not match the Data Connect schema and asking to make the SQL schema identical to Data Connect’s definition.
This creates a serious problem for production systems:
ON DELETE RESTRICT is a core relational integrity feature
Data Connect recognizes CASCADE but provides no mechanism to define RESTRICT
Manually applied constraints are rejected or flagged during deployment
Questions / Requests:
Is there an official way to define ON DELETE RESTRICT in Data Connect?
If not, what is the recommended workaround that avoids schema drift and deployment failures?
Are there plans to support explicit delete behaviors (RESTRICT / CASCADE / SET NULL) in the Data Connect schema?
This capability is essential for production-grade relational database design, and first-class support would greatly improve Data Connect’s suitability for real-world systems.
Thanks for your time, and I’d appreciate any guidance or roadmap clarity on this.