Просмотр исходного кода

fix(indexer): change db schema

iwanhae 1 год назад
Родитель
Сommit
552b116820
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      indexer/1_gen_sqlite3_db.ipynb

+ 4 - 4
indexer/1_gen_sqlite3_db.ipynb

@@ -11,7 +11,7 @@
      "text": [
       "  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\n",
       "                                 Dload  Upload   Total   Spent    Left  Speed\n",
-      "100 20.8M  100 20.8M    0     0  10.6M      0  0:00:01  0:00:01 --:--:-- 10.6M\n"
+      "100 20.8M  100 20.8M    0     0  25.2M      0 --:--:-- --:--:-- --:--:-- 25.3M\n"
      ]
     }
    ],
@@ -34,7 +34,7 @@
     "tables = [\n",
     "    \"\"\"\n",
     "CREATE TABLE functions (\n",
-    "\tid INTEGER PRIMARY KEY,\n",
+    "\tid INTEGER PRIMARY KEY NOT NULL,\n",
     "   \tname TEXT NOT NULL,\n",
     "    signature TEXT NOT NULL,\n",
     "\tfile TEXT NOT NULL,\n",
@@ -44,8 +44,8 @@
     ");\"\"\",\n",
     "    \"\"\"\n",
     "CREATE TABLE function_analyses (\n",
-    "\tid INTEGER PRIMARY KEY,\n",
-    "    function_id INTEGER,\n",
+    "\tid INTEGER PRIMARY KEY NOT NULL,\n",
+    "    function_id INTEGER NOT NULL,\n",
     "    summary TEXT NOT NULL,\n",
     "    background TEXT,\n",
     "\tanalysis TEXT,\n",