Skip to content

Commit 7d7bc94

Browse files
committed
📝 (README.md): document new option for specifying migrations path
✨ (main.py): add support for specifying migrations path with --path option ⬆️ (pyproject.toml): bump version to 0.2.1 for new feature addition
1 parent 557a8f5 commit 7d7bc94

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ To rollback to a specific version, you can pass the version
6767
sqlift down 001_create_table
6868
```
6969

70+
You can also select specific path for migrations directory
71+
72+
```bash
73+
sqlift up --path /path/to/migrations
74+
```
75+
7076
## Configuration
7177

7278
SQLift uses environment variables to configure the database connection. You can set the following environment variables to configure the database connection.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "SQLift"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
description = "Simple CLI migration tool for SQL databases"
55
license = "MIT"
66
authors = ["SpaceShaman <spaceshaman@tuta.io>"]

sqlift/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def up(
1818
] = None,
1919
migrations_path: Annotated[
2020
str,
21-
Option("--migrations-path", "-P", help="Path to migrations folder"),
21+
Option("--path", "-P", help="Path to migrations folder"),
2222
] = "migrations",
2323
) -> None:
2424
"""Apply migrations up to the target migration or all if no target is provided."""
@@ -44,7 +44,7 @@ def down(
4444
Optional[str], Argument(help="Name of the target migration to revert down to")
4545
] = None,
4646
migrations_path: Annotated[
47-
str, Option("--migrations-path", "-P", help="Path to migrations folder")
47+
str, Option("--path", "-P", help="Path to migrations folder")
4848
] = "migrations",
4949
) -> None:
5050
"""Revert migrations down to the target migration or all if no target is provided."""

0 commit comments

Comments
 (0)