Skip to content

Commit

Permalink
Update src/2023/2023-11-09-inconsitencies-in-the-database.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
kulla committed Nov 13, 2023
1 parent 6506252 commit 455c43c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/2023/2023-11-09-inconsitencies-in-the-database.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
"from sqlalchemy import create_engine\n",
"from sqlalchemy import text\n",
"\n",
"engine_local = create_engine(\n",
" f\"mysql+mysqlconnector://root:secret@localhost:3306/serlo?charset=latin1\"\n",
")\n",
"engine_local = create_engine(\"mysql+mysqlconnector://root:secret@localhost:3306/serlo\")\n",
"\n",
"class MySQLSession:\n",
" def __init__(self, engine):\n",
Expand Down Expand Up @@ -59,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": 44,
"execution_count": 7,
"id": "352dd822-e5ff-4ae5-aeb3-072023a67243",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -874,7 +872,7 @@
},
{
"cell_type": "code",
"execution_count": 27,
"execution_count": 8,
"id": "243bb95c-7bff-427f-9886-49779ef7e80a",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -956,7 +954,7 @@
" left join entity_link on entity_link.child_id = entity.id\n",
" where\n",
" type.name in (\"grouped-text-exercise\", \"text-solution\", \"course-page\")\n",
" and entity_link.child_id is null\n",
" and entity_link.parent_id is null\n",
" group by type.name, uuid.trashed\n",
" \"\"\", session.connection))"
]
Expand All @@ -971,7 +969,7 @@
},
{
"cell_type": "code",
"execution_count": 41,
"execution_count": 9,
"id": "c54060cc-d636-454f-951e-c5f431f41e76",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -1346,7 +1344,7 @@
" left join entity_link on entity_link.child_id = entity.id\n",
" where\n",
" type.name in (\"grouped-text-exercise\", \"text-solution\", \"course-page\")\n",
" and entity_link.child_id is null\n",
" and entity_link.parent_id is null\n",
" group by entity.id\n",
" limit 20\n",
" \"\"\", session.connection))"
Expand Down

0 comments on commit 455c43c

Please sign in to comment.