Djangoエラーsqlite 3 db.sqlite3 CategoryInfo : ObjectNotFound: (sqlite3:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundException


長時間のWeb開発では、migrateによって生成されたDBをすぐにコマンドラインでチェックしたい場合は、次のコマンドを使用します.
sqlite3 db.sqlite3
(fcdjango_venv) PS C:\django_project\fc_community> sqlite3 db.sqlite3
sqlite3 : 'sqlite3' 용어가 cmdlet, 함수, 스크립트 파일 또는 실행할 수 있는 프로그램 이름으로 인식되지 않습니다. 이름이 정확한  
지 확인하고 경로가 포함된 경우 경로가 올바른지 검증한 다음 다시 시도하십시오.
위치 줄:1 문자:1
+ ~~~~~~~
    + CategoryInfo          : ObjectNotFound: (sqlite3:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
しかし、このようなエラーはずっと発生しています.
解決策

  • sqlite 3をインストールし、PATHを追加
    ソース:https://stackoverflow.com/questions/37287972/commanderror-you-appear-not-to-have-the-sqlite3-program-installed-or-on-your/56494866

  • パスの指定
    ソース:https://stackoverflow.com/questions/25962294/windows-powershell-cannot-recognize-sqlite3
  • 次にコマンドを再度入力すると、生成されたテーブルが表示されます.
    (fcdjango_venv) PS C:\django_project\fc_community> $env:PATH += ';C:\sqlite'
    >> & sqlite3.exe
    SQLite version 3.34.0 2020-12-01 16:14:00
    Enter ".help" for usage hints.
    Connected to a transient in-memory database.
    Use ".open FILENAME" to reopen on a persistent database.
    (fcdjango_venv) PS C:\django_project\fc_community> sqlite3 db.sqlite3
    SQLite version 3.34.0 2020-12-01 16:14:00
    Enter ".help" for usage hints.
    sqlite> .tables
    auth_group                  django_admin_log
    auth_group_permissions      django_content_type       
    auth_permission             django_migrations
    auth_user                   django_session
    auth_user_groups            fastcampus_fcuser
    auth_user_user_permissions  fcuser_fcuser
    board_board
    sqlite> .schema fastcampus_fcuser
    CREATE TABLE IF NOT EXISTS "fastcampus_fcuser" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "username" varchar(64) NOT NULL, "password" varchar(64) NOT NULL, "registered_dttm" datetime NOT NULL);
    sqlite>