lab-64 / split-the-bill-server

Backend for the Split the Bill App
4 stars 0 forks source link

Delete Group if there is a group transaction #198

Closed f-odc closed 3 months ago

f-odc commented 3 months ago

If there exist a group transaction for a group it is not possible to delete a group.

f-odc commented 3 months ago

For deployment, we need to update the tables we have created in Google SQL. Here are the required SQL-commands:

ALTER TABLE group_transactions
ADD CONSTRAINT fk_group
FOREIGN KEY (group_id)
REFERENCES groups(id)
ON DELETE CASCADE