Refactor code for improved readability and consistency
- Cleaned up whitespace and formatting across multiple files for better readability.
This commit is contained in:
@@ -9,22 +9,27 @@ from app.database import db
|
||||
app = create_app()
|
||||
cli = FlaskGroup(app)
|
||||
|
||||
|
||||
@cli.command()
|
||||
def init_db():
|
||||
"""Initialize the database."""
|
||||
print("Initializing database...")
|
||||
from app.database_init import init_database
|
||||
|
||||
init_database()
|
||||
print("Database initialized successfully!")
|
||||
|
||||
|
||||
@cli.command()
|
||||
def reset_db():
|
||||
"""Reset the database (drop all tables and recreate)."""
|
||||
print("Resetting database...")
|
||||
db.drop_all()
|
||||
from app.database_init import init_database
|
||||
|
||||
init_database()
|
||||
print("Database reset successfully!")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli()
|
||||
cli()
|
||||
|
||||
Reference in New Issue
Block a user