U4-3784 - Publish Database Schema / Schema Validator?

Created by Brian Powell 04 Dec 2013, 05:03:46 Updated by Shannon Deminick 21 Jun 2017, 07:58:45

Relates to: U4-3616

As I've upgraded various versions of Umbraco over time, I've found that the database migrations built-in to the upgrade packages don't always pick up all of the changes. If I compare an upgraded DB schema versus one from a newly created Umbraco DB, there are differences in keys, constraints, and sometimes even field types (like bit versus tinyint).

It would be great if Umbraco included a tool that would validate and fix database schemas to ensure they comformed to the current standard. As an easier solution, publishing complete schemas so we could manually compare and fix things would be tremendously helpful.


Sebastiaan Janssen 04 Dec 2013, 08:59:52

We've been wanting to automate this indeed, but unfortunately our time is limited and we need to pick our priorities.

The idea would be to take the migrations (src\Umbraco.Core\Persistence\Migrations\Upgrades) and add maybe a dashboard section that would generate the SQL for them using the current database type.

We currently don't have much time to spend on that, so this one is "up for grabs" for maybe a package or a pull request.

Martin Griffiths 04 Dec 2013, 10:38:12

This item is related to U4-3616 as i'm completely unable to upgrade my project to U7. The path i've been on originates in and I've had it running fine on 4.11.9 for some time. I attempted an upgrade to U6 with any noticeable problems, but the schema is now so out of sync compared to a fresh install of U6 that I cannot then upgrade to U7. I get a whole raft of strict schema errors. Some of which I can fix manually, but others make no sense to me!

See the linked item for my comments on the error i'm getting.

Shannon Deminick 21 Jun 2017, 07:58:46

Closing issue due to inactivity - see blog post for details https://umbraco.com/blog/issue-tracker-cleanup/

Priority: Normal

Type: Feature (request)

State: Closed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: