]> littlesong.place Git - littlesongplace.git/commitdiff
Fix init-db command
authorChris Fulljames <christianfulljames@gmail.com>
Thu, 22 May 2025 01:10:03 +0000 (21:10 -0400)
committerChris Fulljames <christianfulljames@gmail.com>
Sat, 23 Aug 2025 11:30:17 +0000 (07:30 -0400)
src/littlesongplace/db.py

index 0fd94c9698f240ba7866f2b6c8099f4da154570c..4a2d48983a4338c4ce790b89253bb20902549f68 100644 (file)
@@ -53,7 +53,7 @@ def init_cmd():
         db.commit()
 
 @click.command("revert-db")
-def init_cmd():
+def revert_cmd():
     """Revert the database to the previous schema"""
     with current_app.app_context():
         db = sqlite3.connect(datadir.get_db_path())
@@ -63,5 +63,6 @@ def init_cmd():
 
 def init_app(app):
     app.cli.add_command(init_cmd)
+    app.cli.add_command(revert_cmd)
     app.teardown_appcontext(close)