CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-com-liferay-portal--com-liferay-portal-impl

Core implementation module containing the fundamental services, utilities, and infrastructure components for the Liferay Digital Experience Platform.

Pending
Overview
Eval results
Files

database-upgrades.mddocs/

Database Upgrades

Version-specific database migration utilities supporting upgrades between Liferay 7.x versions with comprehensive schema transformation capabilities and data migration procedures.

Capabilities

Upgrade Utilities

Common utilities for database schema upgrades and data migrations.

/**
 * Base upgrade process providing common upgrade functionality
 */
public abstract class UpgradeProcess {
    
    /**
     * Executes the upgrade process
     * @throws UpgradeException if upgrade fails
     */
    public abstract void upgrade() throws UpgradeException;
    
    /**
     * Gets upgrade step description
     * @return description of what this upgrade does
     */
    public abstract String getDescription();
    
    /**
     * Checks if upgrade is applicable to current schema
     * @return true if upgrade should be executed
     */
    protected boolean isApplicable();
    
    /**
     * Executes SQL statements for schema changes
     * @param sql SQL statements to execute
     * @throws SQLException if SQL execution fails
     */
    protected void runSQL(String... sql) throws SQLException;
    
    /**
     * Alters table structure
     * @param tableName table to alter
     * @param alterStatement SQL alter statement
     * @throws SQLException if alter fails
     */
    protected void alterTable(String tableName, String alterStatement) throws SQLException;
}

Liferay 7.0.0 Upgrades

Version-specific upgrade implementations for Liferay 7.0.0 migration procedures.

/**
 * Upgrade processes for Liferay 7.0.0 migration
 */
public class UpgradeSchema_7_0_0 extends UpgradeProcess {
    
    /**
     * Upgrades database schema to Liferay 7.0.0 format
     * @throws UpgradeException if schema upgrade fails
     */
    @Override
    public void upgrade() throws UpgradeException;
}

/**
 * Data migration for Liferay 7.0.0 upgrade
 */
public class UpgradeData_7_0_0 extends UpgradeProcess {
    
    /**
     * Migrates data to Liferay 7.0.0 compatible format
     * @throws UpgradeException if data migration fails
     */
    @Override
    public void upgrade() throws UpgradeException;
}

Liferay 7.0.5 Upgrades

Version-specific upgrade implementations for Liferay 7.0.5 migration procedures.

/**
 * Upgrade processes for Liferay 7.0.5 migration
 */
public class UpgradeSchema_7_0_5 extends UpgradeProcess {
    
    /**
     * Upgrades database schema to Liferay 7.0.5 format
     * @throws UpgradeException if schema upgrade fails
     */
    @Override
    public void upgrade() throws UpgradeException;
}

Liferay 7.1.x Upgrades

Version-specific upgrade implementations for Liferay 7.1.x migration procedures.

/**
 * Upgrade processes for Liferay 7.1.x migration
 */
public class UpgradeSchema_7_1_x extends UpgradeProcess {
    
    /**
     * Upgrades database schema to Liferay 7.1.x format
     * @throws UpgradeException if schema upgrade fails
     */
    @Override
    public void upgrade() throws UpgradeException;
}

Usage Examples

Running Database Upgrades:

// Execute upgrade process
UpgradeProcess upgrade = new UpgradeSchema_7_0_0();
if (upgrade.isApplicable()) {
    upgrade.upgrade();
}

Integration with Portal Framework

Database upgrades integrate with:

  • Portal Startup - Automatic upgrade detection and execution
  • Data Migration - Safe data transformation procedures
  • Schema Versioning - Version tracking and validation
  • Rollback Support - Backup and recovery procedures

Error Handling

  • UpgradeException - Upgrade process failures
  • SQLException - Database operation errors
  • SchemaException - Schema validation failures
  • DataMigrationException - Data transformation errors

Install with Tessl CLI

npx tessl i tessl/maven-com-liferay-portal--com-liferay-portal-impl

docs

bean-management.md

database-orm.md

database-upgrades.md

framework-integration.md

index.md

lifecycle-events.md

portlet-framework.md

service-layer.md

template-processing.md

utility-services.md

web-security.md

tile.json