From 7f067acfa2cc676b67b3624ea7e2a8901f83d2a6 Mon Sep 17 00:00:00 2001 From: mokaddem Date: Wed, 25 Nov 2020 16:36:59 +0100 Subject: [PATCH] chg: [sharingGroupOrgs] Renamed table back to original name --- INSTALL/clean.sql | 2 +- INSTALL/mysql.sql | 2 +- src/Model/Table/SharingGroupsTable.php | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/INSTALL/clean.sql b/INSTALL/clean.sql index a7e8f80..f7cc20e 100644 --- a/INSTALL/clean.sql +++ b/INSTALL/clean.sql @@ -9,7 +9,7 @@ DROP TABLE IF EXISTS organisation_encryption_keys; DROP TABLE IF EXISTS organisations; DROP TABLE IF EXISTS roles; DROP TABLE IF EXISTS sharing_groups; -DROP TABLE IF EXISTS organisations_sharing_groups; +DROP TABLE IF EXISTS sgo; DROP TABLE IF EXISTS tags; DROP TABLE IF EXISTS user_keys; DROP TABLE IF EXISTS users; diff --git a/INSTALL/mysql.sql b/INSTALL/mysql.sql index 0a744fc..9f888dc 100644 --- a/INSTALL/mysql.sql +++ b/INSTALL/mysql.sql @@ -309,7 +309,7 @@ CREATE TABLE `sharing_groups` ( KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -CREATE TABLE `organisations_sharing_groups` ( +CREATE TABLE `sgo` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `sharing_group_id` int(10) unsigned NOT NULL, `organisation_id` int(10) unsigned NOT NULL, diff --git a/src/Model/Table/SharingGroupsTable.php b/src/Model/Table/SharingGroupsTable.php index 5e73131..5b6fd66 100644 --- a/src/Model/Table/SharingGroupsTable.php +++ b/src/Model/Table/SharingGroupsTable.php @@ -25,6 +25,7 @@ class SharingGroupsTable extends AppTable [ 'className' => 'Organisations', 'foreignKey' => 'sharing_group_id', + 'joinTable' => 'sgo', 'targetForeignKey' => 'organisation_id' ] );