From bb4ca4eb3763eafd757fd5a4b1e737623d294348 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Wed, 25 Jul 2012 12:22:31 +0100 Subject: [PATCH] Fixed relationships between oauth_session_scope table and oauth_sessions --- src/sql/database.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/database.sql b/src/sql/database.sql index e17eeb8d..69454b7a 100644 --- a/src/sql/database.sql +++ b/src/sql/database.sql @@ -53,6 +53,6 @@ CREATE TABLE `oauth_session_scopes` ( KEY `session_id` (`session_id`), KEY `access_token` (`access_token`), KEY `scope` (`scope`), - CONSTRAINT `oauth_session_scopes_ibfk_2` FOREIGN KEY (`scope`) REFERENCES `scopes` (`scope`) ON DELETE CASCADE, - CONSTRAINT `oauth_session_scopes_ibfk_3` FOREIGN KEY (`scope`) REFERENCES `scopes` (`scope`) ON DELETE CASCADE ON UPDATE CASCADE + CONSTRAINT `oauth_session_scopes_ibfk_3` FOREIGN KEY (`scope`) REFERENCES `scopes` (`scope`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `oauth_session_scopes_ibfk_4` FOREIGN KEY (`session_id`) REFERENCES `oauth_sessions` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file