Closed Steve-Mcl closed 8 months ago
Following investigation, we have found a difference in the DDL of production and staging databases.
This has came about organically due to timing and migrations.
Steve
1 hour ago
RE: Differences between Prod and Staging (and local dev on PG/SQLite)
In grafana, I can see the error: parent: error: null value in column "UserId" of relation "ProjectSnapshots" violates not-null constraint
```
2024-02-20T09:23:32.168283595Z stderr F name: 'SequelizeDatabaseError',
2024-02-20T09:23:32.168280555Z stderr F at async Immediate.
A migration to update ProjectSnapshot
will be necessary to ensure it matches the desired state in forge/db/migrations/20220517-01-add-project-snapshot.js
Special care should be taken with sqlite as certain operations can cause undesired side-effects
See forge/db/migrations/20231005-01-update-projectSnapshot-constraint.js
for an example of this
Current Behavior
The new device auto snapshot feature works as designed on staging but it something is different with production.
the device log informs the user a snapshot is being taken but the table never shows any auto snapshots:
Device log
Device snapshots
Expected Behavior
Snapshots should be captured/shown
Steps To Reproduce
Add a device to an application, switch to dev mode, make a change to flows and deploy. Witness the console message
[info] Capturing device snapshot
, check the device snapshots table - none shown (or perhaps not actually captured?)Environment
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate