We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
clear sanbox command doesnot remove tables in `_sandbox`


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `dataedit/management/commands/clear_sandbox.py`
Content:
```
1 from typing import List
2 
3 import sqlalchemy as sqla
4 from django.core.management.base import BaseCommand
5 
6 from api.connection import _get_engine
7 from dataedit.models import Table
8 from oeplatform.securitysettings import PLAYGROUNDS
9 
10 SANDBOX_SCHEMA = "sandbox"
11 assert SANDBOX_SCHEMA in PLAYGROUNDS, f"{SANDBOX_SCHEMA} not in playground schemas"
12 
13 
14 def get_sandbox_tables_django() -> List[Table]:
15     """
16     Returns:
17         List[Table]: list of table objects in django db in sandbox schema
18     """
19     return Table.objects.filter(schema__name=SANDBOX_SCHEMA).all()
20 
21 
22 def get_sandbox_table_names_oedb() -> List[str]:
23     """
24     Returns:
25         List[str]: list of table names in oedb in sandbox schema
26     """
27     engine = _get_engine()
28     return sqla.inspect(engine).get_table_names(schema=SANDBOX_SCHEMA)
29 
30 
31 def clear_sandbox(output: bool = False) -> None:
32     """delete all tables from the sandbox schema.
33 
34     Maybe we should use the API (not just django objects)
35     so all the other actions like deleting the meta tables
36     are also performed properly
37 
38     For now, we delete tables in oedb and django individually
39 
40     !!! DANGER ZONE !!! MAKE SURE YOU KNOW WHAT YOU ARE DOING!
41 
42 
43     Args:
44         output: if True, print actions
45 
46     """
47 
48     # delete all from oedb
49     engine = _get_engine()
50     for table_name in get_sandbox_table_names_oedb():
51         sql = f'DROP TABLE "{SANDBOX_SCHEMA}"."{table_name}" CASCADE;'
52         if output:
53             print(f"oedb: {sql}")
54         engine.execute(sql)
55 
56     # delete all from django
57     for table in get_sandbox_tables_django():
58         if output:
59             print(f"django: delete {table.schema.name}.{table.name}")
60         table.delete()
61 
62 
63 class Command(BaseCommand):
64     def handle(self, *args, **options):
65         # ask for confirmation
66         answ = input(f"Delete all tables from {SANDBOX_SCHEMA} [y|n]: ")
67         if not answ == "y":
68             print("Abort")
69             return
70 
71         clear_sandbox(output=True)
72 
73         print("Done")
74
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/dataedit/management/commands/clear_sandbox.py b/dataedit/management/commands/clear_sandbox.py
--- a/dataedit/management/commands/clear_sandbox.py
+++ b/dataedit/management/commands/clear_sandbox.py
@@ -28,6 +28,15 @@
     return sqla.inspect(engine).get_table_names(schema=SANDBOX_SCHEMA)
 
 
+def get_sandbox_meta_table_names_oedb() -> List[str]:
+    """
+    Returns:
+        List[str]: list of table names in oedb in sandbox meta schema
+    """
+    engine = _get_engine()
+    return sqla.inspect(engine).get_table_names(schema="_" + SANDBOX_SCHEMA)
+
+
 def clear_sandbox(output: bool = False) -> None:
     """delete all tables from the sandbox schema.
 
@@ -53,6 +62,12 @@
             print(f"oedb: {sql}")
         engine.execute(sql)
 
+    for table_name in get_sandbox_meta_table_names_oedb():
+        sql = f'DROP TABLE "_{SANDBOX_SCHEMA}"."{table_name}" CASCADE;'
+        if output:
+            print(f"oedb: {sql}")
+        engine.execute(sql)
+
     # delete all from django
     for table in get_sandbox_tables_django():
         if output:

{"golden_diff": "diff --git a/dataedit/management/commands/clear_sandbox.py b/dataedit/management/commands/clear_sandbox.py\n--- a/dataedit/management/commands/clear_sandbox.py\n+++ b/dataedit/management/commands/clear_sandbox.py\n@@ -28,6 +28,15 @@\n     return sqla.inspect(engine).get_table_names(schema=SANDBOX_SCHEMA)\n \n \n+def get_sandbox_meta_table_names_oedb() -> List[str]:\n+    \"\"\"\n+    Returns:\n+        List[str]: list of table names in oedb in sandbox meta schema\n+    \"\"\"\n+    engine = _get_engine()\n+    return sqla.inspect(engine).get_table_names(schema=\"_\" + SANDBOX_SCHEMA)\n+\n+\n def clear_sandbox(output: bool = False) -> None:\n     \"\"\"delete all tables from the sandbox schema.\n \n@@ -53,6 +62,12 @@\n             print(f\"oedb: {sql}\")\n         engine.execute(sql)\n \n+    for table_name in get_sandbox_meta_table_names_oedb():\n+        sql = f'DROP TABLE \"_{SANDBOX_SCHEMA}\".\"{table_name}\" CASCADE;'\n+        if output:\n+            print(f\"oedb: {sql}\")\n+        engine.execute(sql)\n+\n     # delete all from django\n     for table in get_sandbox_tables_django():\n         if output:\n", "issue": "clear sanbox command doesnot remove tables in `_sandbox`\n\n", "before_files": [{"content": "from typing import List\n\nimport sqlalchemy as sqla\nfrom django.core.management.base import BaseCommand\n\nfrom api.connection import _get_engine\nfrom dataedit.models import Table\nfrom oeplatform.securitysettings import PLAYGROUNDS\n\nSANDBOX_SCHEMA = \"sandbox\"\nassert SANDBOX_SCHEMA in PLAYGROUNDS, f\"{SANDBOX_SCHEMA} not in playground schemas\"\n\n\ndef get_sandbox_tables_django() -> List[Table]:\n    \"\"\"\n    Returns:\n        List[Table]: list of table objects in django db in sandbox schema\n    \"\"\"\n    return Table.objects.filter(schema__name=SANDBOX_SCHEMA).all()\n\n\ndef get_sandbox_table_names_oedb() -> List[str]:\n    \"\"\"\n    Returns:\n        List[str]: list of table names in oedb in sandbox schema\n    \"\"\"\n    engine = _get_engine()\n    return sqla.inspect(engine).get_table_names(schema=SANDBOX_SCHEMA)\n\n\ndef clear_sandbox(output: bool = False) -> None:\n    \"\"\"delete all tables from the sandbox schema.\n\n    Maybe we should use the API (not just django objects)\n    so all the other actions like deleting the meta tables\n    are also performed properly\n\n    For now, we delete tables in oedb and django individually\n\n    !!! DANGER ZONE !!! MAKE SURE YOU KNOW WHAT YOU ARE DOING!\n\n\n    Args:\n        output: if True, print actions\n\n    \"\"\"\n\n    # delete all from oedb\n    engine = _get_engine()\n    for table_name in get_sandbox_table_names_oedb():\n        sql = f'DROP TABLE \"{SANDBOX_SCHEMA}\".\"{table_name}\" CASCADE;'\n        if output:\n            print(f\"oedb: {sql}\")\n        engine.execute(sql)\n\n    # delete all from django\n    for table in get_sandbox_tables_django():\n        if output:\n            print(f\"django: delete {table.schema.name}.{table.name}\")\n        table.delete()\n\n\nclass Command(BaseCommand):\n    def handle(self, *args, **options):\n        # ask for confirmation\n        answ = input(f\"Delete all tables from {SANDBOX_SCHEMA} [y|n]: \")\n        if not answ == \"y\":\n            print(\"Abort\")\n            return\n\n        clear_sandbox(output=True)\n\n        print(\"Done\")\n", "path": "dataedit/management/commands/clear_sandbox.py"}], "after_files": [{"content": "from typing import List\n\nimport sqlalchemy as sqla\nfrom django.core.management.base import BaseCommand\n\nfrom api.connection import _get_engine\nfrom dataedit.models import Table\nfrom oeplatform.securitysettings import PLAYGROUNDS\n\nSANDBOX_SCHEMA = \"sandbox\"\nassert SANDBOX_SCHEMA in PLAYGROUNDS, f\"{SANDBOX_SCHEMA} not in playground schemas\"\n\n\ndef get_sandbox_tables_django() -> List[Table]:\n    \"\"\"\n    Returns:\n        List[Table]: list of table objects in django db in sandbox schema\n    \"\"\"\n    return Table.objects.filter(schema__name=SANDBOX_SCHEMA).all()\n\n\ndef get_sandbox_table_names_oedb() -> List[str]:\n    \"\"\"\n    Returns:\n        List[str]: list of table names in oedb in sandbox schema\n    \"\"\"\n    engine = _get_engine()\n    return sqla.inspect(engine).get_table_names(schema=SANDBOX_SCHEMA)\n\n\ndef get_sandbox_meta_table_names_oedb() -> List[str]:\n    \"\"\"\n    Returns:\n        List[str]: list of table names in oedb in sandbox meta schema\n    \"\"\"\n    engine = _get_engine()\n    return sqla.inspect(engine).get_table_names(schema=\"_\" + SANDBOX_SCHEMA)\n\n\ndef clear_sandbox(output: bool = False) -> None:\n    \"\"\"delete all tables from the sandbox schema.\n\n    Maybe we should use the API (not just django objects)\n    so all the other actions like deleting the meta tables\n    are also performed properly\n\n    For now, we delete tables in oedb and django individually\n\n    !!! DANGER ZONE !!! MAKE SURE YOU KNOW WHAT YOU ARE DOING!\n\n\n    Args:\n        output: if True, print actions\n\n    \"\"\"\n\n    # delete all from oedb\n    engine = _get_engine()\n    for table_name in get_sandbox_table_names_oedb():\n        sql = f'DROP TABLE \"{SANDBOX_SCHEMA}\".\"{table_name}\" CASCADE;'\n        if output:\n            print(f\"oedb: {sql}\")\n        engine.execute(sql)\n\n    for table_name in get_sandbox_meta_table_names_oedb():\n        sql = f'DROP TABLE \"_{SANDBOX_SCHEMA}\".\"{table_name}\" CASCADE;'\n        if output:\n            print(f\"oedb: {sql}\")\n        engine.execute(sql)\n\n    # delete all from django\n    for table in get_sandbox_tables_django():\n        if output:\n            print(f\"django: delete {table.schema.name}.{table.name}\")\n        table.delete()\n\n\nclass Command(BaseCommand):\n    def handle(self, *args, **options):\n        # ask for confirmation\n        answ = input(f\"Delete all tables from {SANDBOX_SCHEMA} [y|n]: \")\n        if not answ == \"y\":\n            print(\"Abort\")\n            return\n\n        clear_sandbox(output=True)\n\n        print(\"Done\")\n", "path": "dataedit/management/commands/clear_sandbox.py"}]}