|
@@ -6,7 +6,8 @@ import argparse
|
6
|
6
|
import csv
|
7
|
7
|
import os
|
8
|
8
|
|
9
|
|
-from piket_server import db, Person, Settlement, ConsumptionType, Consumption
|
|
9
|
+from piket_server.models import Person, Settlement, ConsumptionType, Consumption
|
|
10
|
+from piket_server.flask import db
|
10
|
11
|
|
11
|
12
|
|
12
|
13
|
def main():
|
|
@@ -52,8 +53,8 @@ def cmd_clear(args) -> None:
|
52
|
53
|
print("All data removed. Recreating database...")
|
53
|
54
|
db.create_all()
|
54
|
55
|
|
55
|
|
- from alembic.config import Config
|
56
|
|
- from alembic import command
|
|
56
|
+ from alembic.config import Config # type: ignore
|
|
57
|
+ from alembic import command # type: ignore
|
57
|
58
|
|
58
|
59
|
alembic_cfg = Config(os.path.join(os.path.dirname(__file__), "alembic.ini"))
|
59
|
60
|
command.stamp(alembic_cfg, "head")
|