Skip to content

Fixes to sql script and new rollup scripts for version 10#6038

Merged
mitchelsellers merged 3 commits intodnnsoftware:release/10.0.0from
donker:sqlscripts
Jul 9, 2024
Merged

Fixes to sql script and new rollup scripts for version 10#6038
mitchelsellers merged 3 commits intodnnsoftware:release/10.0.0from
donker:sqlscripts

Conversation

@donker
Copy link
Copy Markdown
Contributor

@donker donker commented May 16, 2024

This PR adds a few missing objectQualifiers from the v10 SQL script and replaces the old 8.0.4 rollup scripts with a new one for v10.

Methodology for creating the rollup scripts

  1. A new/empty DB was created
  2. All SqlDataProvider SQL scripts (i.e. not the membership provider scripts) that the current installation process runs were run using a unique schema (not dbo.) and objectqualifier (not empty)
  3. In SSMS a schema was generated by selecting all tables, views, procedures and functions (i.e. none of the security objects)
  4. Similarly a data script was created.
  5. The data script was parsed and changed to conform to the way DNN runs scripts (remove GO statements within IDENTITY_INSERT blocks).
  6. With search and replace all databaseOwners and objectQualifiers were put back in place.

Note with item 2: DNN runs "Schema", then "Data" and then all scripts higher than 8.0.4 (starting thus with 08.00.04.01). This process was mimicked using a console app to isolate the exact process.

Note this will probably resolve issue #6028

@mitchelsellers
Copy link
Copy Markdown
Contributor

@donker This looks awesome, I'll test the build results in Azure in the next few days, very curious to see how much this helps install

@valadas
Copy link
Copy Markdown
Contributor

valadas commented Jun 22, 2024

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested a clean install on SQL Server 2017 and everything worked fine. I tried an upgrade and it failed with ICSharpCode.SharpZipLib wich is probably unrelated. So I think this is good since it would only apply to clean installs anyway

@mitchelsellers mitchelsellers merged commit e8b35d3 into dnnsoftware:release/10.0.0 Jul 9, 2024
@donker donker deleted the sqlscripts branch October 3, 2024 15:03
valadas added a commit to valadas/Dnn.Platform that referenced this pull request Feb 16, 2025
In dnnsoftware#6038 a rollup script was put in place to revamp our clean installation logic, get rid of some upgrade logic and potentially speed up installs, etc.

In RC1 issue dnnsoftware#6364 was reported. I spent quite a lot of time trying to figure it out. Had to do a `git bisect` and it identified the commit of the rollup script as being the first commit to cause that issue. After a lot of head scratching I realized that the code in upgrade.cs was the one creating the virtual host page that should hold the module that allows editing user profiles from the Persona Bar. This solved the issue for HOST users but not for admins. For admins, this lives in the portal templates, it was cleaned up from modules we don't want, but this one needed to be brought back as the Persona Bar needs it for admins.

As I was in upgrade.cs I though since we will document in our upgrade steps to upgrade to latest v9 before going to v10, we can get rid of all the other upgrade logic for all versions <10 in there.

Closes dnnsoftware#6364
valadas added a commit to valadas/Dnn.Platform that referenced this pull request Apr 14, 2025
I did a `git bisect` which pointed me to the commits in dnnsoftware#6038 to rollup the sql scripts for v10. This made no sense to me since it's not really related to web.config and @uzmannazari pointed out in dnnsoftware#6503 that a similar issue was caused by the LocalizationModule missing from the web.config. Also I could not reproduce the issue on upgrades. Then I thought since we have that v10 rollup, it uses the 10.00.00.config for the web.config xml merge scripts and up. Investigating the commit history of that file and comparing with 9.8.0 one I found that in dnnsoftware#4251, a bugfix was done to insure that the LocalizationModule is right after the UrlRewriteModule.

This means tha upon upgrades it would be in the right place but with clean installs, that would never run and it was also missing from the base web.config, thus making it not be there at all.

I was debating between putting this fix in the 10.00.00.config or just in the web.config I thought the web.config is fine as upon upgrades, the order would already have been fixed (as long as we document to upgrade to latest v9 before upgrading to v10). For clean installs it would just already be at the right place to start with.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants