-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 4.20: UI: Fix userdata and load balancer selection (#10016) Prevent password updates for SAML and LDAP users (#9999) cloudstack-migrate-databases: sql AND added (#10033) engine/schema: move SQLs to 4.20.0 to 4.20.1 upgrade (#10018) Remove user from project before deletion (#10008) Simplify validation for creating volume templates via UI (#9828)
- Loading branch information
Showing
15 changed files
with
189 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41910to41920.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://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. | ||
package com.cloud.upgrade.dao; | ||
|
||
import com.cloud.utils.exception.CloudRuntimeException; | ||
|
||
import java.io.InputStream; | ||
import java.sql.Connection; | ||
|
||
public class Upgrade41910to41920 implements DbUpgrade { | ||
|
||
@Override | ||
public String[] getUpgradableVersionRange() { | ||
return new String[]{"4.19.1.0", "4.19.2.0"}; | ||
} | ||
|
||
@Override | ||
public String getUpgradedVersion() { | ||
return "4.19.2.0"; | ||
} | ||
|
||
@Override | ||
public boolean supportsRollingUpgrade() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public InputStream[] getPrepareScripts() { | ||
final String scriptFile = "META-INF/db/schema-41910to41920.sql"; | ||
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile); | ||
if (script == null) { | ||
throw new CloudRuntimeException("Unable to find " + scriptFile); | ||
} | ||
|
||
return new InputStream[]{script}; | ||
} | ||
|
||
@Override | ||
public void performDataMigration(Connection conn) { | ||
} | ||
|
||
@Override | ||
public InputStream[] getCleanupScripts() { | ||
final String scriptFile = "META-INF/db/schema-41910to41920-cleanup.sql"; | ||
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile); | ||
if (script == null) { | ||
throw new CloudRuntimeException("Unable to find " + scriptFile); | ||
} | ||
|
||
return new InputStream[]{script}; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
engine/schema/src/main/resources/META-INF/db/schema-41910to41920-cleanup.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-- Licensed to the Apache Software Foundation (ASF) under one | ||
-- or more contributor license agreements. See the NOTICE file | ||
-- distributed with this work for additional information | ||
-- regarding copyright ownership. The ASF licenses this file | ||
-- to you under the Apache License, Version 2.0 (the | ||
-- "License"); you may not use this file except in compliance | ||
-- with the License. You may obtain a copy of the License at | ||
-- | ||
-- http://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. | ||
|
||
--; | ||
-- Schema upgrade cleanup from 4.19.1.0 to 4.19.2.0 | ||
--; | ||
|
||
-- Delete `project_account` entries for users that were removed | ||
DELETE FROM `cloud`.`project_account` WHERE `user_id` IN (SELECT `id` FROM `cloud`.`user` WHERE `removed`); |
20 changes: 20 additions & 0 deletions
20
engine/schema/src/main/resources/META-INF/db/schema-41910to41920.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- Licensed to the Apache Software Foundation (ASF) under one | ||
-- or more contributor license agreements. See the NOTICE file | ||
-- distributed with this work for additional information | ||
-- regarding copyright ownership. The ASF licenses this file | ||
-- to you under the Apache License, Version 2.0 (the | ||
-- "License"); you may not use this file except in compliance | ||
-- with the License. You may obtain a copy of the License at | ||
-- | ||
-- http://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. | ||
|
||
--; | ||
-- Schema upgrade from 4.19.1.0 to 4.19.2.0 | ||
--; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters