Add Makefile, black, reformat with black
This commit is contained in:
parent
cfc50b82bb
commit
d2fa4c586f
16 changed files with 978 additions and 366 deletions
|
@ -1,16 +1,17 @@
|
|||
import click
|
||||
|
||||
from redis_developer.model.migrations.migrator import Migrator
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("--module", default="redis_developer")
|
||||
def migrate(module):
|
||||
migrator = Migrator(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":
|
||||
|
||||
if input("Run migrations? (y/n) ") == "y":
|
||||
migrator.run()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue