ALTER TABLE photoGalleries
    ADD CONSTRAINT fk_photoGalleries_photoGalleryGroup
    FOREIGN KEY (photoGalleryGroupID)
    REFERENCES photoGalleryGroups(photoGalleryGroupID)
    ON DELETE CASCADE
    ON UPDATE CASCADE;
