Shannon
d0435f6625
Moves read/write locking and isolation level to the responsibility of the sql provider based on the db type
2019-10-15 00:04:41 +11:00
Stephan
24998425fc
Better handling of default constraints
2019-05-29 09:19:29 +02:00
Stephan
49d2a6dbf0
Fix migrations for SqlServer
2019-05-28 17:49:50 +02:00
Stephan
f06d720dbd
Fix SqlServer detection
2019-02-19 08:12:48 +01:00
Stephan
b5a90bf26a
Fix SqlServer detection
2019-02-13 12:02:53 +01:00
Stephan
c8d9e59436
Fix SqlServer version detection
2019-01-30 14:02:45 +01:00
Stephan
c23c7749b4
Composition fixes
2018-11-27 14:04:08 +01:00
Stephan
b8608f1b2e
Refactor runtimes, injection and composition
2018-11-26 16:54:32 +01:00
Stephan
e6e3716dda
Detect SqlServer 2012+
2018-09-19 18:51:27 +02:00
Stephan
612c38654d
Merge branch origin/dev-v7 into temp8
2018-09-06 13:07:09 +02:00
Sebastiaan Janssen
7fd1617759
Merge branch 'dev-v7' into validate-using-schema
2018-08-26 23:13:08 +02:00
Shannon
04db0caa63
Merge remote-tracking branch 'origin/dev-v7' into temp8
...
# Conflicts:
# src/SolutionInfo.cs
# src/Umbraco.Core/Configuration/UmbracoVersion.cs
# src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs
# src/Umbraco.Core/Migrations/Upgrade/V_7_12_0/AddRelationTypeForMediaFolderOnDelete.cs
# src/Umbraco.Core/Migrations/Upgrade/V_7_12_0/IncreaseLanguageIsoCodeColumnLength.cs
# src/Umbraco.Core/Persistence/DatabaseModelDefinitions/ConstraintDefinition.cs
# src/Umbraco.Core/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AddIndexToCmsMacroPropertyTable.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AddIndexToCmsMacroTable.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AlterTagsTable.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AssignMissingKeysAndIndexes.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenEightZero/AddIndexToPropertyTypeAliasColumn.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/AddForeignKeysForLanguageAndDictionaryTables.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/MigrateAndRemoveTemplateMasterColumn.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenThreeZero/UpdateUniqueIdToHaveCorrectIndexType.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSevenTwoZero/AddMissingForeignKeyForContentType.cs
# src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSixTwoZero/AdditionalIndexesAndKeys.cs
# src/Umbraco.Core/Persistence/SqlSyntax/ISqlSyntaxProvider.cs
# src/Umbraco.Core/Persistence/SqlSyntax/MySqlSyntaxProvider.cs
# src/Umbraco.Core/Persistence/SqlSyntax/SqlCeSyntaxProvider.cs
# src/Umbraco.Core/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs
# src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs
# src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs
# src/Umbraco.Web.UI.Client/src/views/propertyeditors/nestedcontent/nestedcontent.editor.html
# src/Umbraco.Web/HealthCheck/Checks/DataIntegrity/DatabaseSchemaValidationHealthCheck.cs
# src/Umbraco.Web/Scheduling/KeepAlive.cs
# src/Umbraco.Web/Trees/ApplicationTreeExtensions.cs
2018-08-20 15:16:58 +10:00
Shannon
0c6cca44d8
Fixes SQL providers for returning the correct results for constraints
2018-08-17 10:53:21 +10:00
Stephan
7a615133ff
Renormalize
2018-06-29 19:52:40 +02:00
Morten Christensen
f5b017ed67
Updates sql to include current schema in queries
2018-06-08 10:44:11 +02:00
Stephan
c1e2625de0
Use ISqlContext
2017-09-22 19:19:28 +02:00
Stephan
c76403077f
Normalize cr/lf/tab
2017-07-20 11:21:28 +02:00
Stephan
8561d85f7a
porting 7.6-rc1 into 8
2017-05-24 12:25:39 +02:00
Stephan
49d54f497d
Persistence reorg
2016-12-16 17:20:51 +01:00
Stephan
8e056aba66
Merge origin/dev-v7.6 into dev-v8-zbwip (builds, not tested)
2016-11-23 10:33:12 +01:00
Stephan
568a4987e3
U4-9195 - fix PetaPoco page of int
2016-11-16 17:51:00 +01:00
Stephan
b26b415096
Merge origin/dev-v7-deploy into dev-v8-zbwip (builds)
2016-11-03 10:31:44 +01:00
Shannon
d99a691bdc
Changes magic strings to constants for database provider types.
2016-08-09 15:36:02 +02:00
Shannon
c1da28dd47
U4-8837 Change paging query for SQL server 2012+ to be more efficient
2016-08-09 15:33:35 +02:00
Claus
7d0c92937a
U4-8754 Single content queries like Get(int id) for content, media and members needs to execute a TOP 1 (or LIMIT 1)
...
updated a bunch of the remaining repositories to also use this pattern where applicable (repos using mappers aren't compatible without more work).
2016-08-02 12:11:35 +02:00
Stephan
aceaf4b15d
Core.Persistence - massive cleanup
2016-04-13 17:33:09 +02:00
Stephan
365a01a476
From PetaPoco to NPoco ( #1207 )
...
* NPoco - 2.x (builds)
* NPoco - v3.1 (does not build)
* NPoco - builds
* NPoco - configure database factory (tests fail)
* Pick fix from 7.4
* NPoco - stock v3.1 - sort-of working
* NPoco - fix merge
* Fix Newtonsoft.Json in web.Template.Debug.config
* NPoco - fix SELECT *
* NPoco - fixing repositories
* NPoco - fix EntityRepository
* NPoco - fix EntityRepository
* NPoco - cosmetic
* NPoco - use 3.1.0-u001 from github/zpqrtbnk/NPoco
* Fixes build, NPoco needed to be referenced in the cms and UmbracoExamine projects
* Fixes lots of tests
* fixes more tests
* NPoco - bugfixing
* Bugfix CacheHelper in tests
* Bugfix connection mocking in tests
* NPoco - inject database in Sql.Select<>
* NPoco - discovery retry policy only once
* Enable C# 6 for Umbraco.Core
* NPoco - introduce UmbracoSql, cleanup
* NPoco - more cleanup and fixing
* NPoco - fix UserRepository
* Optimize InGroupsOf
* Implement UmbracoDatabase.FetchByGroups
* NPoco - fix Select
* NPoco - simplify GetPagedResultsByQuery
* Cherry-pick DisableBrowserCacheAttribute fix from 7.4
* Upgrade NPoco to use Sql<TContext>
* U4-8257 - cleanup relators
* 4-8257 - cleanup more relators
* Upgrade NPoco with more OOTB version
* fixes a couple tests, changes double check lock to Lazy<T>
2016-04-12 15:11:07 +02:00
Shannon
327a00aaf4
Fixes issue with migrations running with a Decimal column:
...
The logic would produce incorrect syntax.
Fixed the default string column for sql server, made them all consistent.
Moved ctor logic for shared sql syntax providers to the base class.
Created formatted Decimal column definitions so that a custom precision/scale works.
Set the migration to use the default precision/scale values.
Removes the pattern validators because they don't do anything... due to the fix-number directive which has it's own issues but we won't solve those now.
2015-10-14 12:07:50 +02:00
Shannon
7beb21ad66
Fixes upgrade issues with MySql, along with a few other things:
...
* All usages of getdate() are changed to the system value
* All usages of newid() are chagned to the system value
* Removes the hacks associated with the above
* Fixes the fluent migrations for table creation for mysql to not double create a PK
* Removes other system field values that actually don't do anthing and shouldn't be used
2015-09-11 17:49:47 +02:00
Shannon
7b99efb061
Working on: U4-4133 Database key changes are not fixed in the Umbraco 7 installer!
2014-10-16 11:24:29 +10:00
Shannon
00f86ffef7
More work on sql parameterization with sql expressions, lots of tests passing but a few fixes still required. Streamlines IQuery to actually have the correct method implementations so we're not casting everywhere.
2014-09-24 13:51:16 +10:00
Shannon
bbe6194b06
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.
2014-03-14 13:04:20 +11:00
Shannon
aee10348e5
Ensures not to add new indexes if they already exist
2014-03-12 18:37:22 +11:00
Shannon
3a92c26a7f
Adds ability to extract index details from databases using sql syntax provider.
2014-03-12 17:17:52 +11:00
Shannon
2dd04799b2
WIP membership provider updates
2013-12-19 18:33:25 +11:00
Shannon
a21aa079ff
Adds ability to use the query builder with string matches based on an NText column
2013-12-18 17:22:00 +11:00
Shannon
7e9cad34db
Creates an SQL Server version check for bulk sql imports.
2013-08-02 16:01:54 +10:00
Morten Christensen
928d92fce4
Making the Sql Syntax Providers public and changing a few names and bits for consistency.
...
Adding resolver for the syntax providers and wiring it up in the boot manager.
2013-03-09 10:43:34 -01:00
Morten Christensen
5d0aced9a7
Giving the install/upgrade a bit of TLC.
...
Fixes U4-1520
2013-01-28 14:01:38 -01:00
Morten Christensen
7aabf459ea
Adding schema validation to the DatabaseSchemaCreation class.
...
Helps determine if valid database exists and which version it corresponds to.
On startup the legacy connectionstring is used if one exists, so its not ignore but rather reconfigured.
Relates to U4-1520.
2013-01-25 15:05:42 -01:00
Morten Christensen
64af0a610b
Refactoring migrations by adding an abstract class to all expressions that allow for processing prior to returning an sql statement.
...
Refactoring the current sql syntax providers to better work with sql ce, sql server and mysql.
Adding migrations for v4.8 and v6.0.
Adding test cases for upgrading from 4.7 to 6.0 for the 3 database providers - sql ce, sql server and mysql.
Adding product name to the MigrationAttribute, which adds more flexibility to the MigrationRunner.
Fixing schema creation for mysql, which broke during a previous refactor task.
2012-12-27 18:52:47 -01:00
Morten Christensen
c1695c2f7f
Updating expressions to output sql for use with the fluent migrations, so it can be used for db upgrades.
2012-12-20 11:36:20 -01:00
Morten Christensen
2ea3fe624f
Refactoring SqlSyntaProvider to use the new common definitions.
2012-12-19 15:23:05 -01:00
Morten Christensen
736fbc6659
Moving database definition models, so they are shared and can be used in the sql syntax provider.
2012-12-07 13:48:38 -01:00
Morten Christensen
f59f57fd6a
Initial work on fluent database migrations
2012-11-30 15:01:52 -01:00
sitereactor
ee96ced595
Adding missing code comments/documentation
2012-10-23 08:09:01 -02:00
sitereactor
c1909eccf5
Refactoring database creation, adding sql syntax provider to account for differences in syntax between sql, ce and mysql.
...
Adding MySql unit test.
2012-10-19 13:20:57 -02:00