Merge branch 'main' into asyncio
This commit is contained in:
commit
ca6ae7d6e9
47 changed files with 3285 additions and 760 deletions
0
aredis_om/model/cli/__init__.py
Normal file
0
aredis_om/model/cli/__init__.py
Normal file
17
aredis_om/model/cli/migrate.py
Normal file
17
aredis_om/model/cli/migrate.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
import click
|
||||
|
||||
from aredis_om.model.migrations.migrator import Migrator
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("--module", default="aredis_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