Spaces:
Running
Running
Update app.py
Browse files
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 |
-
|
|
|
|
| 1164 |
return 0
|
| 1165 |
-
if
|
| 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 |
|