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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sqlite_migration_manager-1.0.0.tar.gz
.
File metadata
- Download URL: sqlite_migration_manager-1.0.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 655ec2c35e044ea8fc12ef700a23920cd169b0ec650186b4a3d01fc78455f3a9 |
|
MD5 | b7196cff9853c5e9d1e15edc651da82a |
|
BLAKE2b-256 | 786ca766b76b04e0c52cb4090a689f4e03458364459807ab6023cf9d1b6b65f8 |
File details
Details for the file sqlite_migration_manager-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: sqlite_migration_manager-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee659e4b973f07355f5573cda7f05531401ae66d358ff3c0dbf314f7e50559f8 |
|
MD5 | 429a0e9ab5eb1caa4c6a716af4d04639 |
|
BLAKE2b-256 | 969871e8e72e719e3274fbf2adb5a257dfb590fa1070615fc54651ec639ca3bd |