We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need to clear pinax stripe tables directly in database, but got a dead-loop :)
Cannot truncate a table referenced in a foreign key constraint (pinax_stripe_invoice, CONSTRAINT pinax_stripe_invoic_charge_id_eb59524b_fk_pinax_stripe_charge_id FOREIGN KEY (charge_id) REFERENCES pinax_stripe_charge (id)
Cannot truncate a table referenced in a foreign key constraint (pinax_stripe_charge, CONSTRAINT pinax_stripe_char_invoice_id_bb6e58e0_fk_pinax_stripe_invoice_id FOREIGN KEY (invoice_id) REFERENCES pinax_stripe_invoice (id)
PS: Is it internal data protection algo? :) Sure, I can drop constraints or set to NULL FKs and truncate these tables but it's not so funny.
The text was updated successfully, but these errors were encountered:
It is because the invoice table has a foreign key constraint to the charge table with the column charge_id (when the field is populated).
charge_id
Just set the charge_id field to Null and update the table, then you should be able to delete data from both tables.
Sorry, something went wrong.
No branches or pull requests
I need to clear pinax stripe tables directly in database, but got a dead-loop :)
Cannot truncate a table referenced in a foreign key constraint (pinax_stripe_invoice, CONSTRAINT pinax_stripe_invoic_charge_id_eb59524b_fk_pinax_stripe_charge_id FOREIGN KEY (charge_id) REFERENCES pinax_stripe_charge (id)
Cannot truncate a table referenced in a foreign key constraint (pinax_stripe_charge, CONSTRAINT pinax_stripe_char_invoice_id_bb6e58e0_fk_pinax_stripe_invoice_id FOREIGN KEY (invoice_id) REFERENCES pinax_stripe_invoice (id)
PS: Is it internal data protection algo? :)
Sure, I can drop constraints or set to NULL FKs and truncate these tables but it's not so funny.
The text was updated successfully, but these errors were encountered: