The V2 Database Structure uses some Columns which do not exist in the V1 Database Structure.
Also there is the possibility that Foreign Key Constraints can not be set up because of missing Key Entries in the existing Database.
To solve this problems and ensure a smooth transition between V1 and V2:
[ ] Tables should also be altered with every needed change additionaly to the "Create Table if not Exists"
[ ] Dummy entries should be inserted if Foreign Key Constraints need it
[ ] Table Foreign Keys can also get the "NOT NULL" Statement.
From this point on, every new Version with changes on the Database Structure, should have also an "ALTER TABLE" and a "CREATE TABLE IF NOT EXISTS" Statement.
The goal is to always allow smooth transition to newer Version and to ensure a shmooth installation on new Systems.
The V2 Database Structure uses some Columns which do not exist in the V1 Database Structure. Also there is the possibility that Foreign Key Constraints can not be set up because of missing Key Entries in the existing Database.
To solve this problems and ensure a smooth transition between V1 and V2:
From this point on, every new Version with changes on the Database Structure, should have also an "ALTER TABLE" and a "CREATE TABLE IF NOT EXISTS" Statement. The goal is to always allow smooth transition to newer Version and to ensure a shmooth installation on new Systems.