-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite database init fails with 'An Error Occurred Creating Site. An error occurred while saving the entity changes. See the inner exception for details.' #2584
Comments
Thank you for reporting this issue... it turns out that this is a bit tricky. In version 3.2.2 migrations were introduced to remove the DeletedBy, DeletedOn, and IsDeleted columns from the Folder and File tables (as these columns were never used). However SQLite does not support the ability to drop columns - so the migration executes fine but does not remove the columns from the tables in the database. And then the system tries to create some folder records during install and it fails because the IsDeleted column has a NOT NULL constraint. I am going to have to investigate if there is a way to remove the constraint so that this works on SQLite. Multi-database support is a real challenge based on the fact that not all database engines support the same basic operations. |
There is no ability to alter a column in SQLite either... so no ability to change the constraint. Which basically only allows for 2 options:
Option 1 is the better approach so that Oqtane can meet its upgradeability philosophy. In the future this essentially means that properties should never be physically removed from database entities if they are not nullable. |
fix #2584 - added IsDeleted columns back to Folder and File tables to preserve compatibility for SQLite
thanks for addressing this. |
When pulling master for v3.3.1 and running the startup screen in the SQLite configuration it stops after a few moments with the error "An Error Occurred Creating Site. An error occurred while saving the entity changes. See the inner exception for details." no additional details are captured in the logs.
The text was updated successfully, but these errors were encountered: