diff --git a/CHANGELOG.md b/CHANGELOG.md index 67f2b2d85..9bf41975e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Refactored/Updated PartSiteInformationAsPlanned maven module to support multi version. - Refactored/Updated SingleLevelUsageAsBuilt maven module to support multi version. - Refactored/Updated PCF maven module to support multi version. +- Added new flyway files. ## [2.3.6] - 2024-03-06 diff --git "a/modules/sde-core/src/main/resources/edc_request_template\n/edc_asset_lookup.json" b/modules/sde-core/src/main/resources/edc_request_template/edc_asset_lookup.json similarity index 100% rename from "modules/sde-core/src/main/resources/edc_request_template\n/edc_asset_lookup.json" rename to modules/sde-core/src/main/resources/edc_request_template/edc_asset_lookup.json diff --git "a/modules/sde-core/src/main/resources/edc_request_template\n/edc_asset_lookup_for_exchange.json" b/modules/sde-core/src/main/resources/edc_request_template/edc_asset_lookup_for_exchange.json similarity index 100% rename from "modules/sde-core/src/main/resources/edc_request_template\n/edc_asset_lookup_for_exchange.json" rename to modules/sde-core/src/main/resources/edc_request_template/edc_asset_lookup_for_exchange.json diff --git "a/modules/sde-core/src/main/resources/flyway/V22__add_new_role_for_download.sql\n" "b/modules/sde-core/src/main/resources/flyway/V22__add_new_role_for_download.sql\n" new file mode 100644 index 000000000..2fd9d8bbc --- /dev/null +++ "b/modules/sde-core/src/main/resources/flyway/V22__add_new_role_for_download.sql\n" @@ -0,0 +1,35 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +INSERT INTO sde_permission (sde_permission,description) + VALUES ('consumer_subscribe_download_data_offers','Allows consumer user to subscribe and download data'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('consumer_download_data_offer','Allows consumer user to download data again'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('consumer_view_download_history','Allows consumer user to view download data history'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('consumer_subscribe_download_data_offers','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('consumer_download_data_offer','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('consumer_view_download_history','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('consumer_download_data_offer','User'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('consumer_view_download_history','User'); \ No newline at end of file diff --git a/modules/sde-core/src/main/resources/flyway/V23__add_new_role_for_auto_config.sql b/modules/sde-core/src/main/resources/flyway/V23__add_new_role_for_auto_config.sql new file mode 100644 index 000000000..81b132d23 --- /dev/null +++ b/modules/sde-core/src/main/resources/flyway/V23__add_new_role_for_auto_config.sql @@ -0,0 +1,33 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +INSERT INTO sde_permission (sde_permission,description) + VALUES ('auto_config_management','Allows Admin user to update auto upload configuration'); + +INSERT INTO sde_permission (sde_permission,description) + VALUES ('policy_management','Allows Admin user to add/update/delete policy configuration'); + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('auto_config_management','Admin'); + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policy_management','Admin'); + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policy_management','Creator'); \ No newline at end of file diff --git "a/modules/sde-core/src/main/resources/flyway/V24__Alter_process_report_table.sql\n" "b/modules/sde-core/src/main/resources/flyway/V24__Alter_process_report_table.sql\n" new file mode 100644 index 000000000..374992424 --- /dev/null +++ "b/modules/sde-core/src/main/resources/flyway/V24__Alter_process_report_table.sql\n" @@ -0,0 +1,23 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +ALTER TABLE process_report ADD policy_uuid varchar NULL; + +ALTER TABLE process_report ALTER COLUMN usage_policy TYPE text USING usage_policy::text; \ No newline at end of file diff --git "a/modules/sde-core/src/main/resources/flyway/V25__add_new_role_for_pcf_exchange.sql\n" "b/modules/sde-core/src/main/resources/flyway/V25__add_new_role_for_pcf_exchange.sql\n" new file mode 100644 index 000000000..2ea92550b --- /dev/null +++ "b/modules/sde-core/src/main/resources/flyway/V25__add_new_role_for_pcf_exchange.sql\n" @@ -0,0 +1,43 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +INSERT INTO sde_permission (sde_permission,description) + VALUES ('search_pcf','Search PCF value in consumer section'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('request_for_pcf_value','Request for PCF value'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('action_on_pcf_request','Action on PCF request'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('view_pcf_history','View PCF history in provider and consumer'); + + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('search_pcf','User'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('view_pcf_history','User'); + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('action_on_pcf_request','Admin'); + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('search_pcf','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('request_for_pcf_value','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('view_pcf_history','Creator'); \ No newline at end of file diff --git a/modules/sde-core/src/main/resources/flyway/V26__add_new_role_for_policy_hub.sql b/modules/sde-core/src/main/resources/flyway/V26__add_new_role_for_policy_hub.sql new file mode 100644 index 000000000..9be3c45df --- /dev/null +++ b/modules/sde-core/src/main/resources/flyway/V26__add_new_role_for_policy_hub.sql @@ -0,0 +1,47 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ +INSERT INTO sde_permission (sde_permission,description) + VALUES ('policyhub_view_policy_attributes','View policy attributes'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('policyhub_view_policy_types','View policy types'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('policyhub_view_policy_content','View policy content'); +INSERT INTO sde_permission (sde_permission,description) + VALUES ('policyhub_policy_content','Allow user to create policy content'); + + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_view_policy_attributes','User'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_view_policy_types','User'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_view_policy_content','User'); + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_policy_content','Admin'); + +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_view_policy_attributes','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_view_policy_types','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_view_policy_content','Creator'); +INSERT INTO sde_role_permission_mapping (sde_permission,sde_role) + VALUES ('policyhub_policy_content','Creator'); \ No newline at end of file diff --git a/modules/sde-core/src/main/resources/flyway/V27__Alter_process_report_table.sql b/modules/sde-core/src/main/resources/flyway/V27__Alter_process_report_table.sql new file mode 100644 index 000000000..7d47ab04f --- /dev/null +++ b/modules/sde-core/src/main/resources/flyway/V27__Alter_process_report_table.sql @@ -0,0 +1,22 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +ALTER TABLE process_report RENAME COLUMN bpn_numbers TO access_policies; +ALTER TABLE process_report RENAME COLUMN usage_policy TO usage_policies; \ No newline at end of file diff --git a/modules/sde-core/src/main/resources/flyway/V28__Alter_pcf_aspect_Tables.sql b/modules/sde-core/src/main/resources/flyway/V28__Alter_pcf_aspect_Tables.sql new file mode 100644 index 000000000..9fb77f79f --- /dev/null +++ b/modules/sde-core/src/main/resources/flyway/V28__Alter_pcf_aspect_Tables.sql @@ -0,0 +1,22 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +ALTER TABLE IF EXISTS pcf_aspect +ADD COLUMN IF NOT EXISTS distributionStageAircraftGhgEmissions FLOAT8 NULL; \ No newline at end of file diff --git a/modules/sde-core/src/main/resources/flyway/V29__Alter_pcf_request_Tables.sql b/modules/sde-core/src/main/resources/flyway/V29__Alter_pcf_request_Tables.sql new file mode 100644 index 000000000..6ed45d2ff --- /dev/null +++ b/modules/sde-core/src/main/resources/flyway/V29__Alter_pcf_request_Tables.sql @@ -0,0 +1,24 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +ALTER TABLE IF EXISTS pcf_requests_tbl +ALTER COLUMN remark TYPE text USING remark::text; +ALTER TABLE IF EXISTS pcf_requests_tbl +ALTER COLUMN message TYPE text USING message::text; \ No newline at end of file diff --git a/modules/sde-core/src/main/resources/flyway/V30__Alter_single_level_bom_asplanned_Tables.sql b/modules/sde-core/src/main/resources/flyway/V30__Alter_single_level_bom_asplanned_Tables.sql new file mode 100644 index 000000000..a41873b81 --- /dev/null +++ b/modules/sde-core/src/main/resources/flyway/V30__Alter_single_level_bom_asplanned_Tables.sql @@ -0,0 +1,21 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +ALTER TABLE IF EXISTS single_level_bom_as_planned ADD IF NOT EXISTS measurement_unit VARCHAR NULL; \ No newline at end of file diff --git a/modules/sde-core/src/main/resources/flyway/V31__Alter_pcf_exchange_response_Tables.sql b/modules/sde-core/src/main/resources/flyway/V31__Alter_pcf_exchange_response_Tables.sql new file mode 100644 index 000000000..3f76a2a08 --- /dev/null +++ b/modules/sde-core/src/main/resources/flyway/V31__Alter_pcf_exchange_response_Tables.sql @@ -0,0 +1,21 @@ +/******************************************************************************** + * Copyright (c) 2024 T-Systems International GmbH + * Copyright (c) 2024 Contributors to the Eclipse Foundation + * + * See the NOTICE file(s) distributed with this work for additional + * information regarding copyright ownership. + * + * This program and the accompanying materials are made available under the + * terms of the Apache License, Version 2.0 which is available at + * https://www.apache.org/licenses/LICENSE-2.0. + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + * SPDX-License-Identifier: Apache-2.0 + ********************************************************************************/ + +ALTER TABLE IF EXISTS pcf_response_tbl ADD IF NOT EXISTS message text NULL; \ No newline at end of file