Closed xenophonf closed 9 months ago
I got the same error using PostgreSQL:
2023-12-17 16:47:35,599 - lethbridge.cli.import - ERROR - (psycopg2cffi._impl.exceptions.IntegrityError) null value in column "successState" of relation "thargoid_war" violates not-null constraint
DETAIL: Failing row contains (Thargoid Stronghold, null, null, 0, 0, 0, f, 79247165795).
[SQL: INSERT INTO thargoid_war ("currentState", "successState", "failureState", progress, "daysRemaining", "portsRemaining", "successReached", system_id64) VALUES (%(currentState)s, %(successState)s, %(failureState)s, %(progress)s, %(daysRemaining)s, %(portsRemaining)s, %(successReached)s, %(system_id64)s)]
[parameters: {'currentState': 'Thargoid Stronghold', 'successState': None, 'failureState': None, 'progress': Decimal('0'), 'daysRemaining': 0, 'portsRemaining': 0, 'successReached': False, 'system_id64': 79247165795}]
(Background on this error at: https://sqlalche.me/e/20/gkpj)
Again, the table has NOT NULL
constraints when it shouldn't:
lethbridge=# \d thargoid_war
Table "public.thargoid_war"
Column | Type | Collation | Nullable | Default
----------------+-------------------+-----------+----------+---------
currentState | character varying | | not null |
successState | character varying | | not null |
failureState | character varying | | not null |
progress | numeric | | not null |
daysRemaining | integer | | not null |
portsRemaining | integer | | not null |
successReached | boolean | | not null |
system_id64 | bigint | | not null |
Indexes:
"thargoid_war_pkey" PRIMARY KEY, btree (system_id64)
Foreign-key constraints:
"thargoid_war_system_id64_fkey" FOREIGN KEY (system_id64) REFERENCES system(id64)
Fixed in commit fa5d008f498b2653ae22af27c87a268a1d882c29.
I'm using a container built from efb71a1 (HEAD of main at time of writing)