Abyss-lord opened a new issue, #6998:
URL: https://github.com/apache/gravitino/issues/6998

   ### Describe the feature
   
   Add SchemaTool, SchemaTool is designed to replace the traditional `source` 
script import method by providing a unified CLI that implements the following 
core features:
   
   - Database Initialization: Automatically detect MySQL or PostgreSQL and 
execute the corresponding versioned initialization SQL.
   - Integrity Validation: Compare the server version with the schema version 
and verify key tables and column definitions.
   - Storage Inspection: Output current database connection details, warehouse 
path, and version status.
   - Smooth Version Upgrades: Load and execute upgrade scripts sequentially 
based on the specified version range.
   
   ### Motivation
   
   Currently, Gravitino’s initialization process depends on launching the MySQL 
client and running the source command to load SQL scripts. This approach has 
two main drawbacks:
   
   - **Lack of elegance**: It requires manually entering the MySQL console, 
which is cumbersome and error‑prone.
   - **No integrity checks**: After initialization, there is no automated 
verification of database objects, which can lead to inconsistencies between 
environments.
   
   ### Describe the solution
   
   To address these issues, we need to design a new Schema tool (“SchemaTool”) 
that provides a standardized CLI for database initialization, integrity 
validation, storage inspection, and version upgrades.
   
   ### Additional context
   
   design 
code:https://docs.google.com/document/d/1D7rUBNIATN1JoBXBlrkwK8ogC6kwzI-Xe1BJoKeFxLc/edit?usp=sharing


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to