Skip to main content

A SQLite database migration management library

Project description

SQLite Migration Manager

A simple file based SQlite migration manager python library

Installation

You can install SQLite Migration Manager using pip:

pip install sqlite-migration-manager

Usage

Here's a basic example of how to use SQLite Migration Manager:

from sqlite_migration_manager import SQLiteMigrationManager

db_path = 'path/to/your/database.db'
patches_dir = 'path/to/your/migration/files'

with SQLiteMigrationManager(db_path, patches_dir) as manager:
    manager.run_migrations()

Migration Files

Create SQL migration files in your patches directory with names following the pattern:

001_initial_schema.sql
002_add_users_table.sql
003_add_email_to_users.sql
...

The numeric prefix determines the order of execution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sqlite_migration_manager-1.0.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

sqlite_migration_manager-1.0.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file sqlite_migration_manager-1.0.0.tar.gz.

File metadata

File hashes

Hashes for sqlite_migration_manager-1.0.0.tar.gz
Algorithm Hash digest
SHA256 655ec2c35e044ea8fc12ef700a23920cd169b0ec650186b4a3d01fc78455f3a9
MD5 b7196cff9853c5e9d1e15edc651da82a
BLAKE2b-256 786ca766b76b04e0c52cb4090a689f4e03458364459807ab6023cf9d1b6b65f8

See more details on using hashes here.

File details

Details for the file sqlite_migration_manager-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sqlite_migration_manager-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee659e4b973f07355f5573cda7f05531401ae66d358ff3c0dbf314f7e50559f8
MD5 429a0e9ab5eb1caa4c6a716af4d04639
BLAKE2b-256 969871e8e72e719e3274fbf2adb5a257dfb590fa1070615fc54651ec639ca3bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page