Upgrade script from 3.7.1 to 3.7.2
This commit is contained in:
		
							parent
							
								
									6e76509619
								
							
						
					
					
						commit
						1671989aff
					
				
							
								
								
									
										16
									
								
								application/src/main/data/upgrade/3.7.1/schema_update.sql
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								application/src/main/data/upgrade/3.7.1/schema_update.sql
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
			
		||||
--
 | 
			
		||||
-- Copyright © 2016-2024 The Thingsboard Authors
 | 
			
		||||
--
 | 
			
		||||
-- Licensed 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.
 | 
			
		||||
--
 | 
			
		||||
 | 
			
		||||
@ -140,6 +140,9 @@ public class ThingsboardInstallService {
 | 
			
		||||
                        case "3.7.0":
 | 
			
		||||
                            log.info("Upgrading ThingsBoard from version 3.7.0 to 3.7.1 ...");
 | 
			
		||||
                            databaseEntitiesUpgradeService.upgradeDatabase("3.7.0");
 | 
			
		||||
                        case "3.7.1":
 | 
			
		||||
                            log.info("Upgrading ThingsBoard from version 3.7.1 to 3.7.2 ...");
 | 
			
		||||
                            databaseEntitiesUpgradeService.upgradeDatabase("3.7.1");
 | 
			
		||||
                            //TODO DON'T FORGET to update switch statement in the CacheCleanupService if you need to clear the cache
 | 
			
		||||
                            break;
 | 
			
		||||
                        default:
 | 
			
		||||
 | 
			
		||||
@ -124,6 +124,9 @@ public class SqlDatabaseUpgradeService implements DatabaseEntitiesUpgradeService
 | 
			
		||||
            case "3.7.0":
 | 
			
		||||
                updateSchema("3.7.0", 3007000, "3.7.1", 3007001, null);
 | 
			
		||||
                break;
 | 
			
		||||
            case "3.7.1":
 | 
			
		||||
                updateSchema("3.7.1", 3007001, "3.7.2", 3007002, null);
 | 
			
		||||
                break;
 | 
			
		||||
            default:
 | 
			
		||||
                throw new RuntimeException("Unable to upgrade SQL database, unsupported fromVersion: " + fromVersion);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user