WIP on README - first draft
This commit is contained in:
parent
703be3e0fa
commit
62240723ca
17 changed files with 197 additions and 21 deletions
0
redis_developer/model/cli/__init__.py
Normal file
0
redis_developer/model/cli/__init__.py
Normal file
16
redis_developer/model/cli/migrate.py
Normal file
16
redis_developer/model/cli/migrate.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
import click
|
||||
from redis_developer.om.migrations.migrator import Migrator
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("--module", default="redis_developer")
|
||||
def migrate(module):
|
||||
migrator = Migrator(module)
|
||||
|
||||
if migrator.migrations:
|
||||
print("Pending migrations:")
|
||||
for migration in migrator.migrations:
|
||||
print(migration)
|
||||
|
||||
if input(f"Run migrations? (y/n) ") == "y":
|
||||
migrator.run()
|
Loading…
Add table
Add a link
Reference in a new issue