Skip to content

The Schema Evolution Analyzer is a tool that helps you understand and manage changes in your database schema over time. It provides insights into the impact of schema changes on existing queries and applications, making it easier to evolve your database schema with confidence.

License

Notifications You must be signed in to change notification settings

UltraInstinct0x/schema-evolution-analyzer

Repository files navigation

Schema Evolution Analyzer

The Schema Evolution Analyzer is a powerful tool that helps you understand and manage changes in your database schema over time. It provides comprehensive insights into the impact of schema changes on existing queries and applications, making it easier to evolve your database schema with confidence.

Features

  • Analyze schema evolution patterns and detect potential issues
  • Identify queries and applications affected by schema changes
  • Suggest optimizations and modifications for impacted queries
  • Integrate with your existing database change management process
  • Comprehensive monitoring and logging for production environments
  • Asynchronous analysis with concurrent processing for improved performance

Installation

pip Installation

You can install the Schema Evolution Analyzer using pip:

pip install schema-evolution-analyzer

Local Installation

  1. Clone the repository:

    git clone https://github.com/ultrainstinct0x/schema-evolution-analyzer.git
    cd schema-evolution-analyzer
  2. Create a virtual environment and activate it:

    python -m venv venv
    source venv/bin/activate
  3. Install the required dependencies:

    make install

Docker Installation

  1. Clone the repository:

    git clone https://github.com/ultrainstinct0x/schema-evolution-analyzer.git
    cd schema-evolution-analyzer
  2. Build the Docker image:

    docker build -t schema-evolution-analyzer .

Usage

Command Line Interface

The Schema Evolution Analyzer provides a command-line interface for easy usage:

schema-evolution-analyzer --config config.yaml

Python API

You can also use the Schema Evolution Analyzer programmatically in your Python code:

from schema_analyzer import SchemaEvolutionAnalyzer, AnalyzerConfig

config = AnalyzerConfig.from_file("config.yaml")
analyzer = SchemaEvolutionAnalyzer(config)

result = analyzer.analyze_evolution(old_schema, new_schema)
print(result)

Docker Usage

Run the Schema Evolution Analyzer using Docker:

docker run -v $(pwd)/config.yaml:/app/config.yaml schema-evolution-analyzer

Configuration

The Schema Evolution Analyzer can be configured using a YAML configuration file. An example configuration file is provided in config.example.yaml. Copy this file to config.yaml and modify it according to your needs.

Project Structure

schema-evolution-analyzer/
├── schema_analyzer
│   ├── analyze.py
│   ├── logging.py
│   ├── metrics.py
│   ├── security.py
│   ├── storage.py
│   └── utills
│       ├── diff_generator.py
│       ├── impact_analyzer.py
│       ├── query_validator.py
│       └── schema_validator.py
├── tests
│   └── performance
│       └── locustfile.py
├── config
│   └── analyzer.yaml
├── config.example.yaml
├── requirements.txt
├── Dockerfile
├── setup.py
├── Makefile
├── CONTRIBUTING.md
├── CHANGELOG.md
├── README.md
└── LICENSE
graph TD;
    schema_analyzer-->analyzer.py;
    schema_analyzer-->config.py;
    schema_analyzer-->models.py;
    schema_analyzer-->storage;
    storage-->base.py;
    storage-->postgresql.py;
    schema_analyzer-->utils;
    utils-->helpers.py;
    tests-->test_analyzer.py;
    tests-->test_config.py;
    tests-->test_storage.py;
Loading

Contributing

Contributions are welcome! Please see the CONTRIBUTING.md file for guidelines on how to contribute to this project.

Testing

To run the test suite, use the following command:

make test

License

This project is licensed under the MIT License. See the LICENSE file for details.

Changelog

See the CHANGELOG.md file for a list of changes in each release.

Support

If you encounter any issues or have questions, please open an issue on the GitHub repository.

About

The Schema Evolution Analyzer is a tool that helps you understand and manage changes in your database schema over time. It provides insights into the impact of schema changes on existing queries and applications, making it easier to evolve your database schema with confidence.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published