Rename to redis_om
This commit is contained in:
parent
9b18dae2eb
commit
c9967b0d40
19 changed files with 29 additions and 29 deletions
0
redis_om/model/cli/__init__.py
Normal file
0
redis_om/model/cli/__init__.py
Normal file
17
redis_om/model/cli/migrate.py
Normal file
17
redis_om/model/cli/migrate.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import click
|
||||
|
||||
from redis_om.model.migrations.migrator import Migrator
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("--module", default="redis_om")
|
||||
def migrate(module):
|
||||
migrator = Migrator(module)
|
||||
|
||||
if migrator.migrations:
|
||||
print("Pending migrations:")
|
||||
for migration in migrator.migrations:
|
||||
print(migration)
|
||||
|
||||
if input("Run migrations? (y/n) ") == "y":
|
||||
migrator.run()
|
Loading…
Add table
Add a link
Reference in a new issue