Exception is thrown if trying to run mysql in med trust. Migrations arranged to execute schema migrations first and then data migrations. If a schema migration fails it will attempt to run the downgrade scripts of the migrations if running mysql since schema changes aren't supported in transactions. Updated all sql syntax providers to try to return only the column indexes, not key indexes. Updates the db version checker to include errors for all missing columns, indexes and constraints in the db and vice versa in the schema.
This commit is contained in:
@@ -134,10 +134,11 @@ namespace Umbraco.Core.Persistence.SqlSyntax
|
||||
db.OpenSharedConnection();
|
||||
|
||||
var indexes =
|
||||
db.Fetch<dynamic>(@"SELECT DISTINCT
|
||||
TABLE_NAME, INDEX_NAME, COLUMN_NAME, CASE NON_UNIQUE WHEN 1 THEN 0 ELSE 1 END AS `UNIQUE`
|
||||
FROM INFORMATION_SCHEMA.STATISTICS
|
||||
db.Fetch<dynamic>(@"SELECT DISTINCT
|
||||
TABLE_NAME, INDEX_NAME, COLUMN_NAME, CASE NON_UNIQUE WHEN 1 THEN 0 ELSE 1 END AS `UNIQUE`
|
||||
FROM INFORMATION_SCHEMA.STATISTICS
|
||||
WHERE TABLE_SCHEMA = @TableSchema
|
||||
AND INDEX_NAME <> COLUMN_NAME AND INDEX_NAME <> 'PRIMARY'
|
||||
ORDER BY TABLE_NAME, INDEX_NAME",
|
||||
new { TableSchema = db.Connection.Database });
|
||||
list =
|
||||
|
||||
Reference in New Issue
Block a user