Commit Graph

50 Commits

Author SHA1 Message Date
leekelleher
1978930fa2 Amends CreateTable, so if 'overwrite' is enabled, the table is dropped, then recreated. 2014-08-19 18:56:15 +01:00
Shannon
feefb052fd Updates the BulkInsertRecords method to optionally close the trans - shouldn't by default. Updates how permissions are handled in the new services and exposes another method, ensures it's all wrapped in trans and ensures that cache is cleared properly. Fixes: U4-4213 "Replace child node permissions" does not work if all permissions cleared 2014-02-17 17:45:59 +11:00
Morten Christensen
3177b979d3 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-12-18 10:00:47 +01: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
Morten Christensen
d227aa19b8 Leaving the original internal method intact 2013-11-07 17:56:12 +01:00
Morten Christensen
f9a86385b5 Rearranging the create schema extensions methods to provide a bit more flexibility for external usage. 2013-11-07 14:03:34 +01:00
Shannon
80488e012f Fixes up and implements more if the IMemberService, repository and membership providers (both legacy and what seems to be the new one). 2013-10-10 14:00:35 +11:00
Shannon
7e9cad34db Creates an SQL Server version check for bulk sql imports. 2013-08-02 16:01:54 +10:00
Shannon
a195d33332 Added another benchmark for removing/re-inserting records for cmsContentXml table using one transaction which again improves performance. Now have changed the rebuild xml method in the content service to : Lookup all data that it needs to insert first, then we begin a transaction and inside of the one transaction we clear the data and re-insert it so if anything fails in this process it should be rolled back. 2013-07-29 17:45:05 +10:00
Shannon
696306e7c9 Implements the bulk insert procedure for re-populating the cmsContentXml tables, removes the need to rebuild all xml structures when sorting if in LB environments 2013-07-29 13:25:02 +10:00
Shannon
ed88bbf75f Fixed up BaseDatabaseFactoryTests so that it only loads in one db factory with the correct conn strings, now we can easily override to use a custom db. Added benchmark tests for bulk inserting records for the cmsContentXml table which shows how we can improve performance quite a bit especially for larger node sets. Added more unit tests for bulk inserting and fixed it up a bit more. 2013-07-26 18:13:56 +10:00
Shannon
d8aad718d5 Fixed broken unit test 2013-07-17 11:28:46 +10:00
Shannon
b7f6195791 Started adding base PermissionsRepository for sub classes to use for assigning permissions, created a BulkImport extension methods for PetaPoco with tests since we'll be needing that for assigning permissions in a nice way. Wrote unit tests for all sql gen for permissions and assigning permissions. This all starts fixing #U4-2161 but there's still a bit more work to do. 2013-07-08 17:29:26 +10:00
Shannon Deminick
1b66c42c9b Fixes RePublishAll method to ensure it performs the same function as the legacy Document.RePublishAll - it just
re-generates the XML in the cmsContentXml table. Updates the Sql providers to support truncate table. Updates the RepublishAll
unit test. Adds a TruncateTable extension to PetaPoco. Adds locking to certain service methods that perform more than once function.
2013-03-19 23:46:13 +06:00
Shannon Deminick
33c5c41a31 Added better support for clearing the db schema for test. Added more support for different db behaviors for tests, now to update
the behaviors where necessary as this will speed things up quite a lot.
2013-03-14 02:43:17 +04:00
Shannon Deminick
8d3c798c6c Changed tests to clear out the current database instead of trying to delete/re-create it. Fixes up
other test inconsistencies and more error checking on the ApplicationContext.Dispose.
2013-03-14 01:07:54 +04: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
83518de981 Adding no guard for testing purposes 2013-02-08 11:37:50 -01:00
Morten Christensen
e24ff1b92b Updating the CreateDatabaseSchema method, so it can't be used if Umbraco is configured. Just to ensure that Richard doesn't accidentally break anything. 2013-02-07 13:56:00 -01:00
Morten Christensen
c6bd94532d Fixing issue U4-1648 caused by incorrect sql statement 2013-02-06 09:04:46 -01:00
Morten Christensen
6293af2654 Fixes U4-1415 - MySql needs to update admin user's id to zero so the foreign keys can be added. 2013-01-15 14:30:02 -01:00
Sebastiaan Janssen
1e4361ed2f Merge with 6.0.0-LegacyApi-Refactor 2012-12-28 08:45:40 -01:00
Morten Christensen
e4e5982349 Removing sql server/ce specific brackets from repository queries as it was causing problems with MySql.
Fixes regression bug from removing brackets from PrimaryKey columns. Columns are now passed and syntax specific brackets are added.
Moving the MySql special case for updating User Id from one to zero.
2012-12-27 19:53:01 -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
d816ac1125 Merge with 6.0.0 2012-12-21 08:38:43 -01:00
Morten Christensen
2ea3fe624f Refactoring SqlSyntaProvider to use the new common definitions. 2012-12-19 15:23:05 -01:00
Morten Christensen
9af1f5842c Updating ApplicationTreeRegistrar to check for table before looping through it.
Updating schema creation to not include the umbracoApp and umbracoAppTree tables.
2012-12-19 12:14:49 -01:00
Shannon Deminick
a9cb337a96 Changes ApplicationContext to expect arguments of DatabaseContext and ServiceContext for it to be
constructed. Changes DatabaseContext to not be a singleton. Changes ServiceContext not to be a singleton.
Removed ServicesFactory. Updated unit tests to support new changes.
2012-12-14 08:06:32 +05:00
Morten Christensen
9111f811be Implementing the new DefinitionFactory, which makes use of the newer database model definitions. This is done to streamline the usage of the database model definitions between db creation and migration. 2012-12-07 14:52:54 -01:00
Morten Christensen
8210666d30 Refactoring identity inserts in db creation phase to support mysql 2012-12-05 14:18:08 -01:00
Morten Christensen
89bcbdb0f3 Moving db transaction up one level to improve installation, which failed for sql azure. 2012-12-05 12:37:00 -01:00
Morten Christensen
602e3260fa Fixing foreignkey issues 2012-12-05 08:39:31 -01:00
Morten Christensen
28d9784c1b Reverting changes to DTOs to re-enable foreign key constraints.
Adding temporary condition to executing database schema creation code to skip foreign key constraints for sql ce.
2012-12-04 08:16:10 -01:00
Morten Christensen
acb909c706 Refactoring installer to use the DatabaseContext for installing the umbraco db schema and default data.
Minimizing the use of the json/ajax calls during installation.
2012-11-29 12:40:48 -01:00
Morten Christensen
6edea4a8ee Adding some of the database changes that is part of v6 - just renaming a few columns so far.
Refactoring the installer, which is not working 100% yet.
2012-11-27 15:07:53 -01:00
Morten Christensen
5233dff63f Workaround for database setup in the installer, cause medium trust won't play nice. 2012-11-27 11:38:09 -01:00
Morten Christensen
7641bafd17 Refactoring installer 2012-11-26 17:58:42 -01:00
sitereactor
98ef3f96f8 Correcting issue with RepositoryResolver not setting the unit of work when resolving. 2012-11-02 11:54:42 -01:00
sitereactor
a98fddbd58 Fixing event subscription which caused a series of unit tests to fail 2012-11-01 15:06:35 -01:00
sitereactor
4e2bcee35b Adding more tests to cover the ContentService and refactoring. 2012-10-31 15:15:02 -01:00
sitereactor
137a54b193 Refactoring DTOs for Identity seed, which is used by Sql Ce.
Updating unit tests and Contexts to include the ServiceContext and DatabaseContext.
2012-10-30 15:03:58 -01:00
sitereactor
960ae22271 Adding convention to column naming for table creation.
Adding DatabaseContext hooked up to UmbracoContext and initialized through the CoreBootManager.
Adding constant for ConnectionString name in GlobalSettings.
2012-10-29 09:49:31 -01:00
sitereactor
07b5f6983f Refactoring the creation of database schema and base/default data creation.
Adding extension method to get all properties for interfaces in PetaPoco used for mapping.
Creating ServiceContext and adding it to the UmbracoContext to provide access to the various services.
Adding UmbracoContext to BaseDatabaseFactory test.
2012-10-25 18:38:23 -02:00
sitereactor
c5da0bd017 Fixing a few unit tests 2012-10-24 12:38:13 -02:00
sitereactor
bfff317a96 Adding class to create base data using the internal DTOs 2012-10-23 07:30:00 -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
Morten@Thinkpad-X220
9918ca9696 Decorating remaining DTOs for db table creation 2012-10-18 11:49:44 -02:00
Morten@Thinkpad-X220.ab-nat1.dk
5bd2059cd7 Removing attributes for migrations as a library that does this already exists.
Updating a few DTOs for programmatic creation.
2012-10-17 10:12:30 -02:00
Morten@Thinkpad-X220.ab-nat1.dk
2523781fc1 Refactoring PetaPoco extensions for table creation. Adding a few conventions, but still a few on the todo list. 2012-10-14 12:56:02 -02:00
Morten@Thinkpad-X220
ba45e0d365 Code from freedom friday project extending petapoco with a bunch of annotations used to decorate strongly typed models for table creation 2012-10-12 12:37:55 -02:00