Closed bkd231 closed 2 years ago
Thank you for the input - I will fix this before releasing version 1.1.0 with the current code on stage.
I am closing this issue as this is a known "breaking change" in the next release. I'll add it specifically to the release notes and the documentation.
The reason is that the original project used TypeORMs synchronize feature and we have now switched to using explicit migrations. This includes an initial migration which creates all the tables as they looked in v.1.0.1 - this enables new installations of OS2iot but leaves an issue for existing instances that has already had the database auto-synched.
The "fix" for existing installations is:
Essentially, run this SQL Script:
CREATE TABLE migrations (
id SERIAL PRIMARY KEY,
timestamp BIGINT NOT NULL,
name varchar NOT NULL
);
INSERT INTO migrations (timestamp, name)
VALUES (1, 'Initial0000000000001')
Then the two real migrations will run properly and the issue won't arise again.
When running the staging version of the OS2IoT backend with the DB from Release v.1.0.1 we are getting the error:
To reproduce this please run the Release v.1.0.1 version of the backend with a new database and then run the Stage on the same DB.