You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, an attempt to restart a server Docker container will result in an IntegrityError:
+ python setup.py
Creating table...
Table created.
Importing users from /.devcontainer/server/data.csv
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
sqlite3.IntegrityError: UNIQUE constraint failed: user.key
A separate but similar issue is that an attempt to teardown the database if it has already been torn down results in an OperationalError:
+ python teardown.py
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1819, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 732, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such table: user
We should make the setup and teardown scripts idempotent to prevent these errors.
Additional context
#101 made it so the app container initializes the database on startup.
The text was updated successfully, but these errors were encountered:
Currently, an attempt to restart a
server
Docker container will result in anIntegrityError
:A separate but similar issue is that an attempt to teardown the database if it has already been torn down results in an
OperationalError
:We should make the
setup
andteardown
scripts idempotent to prevent these errors.Additional context
#101 made it so the app container initializes the database on startup.
The text was updated successfully, but these errors were encountered: