Commit 9a0557f9 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: Include organisation_security_uid and project_security_uid on catalog table

This is uses to index roles for projects and organisations to not cause UIDs explosion
parent 659847d4
REPLACE INTO REPLACE INTO
catalog catalog
(`uid`, `security_uid`, `group_security_uid`, `shadow_security_uid`, `computer_security_uid`,`user_security_uid`, `subscription_security_uid`, `owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`, (`uid`, `security_uid`, `group_security_uid`, `shadow_security_uid`, `computer_security_uid`,`user_security_uid`, `subscription_security_uid`, `organisation_security_uid`,`project_security_uid`,
`owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`,
`portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`, `portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`,
`causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`, `causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`,
`source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `modification_date`) `source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `modification_date`)
...@@ -14,6 +15,8 @@ VALUES ...@@ -14,6 +15,8 @@ VALUES
<dtml-sqlvar expr="computer_security_uid[loop_item]" type="int" optional>, <dtml-sqlvar expr="computer_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="user_security_uid[loop_item]" type="int" optional>, <dtml-sqlvar expr="user_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="subscription_security_uid[loop_item]" type="int" optional>, <dtml-sqlvar expr="subscription_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="organisation_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="project_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="getOwnerInfo[loop_item]['id']" type="string">, <dtml-sqlvar expr="getOwnerInfo[loop_item]['id']" type="string">,
<dtml-sqlvar expr="(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or ''" type="string" optional>, <dtml-sqlvar expr="(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or ''" type="string" optional>,
<dtml-sqlvar expr="getPath[loop_item]" type="string">, <dtml-sqlvar expr="getPath[loop_item]" type="string">,
......
...@@ -19,6 +19,8 @@ shadow_security_uid\n ...@@ -19,6 +19,8 @@ shadow_security_uid\n
computer_security_uid\n computer_security_uid\n
subscription_security_uid\n subscription_security_uid\n
user_security_uid\n user_security_uid\n
organisation_security_uid\n
project_security_uid\n
getOwnerInfo\n getOwnerInfo\n
getViewPermissionOwner\n getViewPermissionOwner\n
getPath\n getPath\n
......
REPLACE INTO REPLACE INTO
catalog catalog
(`uid`, `security_uid`, `group_security_uid`, `shadow_security_uid`, `computer_security_uid`,`user_security_uid`, `subscription_security_uid`, `owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`, (`uid`, `security_uid`, `group_security_uid`, `shadow_security_uid`, `computer_security_uid`,`user_security_uid`, `subscription_security_uid`, `organisation_security_uid`,
`project_security_uid`, `owner`, `viewable_owner`, `path`, `relative_url`, `parent_uid`, `id`, `description`, `title`, `meta_type`,
`portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`, `portal_type`, `opportunity_state`, `corporate_registration_code`, `ean13_code`, `validation_state`, `simulation_state`,
`causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`, `grouping_date`, `causality_state`, `invoice_state`, `payment_state`, `event_state`, `immobilisation_state`, `reference`, `grouping_reference`, `grouping_date`,
`source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `creation_date`, `source_reference`, `destination_reference`, `string_index`, `int_index`, `float_index`, `has_cell_content`, `creation_date`,
...@@ -15,6 +16,8 @@ VALUES ...@@ -15,6 +16,8 @@ VALUES
<dtml-sqlvar expr="computer_security_uid[loop_item]" type="int" optional>, <dtml-sqlvar expr="computer_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="user_security_uid[loop_item]" type="int" optional>, <dtml-sqlvar expr="user_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="subscription_security_uid[loop_item]" type="int" optional>, <dtml-sqlvar expr="subscription_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="organisation_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="project_security_uid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="getOwnerInfo[loop_item]['id']" type="string">, <dtml-sqlvar expr="getOwnerInfo[loop_item]['id']" type="string">,
<dtml-sqlvar expr="(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or ''" type="string" optional>, <dtml-sqlvar expr="(getViewPermissionOwner[loop_item] is not None) and getViewPermissionOwner[loop_item] or ''" type="string" optional>,
<dtml-sqlvar expr="getPath[loop_item]" type="string">, <dtml-sqlvar expr="getPath[loop_item]" type="string">,
......
...@@ -19,6 +19,8 @@ shadow_security_uid\n ...@@ -19,6 +19,8 @@ shadow_security_uid\n
computer_security_uid\n computer_security_uid\n
user_security_uid\n user_security_uid\n
subscription_security_uid\n subscription_security_uid\n
organisation_security_uid\n
project_security_uid\n
getOwnerInfo\n getOwnerInfo\n
getViewPermissionOwner\n getViewPermissionOwner\n
getPath\n getPath\n
......
...@@ -10,6 +10,8 @@ CREATE TABLE `catalog` ( ...@@ -10,6 +10,8 @@ CREATE TABLE `catalog` (
`computer_security_uid` INT UNSIGNED, `computer_security_uid` INT UNSIGNED,
`user_security_uid` INT UNSIGNED, `user_security_uid` INT UNSIGNED,
`subscription_security_uid` INT UNSIGNED, `subscription_security_uid` INT UNSIGNED,
`organisation_security_uid` INT UNSIGNED,
`project_security_uid` INT UNSIGNED,
`owner` varbinary(255) NOT NULL default '', `owner` varbinary(255) NOT NULL default '',
`viewable_owner` varbinary(255) NOT NULL default '', `viewable_owner` varbinary(255) NOT NULL default '',
`path` varchar(255) NOT NULL default '', `path` varchar(255) NOT NULL default '',
......
<key_list> <key_list>
<key>causality_subscription_request_related_uid | category,catalog/uid/z_related_causality_subscription_request</key> <key>causality_subscription_request_related_uid | category,catalog/uid/z_related_causality_subscription_request</key>
<key>default_or_child_aggregate_reference | catalog,category,catalog/reference/z_related_default_or_child_aggregate</key>
<key>default_or_child_aggregate_uid | catalog,category,catalog/uid/z_related_default_or_child_aggregate</key>
<key>related_predecessor_but_with_different_title_than_catalog_title | category,catalog/uid/z_related_predecessor_but_with_different_title_than_catalog_title</key> <key>related_predecessor_but_with_different_title_than_catalog_title | category,catalog/uid/z_related_predecessor_but_with_different_title_than_catalog_title</key>
</key_list> </key_list>
\ No newline at end of file
<key_list> <key_list>
<key>computer | computer_security_uid</key> <key>computer | computer_security_uid</key>
<key>group | group_security_uid</key> <key>group | group_security_uid</key>
<key>organisation | organisation_security_uid</key>
<key>project | project_security_uid</key>
<key>shadow | shadow_security_uid</key> <key>shadow | shadow_security_uid</key>
<key>subscription | subscription_security_uid</key> <key>subscription | subscription_security_uid</key>
<key>user | user_security_uid</key> <key>user | user_security_uid</key>
......
...@@ -2,4 +2,6 @@ group | group_security_uid ...@@ -2,4 +2,6 @@ group | group_security_uid
shadow | shadow_security_uid shadow | shadow_security_uid
computer | computer_security_uid computer | computer_security_uid
user | user_security_uid user | user_security_uid
subscription | subscription_security_uid subscription | subscription_security_uid
\ No newline at end of file organisation | organisation_security_uid
project | project_security_uid
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment