stvnnnnnn commited on
Commit
5824387
·
verified ·
1 Parent(s): 8a49dbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1159,10 +1159,11 @@ async def upload_database(
1159
 
1160
  # Intentamos poner primero el esquema y luego los datos
1161
  def weight(name: str) -> int:
1162
- nl = name.lower()
1163
- if "schema" in nl or "structure" in nl:
 
1164
  return 0
1165
- if "data" in nl or "insert" in nl:
1166
  return 1
1167
  return 2
1168
 
 
1159
 
1160
  # Intentamos poner primero el esquema y luego los datos
1161
  def weight(name: str) -> int:
1162
+ nl = name.lower().replace("-", "_").replace(" ", "_")
1163
+
1164
+ if any(x in nl for x in ["schema", "structure", "ddl"]):
1165
  return 0
1166
+ if any(x in nl for x in ["data", "dml", "insert", "rows"]):
1167
  return 1
1168
  return 2
1169