Permalink
Browse files

LPS-26306 Cleanup SQL references

  • Loading branch information...
1 parent 2c0fe1e commit 1afa11f8adc19fdcca8226e5bd8000e0f4e3b9d7 @rotty3000 rotty3000 committed with brianchandotcom Apr 5, 2012
View
1 .gitignore
@@ -161,6 +161,7 @@ _sass_cache_*.css
/sql/sequences
/sql/sql.*.properties
/sql/update-*
+!/sql/update-*.sql
/sql/velocity.log*
/support-tomcat/*.iml
View
36 portal-impl/src/com/liferay/portal/upgrade/UpgradeProcess_6_1_0_to_6_2_0.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
+package com.liferay.portal.upgrade;
+
+import com.liferay.portal.kernel.upgrade.UpgradeProcess;
+import com.liferay.portal.kernel.util.ReleaseInfo;
+import com.liferay.portal.upgrade.v6_1_0_to_6_2_0.UpgradeSchema;
+
+/**
+ * @author Raymond Augé
+ */
+public class UpgradeProcess_6_1_0_to_6_2_0 extends UpgradeProcess {
+
+ @Override
+ public int getThreshold() {
+ return ReleaseInfo.RELEASE_6_1_0_BUILD_NUMBER;
+ }
+
+ @Override
+ protected void doUpgrade() throws Exception {
+ upgrade(UpgradeSchema.class);
+ }
+
+}
View
36 portal-impl/src/com/liferay/portal/upgrade/UpgradeProcess_6_1_1_to_6_2_0.java
@@ -0,0 +1,36 @@
+/**
+ * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
+package com.liferay.portal.upgrade;
+
+import com.liferay.portal.kernel.upgrade.UpgradeProcess;
+import com.liferay.portal.kernel.util.ReleaseInfo;
+import com.liferay.portal.upgrade.v6_1_1_to_6_2_0.UpgradeSchema;
+
+/**
+ * @author Raymond Augé
+ */
+public class UpgradeProcess_6_1_1_to_6_2_0 extends UpgradeProcess {
+
+ @Override
+ public int getThreshold() {
+ return ReleaseInfo.RELEASE_6_1_1_BUILD_NUMBER;
+ }
+
+ @Override
+ protected void doUpgrade() throws Exception {
+ upgrade(UpgradeSchema.class);
+ }
+
+}
View
29 portal-impl/src/com/liferay/portal/upgrade/v6_1_0_to_6_2_0/UpgradeSchema.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
+package com.liferay.portal.upgrade.v6_1_0_to_6_2_0;
+
+import com.liferay.portal.kernel.upgrade.UpgradeProcess;
+
+/**
+ * @author Raymond Augé
+ */
+public class UpgradeSchema extends UpgradeProcess {
+
+ @Override
+ protected void doUpgrade() throws Exception {
+ runSQLTemplate("update-6.1.0-6.2.0.sql", false);
+ }
+
+}
View
29 portal-impl/src/com/liferay/portal/upgrade/v6_1_1_to_6_2_0/UpgradeSchema.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation; either version 2.1 of the License, or (at your option)
+ * any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ */
+
+package com.liferay.portal.upgrade.v6_1_1_to_6_2_0;
+
+import com.liferay.portal.kernel.upgrade.UpgradeProcess;
+
+/**
+ * @author Raymond Augé
+ */
+public class UpgradeSchema extends UpgradeProcess {
+
+ @Override
+ protected void doUpgrade() throws Exception {
+ runSQLTemplate("update-6.1.1-6.2.0.sql", false);
+ }
+
+}
View
475 portal-impl/src/custom-sql/portal.xml
@@ -255,28 +255,6 @@
(LayoutSet.pageCount != 0)
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.GroupFinder.joinByRolePermissions">
- <![CDATA[
- INNER JOIN
- Resource_ ON
- (Resource_.primKey = CAST_TEXT(Group_.groupId))
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- INNER JOIN
- Permission_ ON
- (Permission_.resourceId = Resource_.resourceId)
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.permissionId = Permission_.permissionId)
- WHERE
- (Group_.liveGroupId = 0) AND
- (ResourceCode.name = ?) AND
- (ResourceCode.scope = ?) AND
- (Permission_.actionId = ?) AND
- (Roles_Permissions.roleId = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.GroupFinder.joinByRoleResourcePermissions">
<![CDATA[
INNER JOIN
@@ -568,22 +546,6 @@
)
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.OrganizationFinder.joinByGroupsPermissions">
- <![CDATA[
- INNER JOIN
- Group_ ON
- (Group_.classPK = Organization_.organizationId)
- INNER JOIN
- Groups_Permissions ON
- (Groups_Permissions.groupId = Group_.groupId)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Groups_Permissions.permissionId)
- WHERE
- (Group_.classNameId = [$CLASS_NAME_ID_COM.LIFERAY.PORTAL.MODEL.ORGANIZATION$]) AND
- (Permission_.resourceId = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.OrganizationFinder.joinByOrganizationsGroups">
<![CDATA[
INNER JOIN
@@ -625,19 +587,6 @@
(Users_Orgs.userId = ?)
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.OrganizationFinder.joinByOrgGroupPermission">
- <![CDATA[
- INNER JOIN
- OrgGroupPermission ON
- (OrgGroupPermission.organizationId = Organization_.organizationId)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = OrgGroupPermission.permissionId)
- WHERE
- (Permission_.resourceId = ?) AND
- (OrgGroupPermission.groupId = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.OrganizationFinder.joinByUsersOrgs">
<![CDATA[
INNER JOIN
@@ -647,21 +596,6 @@
(Users_Orgs.organizationId = Organization_.organizationId)
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.OrgGroupPermissionFinder.findByO_G_R">
- <![CDATA[
- SELECT
- {OrgGroupPermission.*}
- FROM
- OrgGroupPermission
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = OrgGroupPermission.permissionId)
- WHERE
- (Permission_.resourceId = ?) AND
- (OrgGroupPermission.organizationId = ?) AND
- (OrgGroupPermission.groupId = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.PasswordPolicyFinder.countByC_N">
<![CDATA[
SELECT
@@ -684,280 +618,6 @@
(lower(PasswordPolicy.name) LIKE ? OR ? IS NULL)
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.countByGroupsPermissions">
- <![CDATA[
- SELECT
- COUNT(*) AS COUNT_VALUE
- FROM
- Permission_
- INNER JOIN
- Groups_Permissions ON
- (Groups_Permissions.permissionId = Permission_.permissionId)
- WHERE
- ([$PERMISSION_ID$]) AND
- ([$GROUP_ID$])
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.countByGroupsRoles">
- <![CDATA[
- SELECT
- COUNT(*) AS COUNT_VALUE
- FROM
- Groups_Roles
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.roleId = Groups_Roles.roleId)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Roles_Permissions.permissionId)
- WHERE
- ([$PERMISSION_ID$]) AND
- ([$GROUP_ID$])
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.countByRolesPermissions">
- <![CDATA[
- SELECT
- COUNT(*) AS COUNT_VALUE
- FROM
- Roles_Permissions
- WHERE
- ([$PERMISSION_ID$]) AND
- ([$ROLE_ID$])
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.countByUserGroupRole">
- <![CDATA[
- SELECT
- COUNT(*) AS COUNT_VALUE
- FROM
- UserGroupRole
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.roleId = UserGroupRole.roleId) AND
- (UserGroupRole.groupId = ?)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Roles_Permissions.permissionId)
- WHERE
- ([$PERMISSION_ID$]) AND
- (UserGroupRole.userId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.countByUsersPermissions">
- <![CDATA[
- SELECT
- COUNT(*) AS COUNT_VALUE
- FROM
- Permission_
- INNER JOIN
- Users_Permissions ON
- (Users_Permissions.permissionId = Permission_.permissionId)
- WHERE
- ([$PERMISSION_ID$]) AND
- (Users_Permissions.userId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.countByUsersRoles">
- <![CDATA[
- SELECT
- COUNT(*) AS COUNT_VALUE
- FROM
- Users_Roles
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.roleId = Users_Roles.roleId)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Roles_Permissions.permissionId)
- WHERE
- ([$PERMISSION_ID$]) AND
- (Users_Roles.userId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.countByR_A_C">
- <![CDATA[
- SELECT
- COUNT(*) AS COUNT_VALUE
- FROM
- Roles_Permissions
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Roles_Permissions.permissionId)
- INNER JOIN
- Resource_ ON
- (Resource_.resourceId = Permission_.resourceId)
- WHERE
- (Roles_Permissions.roleId = ?) AND
- (Permission_.actionId = ?) AND
- (Resource_.codeId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByA_C">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Resource_ ON
- (Resource_.resourceId = Permission_.resourceId)
- WHERE
- (Permission_.actionId = ?) AND
- (Resource_.codeId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByA_R">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- WHERE
- (actionId = ?) AND
- ([$RESOURCE_ID$])
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByG_R">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Groups_Permissions ON
- (Groups_Permissions.permissionId = Permission_.permissionId)
- WHERE
- (Groups_Permissions.groupId = ?) AND
- (Permission_.resourceId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByR_R">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.permissionId = Permission_.permissionId)
- WHERE
- (Roles_Permissions.roleId = ?) AND
- (Permission_.resourceId = ?)
- ORDER BY
- Permission_.actionId ASC
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByR_S">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.permissionId = Permission_.permissionId)
- INNER JOIN
- Resource_ ON
- (Resource_.resourceId = Permission_.resourceId)
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- WHERE
- (Roles_Permissions.roleId = ?) AND
- [$SCOPE$]
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByU_R">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Users_Permissions ON
- (Users_Permissions.permissionId = Permission_.permissionId)
- WHERE
- (Users_Permissions.userId = ?) AND
- (Permission_.resourceId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByO_G_R">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- OrgGroupPermission ON
- (OrgGroupPermission.permissionId = Permission_.permissionId)
- WHERE
- (OrgGroupPermission.organizationId = ?) AND
- (OrgGroupPermission.groupId = ?) AND
- (Permission_.resourceId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByU_A_R">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Users_Permissions ON
- (Users_Permissions.permissionId = Permission_.permissionId)
- WHERE
- (Users_Permissions.userId = ?) AND
- ([$ACTION_ID$]) AND
- (Permission_.resourceId = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByG_C_N_S_P">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Resource_ ON
- (Resource_.resourceId = Permission_.resourceId)
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- INNER JOIN
- Groups_Permissions ON
- (Groups_Permissions.permissionId = Permission_.permissionId)
- WHERE
- (Groups_Permissions.groupId = ?) AND
- (ResourceCode.companyId = ?) AND
- (ResourceCode.name = ?) AND
- (ResourceCode.scope = ?) AND
- (Resource_.primKey = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.PermissionFinder.findByU_C_N_S_P">
- <![CDATA[
- SELECT
- {Permission_.*}
- FROM
- Permission_
- INNER JOIN
- Resource_ ON
- (Resource_.resourceId = Permission_.resourceId)
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- INNER JOIN
- Users_Permissions ON
- (Users_Permissions.permissionId = Permission_.permissionId)
- WHERE
- (Users_Permissions.userId = ?) AND
- (ResourceCode.companyId = ?) AND
- (ResourceCode.name = ?) AND
- (ResourceCode.scope = ?) AND
- (Resource_.primKey = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.PortletPreferencesFinder.findByPortletId">
<![CDATA[
SELECT
@@ -1005,74 +665,6 @@
(ResourceBlock.name = ?)
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.ResourceFinder.findByContainerResource">
- <![CDATA[
- SELECT
- {Resource_.*}
- FROM
- Resource_
- INNER JOIN
- Group_ ON
- (Resource_.codeId = ?) AND
- (Resource_.primKey = CAST_TEXT(Group_.groupId))
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.ResourceFinder.findByName">
- <![CDATA[
- SELECT
- {Resource_.*}
- FROM
- Resource_
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- WHERE
- (ResourceCode.name = ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.ResourceFinder.findByNoActions">
- <![CDATA[
- SELECT
- {Resource_.*}
- FROM
- Resource_
- LEFT OUTER JOIN
- Permission_ ON
- (Permission_.resourceId = Resource_.resourceId) AND
- (Permission_.actionId = ?)
- WHERE
- (Resource_.codeId = ?) AND
- (Permission_.actionId IS NULL)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.ResourceFinder.findByC_P">
- <![CDATA[
- SELECT
- {Resource_.*}
- FROM
- Resource_
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- WHERE
- (ResourceCode.companyId = ?) AND
- (Resource_.primKey LIKE ?)
- ]]>
- </sql>
- <sql id="com.liferay.portal.service.persistence.ResourceFinder.findByN_S">
- <![CDATA[
- SELECT
- {Resource_.*}
- FROM
- Resource_
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- WHERE
- (ResourceCode.name = ?) AND
- (ResourceCode.scope = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.ResourcePermissionFinder.countByR_S">
<![CDATA[
SELECT
@@ -1420,33 +1012,6 @@
Role_.name ASC
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.RoleFinder.findByC_N_S_P">
- <![CDATA[
- SELECT
- Role_.name AS roleName, Permission_.actionId AS actionId
- FROM
- Permission_
- INNER JOIN
- Resource_ ON
- (Resource_.resourceId = Permission_.resourceId)
- INNER JOIN
- ResourceCode ON
- (ResourceCode.codeId = Resource_.codeId)
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.permissionId = Permission_.permissionId)
- INNER JOIN
- Role_ ON
- (Role_.roleId = Roles_Permissions.roleId)
- WHERE
- (ResourceCode.companyId = ?) AND
- (ResourceCode.name = ?) AND
- (ResourceCode.scope = ?) AND
- (Resource_.primKey = ?)
- ORDER BY
- Role_.name ASC
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.RoleFinder.findByC_N_S_P_A">
<![CDATA[
SELECT
@@ -1470,18 +1035,6 @@
Role_.name ASC
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.RoleFinder.joinByRolesPermissions">
- <![CDATA[
- INNER JOIN
- Roles_Permissions ON
- (Roles_Permissions.roleId = Role_.roleId)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Roles_Permissions.permissionId)
- WHERE
- (Permission_.resourceId = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.RoleFinder.joinByUsersRoles">
<![CDATA[
INNER JOIN
@@ -1675,18 +1228,6 @@
))
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.UserFinder.joinByPermission">
- <![CDATA[
- INNER JOIN
- Users_Permissions ON
- (Users_Permissions.userId = User_.userId)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Users_Permissions.permissionId)
- WHERE
- (Permission_.resourceId = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.UserFinder.joinByUserGroupRole">
<![CDATA[
INNER JOIN
@@ -1868,22 +1409,6 @@
UserGroup.name ASC
]]>
</sql>
- <sql id="com.liferay.portal.service.persistence.UserGroupFinder.joinByGroupsPermissions">
- <![CDATA[
- INNER JOIN
- Group_ ON
- (Group_.classPK = UserGroup.userGroupId)
- INNER JOIN
- Groups_Permissions ON
- (Groups_Permissions.groupId = Group_.groupId)
- INNER JOIN
- Permission_ ON
- (Permission_.permissionId = Groups_Permissions.permissionId)
- WHERE
- (Group_.classNameId = [$CLASS_NAME_ID_COM.LIFERAY.PORTAL.MODEL.USERGROUP$]) AND
- (Permission_.resourceId = ?)
- ]]>
- </sql>
<sql id="com.liferay.portal.service.persistence.UserGroupFinder.joinByUserGroupGroupRole">
<![CDATA[
INNER JOIN
View
3 portal-impl/src/portal.properties
@@ -145,7 +145,8 @@
com.liferay.portal.upgrade.UpgradeProcess_6_0_5\,\
com.liferay.portal.upgrade.UpgradeProcess_6_0_6\,\
com.liferay.portal.upgrade.UpgradeProcess_6_1_0\,\
- com.liferay.portal.upgrade.UpgradeProcess_6_1_1
+ com.liferay.portal.upgrade.UpgradeProcess_6_1_1\,\
+ com.liferay.portal.upgrade.UpgradeProcess_6_1_1_to_6_2_0
upgrade.processes.6000=${upgrade.processes.master}
upgrade.processes.6001=${upgrade.processes.master}
View
22 sql/indexes.properties
@@ -281,9 +281,6 @@ IX_7B590A7A=Group_.T_A
IX_75267DCA=Groups_Orgs.groupId
IX_6BBB7682=Groups_Orgs.organizationId
-IX_C48736B=Groups_Permissions.groupId
-IX_EC97689D=Groups_Permissions.permissionId
-
IX_84471FD2=Groups_Roles.groupId
IX_3103EF3D=Groups_Roles.roleId
@@ -504,9 +501,6 @@ IX_35AA8FA6=MembershipRequest.G_U_S
IX_8A1CC4B=MembershipRequest.GroupId
IX_66D70879=MembershipRequest.UserId
-IX_A425F71A=OrgGroupPermission.GroupId
-IX_6C53DA4E=OrgGroupPermission.PermissionId
-
IX_4A527DD3=OrgGroupRole.GroupId
IX_AB044D1C=OrgGroupRole.RoleId
@@ -525,9 +519,6 @@ IX_CD25266E=PasswordPolicyRel.PasswordPolicyId
IX_326F75BD=PasswordTracker.UserId
-IX_4D19C2B8=Permission_.A_R
-IX_F090C113=Permission_.ResourceId
-
IX_A2E4AFBA=Phone.C_C
IX_9A53569=Phone.C_C_C
IX_812CE07A=Phone.C_C_C_P
@@ -596,10 +587,6 @@ IX_2D4CC782=ResourceBlock.C_N
IX_D63D20BB=ResourceBlockPermission.R_R
IX_4AB3756=ResourceBlockPermission.ResourceBlockId
-IX_A32C097E=ResourceCode.C_N_S
-IX_717FDD47=ResourceCode.CompanyId
-IX_AACAFF40=ResourceCode.Name
-
IX_88705859=ResourcePermission.C_N_P_O
IX_C94C7708=ResourcePermission.C_N_P_R_A
IX_60B99860=ResourcePermission.C_N_S
@@ -615,19 +602,13 @@ IX_BA497163=ResourceTypePermission.C_G_N_R
IX_7D81F66F=ResourceTypePermission.C_N_R
IX_A82690E2=ResourceTypePermission.RoleId
-IX_67DE7856=Resource_.C_P
-IX_2578FBD3=Resource_.CodeId
-
IX_A88E424E=Role_.C_C_C
IX_EBC931B8=Role_.C_N
IX_449A10B9=Role_.CompanyId
IX_F436EC8E=Role_.Name
IX_5EB4E2FB=Role_.Subtype
IX_CBE204=Role_.T_S
-IX_7A3619C6=Roles_Permissions.permissionId
-IX_E04E486D=Roles_Permissions.roleId
-
IX_3BB93ECA=SCFrameworkVersi_SCProductVers.frameworkVersionId
IX_E8D33FF9=SCFrameworkVersi_SCProductVers.productVersionId
@@ -802,9 +783,6 @@ IX_F10B6C6B=Users_Groups.userId
IX_7EF4EC0E=Users_Orgs.organizationId
IX_FB646CA6=Users_Orgs.userId
-IX_8AE58A91=Users_Permissions.permissionId
-IX_C26AA64D=Users_Permissions.userId
-
IX_C19E5F31=Users_Roles.roleId
IX_C1A01806=Users_Roles.userId
View
22 sql/indexes.sql
@@ -279,9 +279,6 @@ create index IX_7B590A7A on Group_ (type_, active_);
create index IX_75267DCA on Groups_Orgs (groupId);
create index IX_6BBB7682 on Groups_Orgs (organizationId);
-create index IX_C48736B on Groups_Permissions (groupId);
-create index IX_EC97689D on Groups_Permissions (permissionId);
-
create index IX_84471FD2 on Groups_Roles (groupId);
create index IX_3103EF3D on Groups_Roles (roleId);
@@ -497,9 +494,6 @@ create index IX_C28C72EC on MembershipRequest (groupId, statusId);
create index IX_35AA8FA6 on MembershipRequest (groupId, userId, statusId);
create index IX_66D70879 on MembershipRequest (userId);
-create index IX_A425F71A on OrgGroupPermission (groupId);
-create index IX_6C53DA4E on OrgGroupPermission (permissionId);
-
create index IX_4A527DD3 on OrgGroupRole (groupId);
create index IX_AB044D1C on OrgGroupRole (roleId);
@@ -518,9 +512,6 @@ create index IX_ED7CF243 on PasswordPolicyRel (passwordPolicyId, classNameId, cl
create index IX_326F75BD on PasswordTracker (userId);
-create unique index IX_4D19C2B8 on Permission_ (actionId, resourceId);
-create index IX_F090C113 on Permission_ (resourceId);
-
create index IX_9F704A14 on Phone (companyId);
create index IX_A2E4AFBA on Phone (companyId, classNameId);
create index IX_9A53569 on Phone (companyId, classNameId, classPK);
@@ -592,10 +583,6 @@ create index IX_2D4CC782 on ResourceBlock (companyId, name);
create index IX_4AB3756 on ResourceBlockPermission (resourceBlockId);
create unique index IX_D63D20BB on ResourceBlockPermission (resourceBlockId, roleId);
-create index IX_717FDD47 on ResourceCode (companyId);
-create unique index IX_A32C097E on ResourceCode (companyId, name, scope);
-create index IX_AACAFF40 on ResourceCode (name);
-
create index IX_88705859 on ResourcePermission (companyId, name, primKey, ownerId);
create index IX_C94C7708 on ResourcePermission (companyId, name, primKey, roleId, actionIds);
create index IX_60B99860 on ResourcePermission (companyId, name, scope);
@@ -611,19 +598,13 @@ create unique index IX_BA497163 on ResourceTypePermission (companyId, groupId, n
create index IX_7D81F66F on ResourceTypePermission (companyId, name, roleId);
create index IX_A82690E2 on ResourceTypePermission (roleId);
-create index IX_2578FBD3 on Resource_ (codeId);
-create unique index IX_67DE7856 on Resource_ (codeId, primKey);
-
create index IX_449A10B9 on Role_ (companyId);
create unique index IX_A88E424E on Role_ (companyId, classNameId, classPK);
create unique index IX_EBC931B8 on Role_ (companyId, name);
create index IX_F436EC8E on Role_ (name);
create index IX_5EB4E2FB on Role_ (subtype);
create index IX_CBE204 on Role_ (type_, subtype);
-create index IX_7A3619C6 on Roles_Permissions (permissionId);
-create index IX_E04E486D on Roles_Permissions (roleId);
-
create index IX_3BB93ECA on SCFrameworkVersi_SCProductVers (frameworkVersionId);
create index IX_E8D33FF9 on SCFrameworkVersi_SCProductVers (productVersionId);
@@ -797,9 +778,6 @@ create index IX_F10B6C6B on Users_Groups (userId);
create index IX_7EF4EC0E on Users_Orgs (organizationId);
create index IX_FB646CA6 on Users_Orgs (userId);
-create index IX_8AE58A91 on Users_Permissions (permissionId);
-create index IX_C26AA64D on Users_Permissions (userId);
-
create index IX_C19E5F31 on Users_Roles (roleId);
create index IX_C1A01806 on Users_Roles (userId);
View
45 sql/portal-tables.sql
@@ -745,12 +745,6 @@ create table Groups_Orgs (
primary key (groupId, organizationId)
);
-create table Groups_Permissions (
- groupId LONG not null,
- permissionId LONG not null,
- primary key (groupId, permissionId)
-);
-
create table Groups_Roles (
groupId LONG not null,
roleId LONG not null,
@@ -1281,13 +1275,6 @@ create table Organization_ (
comments STRING null
);
-create table OrgGroupPermission (
- organizationId LONG not null,
- groupId LONG not null,
- permissionId LONG not null,
- primary key (organizationId, groupId, permissionId)
-);
-
create table OrgGroupRole (
organizationId LONG not null,
groupId LONG not null,
@@ -1364,13 +1351,6 @@ create table PasswordTracker (
password_ VARCHAR(75) null
);
-create table Permission_ (
- permissionId LONG not null primary key,
- companyId LONG,
- actionId VARCHAR(75) null,
- resourceId LONG
-);
-
create table Phone (
phoneId LONG not null primary key,
companyId LONG,
@@ -1558,26 +1538,13 @@ create table ResourceTypePermission (
actionIds LONG
);
-create table Resource_ (
- resourceId LONG not null primary key,
- codeId LONG,
- primKey VARCHAR(255) null
-);
-
create table ResourceAction (
resourceActionId LONG not null primary key,
name VARCHAR(255) null,
actionId VARCHAR(75) null,
bitwiseValue LONG
);
-create table ResourceCode (
- codeId LONG not null primary key,
- companyId LONG,
- name VARCHAR(255) null,
- scope INTEGER
-);
-
create table ResourcePermission (
resourcePermissionId LONG not null primary key,
companyId LONG,
@@ -1601,12 +1568,6 @@ create table Role_ (
subtype VARCHAR(75) null
);
-create table Roles_Permissions (
- roleId LONG not null,
- permissionId LONG not null,
- primary key (roleId, permissionId)
-);
-
create table SCFrameworkVersi_SCProductVers (
frameworkVersionId LONG not null,
productVersionId LONG not null,
@@ -2100,12 +2061,6 @@ create table Users_Orgs (
primary key (userId, organizationId)
);
-create table Users_Permissions (
- userId LONG not null,
- permissionId LONG not null,
- primary key (userId, permissionId)
-);
-
create table Users_Roles (
userId LONG not null,
roleId LONG not null,
View
9 sql/update-6.1.0-6.2.0.sql
@@ -0,0 +1,9 @@
+drop table Groups_Permissions;
+drop table OrgGroupPermission;
+drop table Permission_;
+drop table Resource_;
+drop table ResourceCode;
+drop table Roles_Permissions;
+drop table Users_Permissions;
+
+COMMIT_TRANSACTION;
View
9 sql/update-6.1.1-6.2.0.sql
@@ -0,0 +1,9 @@
+drop table Groups_Permissions;
+drop table OrgGroupPermission;
+drop table Permission_;
+drop table Resource_;
+drop table ResourceCode;
+drop table Roles_Permissions;
+drop table Users_Permissions;
+
+COMMIT_TRANSACTION;

0 comments on commit 1afa11f

Please sign in to comment.