-
Notifications
You must be signed in to change notification settings - Fork 509
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
Fresh install with Postgres failed with "42703: column "settingname" does not exist POSITION: 43" #2032
Comments
So, using the default MSLocalDb SQL Server, it worked without issue (for a fresh install) and it doesn't have any settings column in the tenant table.. Actually looking back at the error, I don't know why I thought it's looking for that in the tenant table.. maybe from that Index command in "InitializeTenant". Also, the broken Postgres install above won't start at all now.. message - "Site Is Either Disabled Or Not Configured Correctly". Will try a fresh Postgres tomorrow. |
For anyone else experiencing this, clearing the connection string in appsettings.json will restart the config process. Unfortunately on a new Postgres database, same error. |
This update is also affected by the same bug
EntityName should also be ReWritten. |
Here's working code.. I wasn't sure on what to do with creating a Pull request with the versioning in your migrations. For some reason the code formatting would not work here so have added gists instead. https://gist.github.com/ghhv/6a485943a29fd6b9e499946457a951f2 https://gist.github.com/ghhv/1c86871f7a480a1ce324613bb6ca5c4d |
thank you for tracking this down... multi-database support is definitely a challenge based on the differences between different database platforms. Since nobody has reported this issue previously I am going to assume that PostgreSQL is not being used extensively - so I am inclined to simply apply the fix in the existing migrations. This will allow new installations to work properly - as well as any older installations to upgrade properly as well. Do you want to submit a PR or do you want me to make the change on your behalf? |
Hi Shaun, I've never done a PR and I didn't know what to do with that versioning.. so yes, you can do for now.. Maybe as I get into this more, I'll give it a go. And question - is there a reason why the stack trace is not showing any line number details? I was running as DEBUG. |
Fix #2032 - Fresh install with Postgres failed with "42703: column "settingname" does not exist POSITION: 43
Fresh install of Oqtane.Server V3.0.3 via VS2022 on Windows with Postgresql V12 database.
I created a new Postgres database with default template0 and added an admin user with all rights.
Added config to Oqtane setup page and it came back with the error "42703: column "settingname" does not exist POSITION: 43".
A migration has indeed run on Postgres and there are now tables created but as per the error, the "tenant" table is missing a "settings" column.
I note the Tenant model class does not have a "setting" field, yet the "InitializeTenant" migration is trying to create an index with it.
Error.log entry
`[2022-02-28 07:22:30+00:00] [Error] [Oqtane.Infrastructure.DatabaseManager] 42703: column "settingname" does not exist
POSITION: 43 `
thanks.
The text was updated successfully, but these errors were encountered: