2012-10-23 07:30:00 -02:00
using System ;
2016-04-12 15:11:07 +02:00
using NPoco ;
2015-09-22 16:13:21 +02:00
using Umbraco.Core.Configuration ;
2012-12-27 18:52:47 -01:00
using Umbraco.Core.Logging ;
2012-10-23 07:30:00 -02:00
using Umbraco.Core.Models.Rdbms ;
namespace Umbraco.Core.Persistence.Migrations.Initial
{
/// <summary>
/// Represents the initial data creation by running Insert for the base data.
/// </summary>
2012-10-29 09:49:31 -01:00
internal class BaseDataCreation
2012-10-23 07:30:00 -02:00
{
private readonly Database _database ;
2015-01-09 10:51:15 +11:00
private readonly ILogger _logger ;
2012-10-23 07:30:00 -02:00
2015-01-09 10:51:15 +11:00
public BaseDataCreation ( Database database , ILogger logger )
2012-10-23 07:30:00 -02:00
{
_database = database ;
2015-01-09 10:51:15 +11:00
_logger = logger ;
}
2012-10-23 07:30:00 -02:00
/// <summary>
/// Initialize the base data creation by inserting the data foundation for umbraco
2012-10-25 18:38:23 -02:00
/// specific to a table
2012-10-23 07:30:00 -02:00
/// </summary>
2012-10-25 18:38:23 -02:00
/// <param name="tableName">Name of the table to create base data for</param>
public void InitializeBaseData ( string tableName )
2012-10-23 07:30:00 -02:00
{
2016-05-18 10:55:19 +02:00
_logger . Info < BaseDataCreation > ( $"Creating data in table {tableName}" ) ;
2012-12-27 18:52:47 -01:00
2012-10-25 18:38:23 -02:00
if ( tableName . Equals ( "umbracoNode" ) )
2012-10-23 07:30:00 -02:00
{
2016-05-18 10:55:19 +02:00
CreateUmbracoNodeData ( ) ;
2012-10-25 18:38:23 -02:00
}
2016-05-18 10:55:19 +02:00
if ( tableName . Equals ( "umbracoLock" ) )
{
CreateUmbracoLockData ( ) ;
}
if ( tableName . Equals ( "cmsContentType" ) )
2012-10-25 18:38:23 -02:00
{
2012-10-23 07:30:00 -02:00
CreateCmsContentTypeData ( ) ;
2012-10-25 18:38:23 -02:00
}
if ( tableName . Equals ( "umbracoUser" ) )
{
2012-10-23 07:30:00 -02:00
CreateUmbracoUserData ( ) ;
2012-10-25 18:38:23 -02:00
}
if ( tableName . Equals ( "umbracoUserType" ) )
{
2012-10-23 07:30:00 -02:00
CreateUmbracoUserTypeData ( ) ;
2012-10-25 18:38:23 -02:00
}
if ( tableName . Equals ( "umbracoUser2app" ) )
{
2012-10-23 07:30:00 -02:00
CreateUmbracoUser2AppData ( ) ;
2012-10-25 18:38:23 -02:00
}
if ( tableName . Equals ( "cmsPropertyTypeGroup" ) )
{
2012-10-23 07:30:00 -02:00
CreateCmsPropertyTypeGroupData ( ) ;
2012-10-25 18:38:23 -02:00
}
if ( tableName . Equals ( "cmsPropertyType" ) )
{
2012-10-23 07:30:00 -02:00
CreateCmsPropertyTypeData ( ) ;
2012-10-25 18:38:23 -02:00
}
if ( tableName . Equals ( "umbracoLanguage" ) )
{
2012-10-23 07:30:00 -02:00
CreateUmbracoLanguageData ( ) ;
2012-10-25 18:38:23 -02:00
}
2012-10-23 07:30:00 -02:00
2012-10-25 18:38:23 -02:00
if ( tableName . Equals ( "cmsContentTypeAllowedContentType" ) )
{
CreateCmsContentTypeAllowedContentTypeData ( ) ;
}
if ( tableName . Equals ( "cmsDataType" ) )
{
CreateCmsDataTypeData ( ) ;
2012-10-23 07:30:00 -02:00
}
2012-11-09 08:49:48 -01:00
2012-12-03 11:49:09 -01:00
if ( tableName . Equals ( "cmsDataTypePreValues" ) )
{
CreateCmsDataTypePreValuesData ( ) ;
}
2012-11-09 08:49:48 -01:00
if ( tableName . Equals ( "umbracoRelationType" ) )
{
CreateUmbracoRelationTypeData ( ) ;
}
2015-09-22 16:13:21 +02:00
2012-12-03 11:49:09 -01:00
if ( tableName . Equals ( "cmsTaskType" ) )
{
CreateCmsTaskTypeData ( ) ;
}
2012-12-27 18:52:47 -01:00
2015-09-22 16:13:21 +02:00
if ( tableName . Equals ( "umbracoMigration" ) )
{
CreateUmbracoMigrationData ( ) ;
}
2015-01-09 13:35:32 +11:00
_logger . Info < BaseDataCreation > ( string . Format ( "Done creating data in table {0}" , tableName ) ) ;
2012-10-23 07:30:00 -02:00
}
2016-05-18 10:55:19 +02:00
private void CreateUmbracoNodeData ( )
2012-10-23 07:30:00 -02:00
{
2013-03-14 22:00:37 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 1 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 0 , Path = "-1" , SortOrder = 0 , UniqueId = new Guid ( "916724a5-173d-4619-b97e-b9de133dd6f5" ) , Text = "SYSTEM DATA: umbraco master root" , NodeObjectType = new Guid ( Constants . ObjectTypes . SystemRoot ) , CreateDate = DateTime . Now } ) ;
2013-03-22 13:13:05 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 20 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 0 , Path = "-1,-20" , SortOrder = 0 , UniqueId = new Guid ( "0F582A79-1E41-4CF0-BFA0-76340651891A" ) , Text = "Recycle Bin" , NodeObjectType = new Guid ( Constants . ObjectTypes . ContentRecycleBin ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 21 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 0 , Path = "-1,-21" , SortOrder = 0 , UniqueId = new Guid ( "BF7C7CBC-952F-4518-97A2-69E9C7B33842" ) , Text = "Recycle Bin" , NodeObjectType = new Guid ( Constants . ObjectTypes . MediaRecycleBin ) , CreateDate = DateTime . Now } ) ;
2013-03-14 22:00:37 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 92 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-92" , SortOrder = 35 , UniqueId = new Guid ( "f0bc4bfb-b499-40d6-ba86-058885a5178c" ) , Text = "Label" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 90 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-90" , SortOrder = 34 , UniqueId = new Guid ( "84c6b441-31df-4ffe-b67e-67d5bc3ae65a" ) , Text = "Upload" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2015-10-29 13:54:16 +01:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 89 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-89" , SortOrder = 33 , UniqueId = new Guid ( "c6bac0dd-4ab9-45b1-8e30-e4b619ee5da3" ) , Text = "Textarea" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2013-03-14 22:00:37 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 88 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-88" , SortOrder = 32 , UniqueId = new Guid ( "0cc0eba1-9960-42c9-bf9b-60e150b429ae" ) , Text = "Textstring" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 87 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-87" , SortOrder = 4 , UniqueId = new Guid ( "ca90c950-0aff-4e72-b976-a30b1ac57dad" ) , Text = "Richtext editor" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 51 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-51" , SortOrder = 2 , UniqueId = new Guid ( "2e6d3631-066e-44b8-aec4-96f09099b2b5" ) , Text = "Numeric" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 49 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-49" , SortOrder = 2 , UniqueId = new Guid ( "92897bc6-a5f3-4ffe-ae27-f2e7e33dda49" ) , Text = "True/false" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 43 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-43" , SortOrder = 2 , UniqueId = new Guid ( "fbaf13a8-4036-41f2-93a3-974f678c312a" ) , Text = "Checkbox list" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 42 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-42" , SortOrder = 2 , UniqueId = new Guid ( "0b6a45e7-44ba-430d-9da5-4e46060b9e03" ) , Text = "Dropdown" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 41 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-41" , SortOrder = 2 , UniqueId = new Guid ( "5046194e-4237-453c-a547-15db3a07c4e1" ) , Text = "Date Picker" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 40 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-40" , SortOrder = 2 , UniqueId = new Guid ( "bb5f57c9-ce2b-4bb9-b697-4caca783a805" ) , Text = "Radiobox" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2015-10-22 17:34:01 +02:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 39 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-39" , SortOrder = 2 , UniqueId = new Guid ( "f38f0ac7-1d27-439c-9f3f-089cd8825a53" ) , Text = "Dropdown multiple" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2013-03-14 22:00:37 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 37 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-37" , SortOrder = 2 , UniqueId = new Guid ( "0225af17-b302-49cb-9176-b9f35cab9c17" ) , Text = "Approved Color" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = - 36 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-36" , SortOrder = 2 , UniqueId = new Guid ( "e4d66c0f-b935-4200-81f0-025f7256b89a" ) , Text = "Date Picker with time" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2016-06-03 10:57:54 +02:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = Constants . DataTypes . DefaultContentListView , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-95" , SortOrder = 2 , UniqueId = new Guid ( "C0808DD3-8133-4E4B-8CE8-E2BEA84A96A4" ) , Text = Constants . Conventions . DataTypes . ListViewPrefix + "Content" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = Constants . DataTypes . DefaultMediaListView , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-96" , SortOrder = 2 , UniqueId = new Guid ( "3A0156C4-3B8C-4803-BDC1-6871FAA83FFF" ) , Text = Constants . Conventions . DataTypes . ListViewPrefix + "Media" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = Constants . DataTypes . DefaultMembersListView , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,-97" , SortOrder = 2 , UniqueId = new Guid ( "AA2C52A0-CE87-4E65-A47C-7DF09358585D" ) , Text = Constants . Conventions . DataTypes . ListViewPrefix + "Members" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2013-03-22 13:13:05 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1031 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1031" , SortOrder = 2 , UniqueId = new Guid ( "f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d" ) , Text = Constants . Conventions . MediaTypes . Folder , NodeObjectType = new Guid ( Constants . ObjectTypes . MediaType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1032 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1032" , SortOrder = 2 , UniqueId = new Guid ( "cc07b313-0843-4aa8-bbda-871c8da728c8" ) , Text = Constants . Conventions . MediaTypes . Image , NodeObjectType = new Guid ( Constants . ObjectTypes . MediaType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1033 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1033" , SortOrder = 2 , UniqueId = new Guid ( "4c52d8ab-54e6-40cd-999c-7a5f24903e4d" ) , Text = Constants . Conventions . MediaTypes . File , NodeObjectType = new Guid ( Constants . ObjectTypes . MediaType ) , CreateDate = DateTime . Now } ) ;
2013-03-14 22:00:37 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1034 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1034" , SortOrder = 2 , UniqueId = new Guid ( "a6857c73-d6e9-480c-b6e6-f15f6ad11125" ) , Text = "Content Picker" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2013-11-19 17:52:20 +11:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1035 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1035" , SortOrder = 2 , UniqueId = new Guid ( "93929b9a-93a2-4e2a-b239-d99334440a59" ) , Text = "Media Picker" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2014-09-18 11:52:12 +10:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1036 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1036" , SortOrder = 2 , UniqueId = new Guid ( "2b24165f-9782-4aa3-b459-1de4a4d21f60" ) , Text = "Member Picker" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2013-03-14 22:00:37 +00:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1040 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1040" , SortOrder = 2 , UniqueId = new Guid ( "21e798da-e06e-4eda-a511-ed257f78d4fa" ) , Text = "Related Links" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2014-09-12 12:51:41 +10:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1041 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1041" , SortOrder = 2 , UniqueId = new Guid ( "b6b73142-b9c1-4bf8-a16d-e1c23320b549" ) , Text = "Tags" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1043 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1043" , SortOrder = 2 , UniqueId = new Guid ( "1df9f033-e6d4-451f-b8d2-e0cbc50a836f" ) , Text = "Image Cropper" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2014-03-07 19:30:54 +11:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1044 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1044" , SortOrder = 0 , UniqueId = new Guid ( "d59be02f-1df9-4228-aa1e-01917d806cda" ) , Text = Constants . Conventions . MemberTypes . DefaultAlias , NodeObjectType = new Guid ( Constants . ObjectTypes . MemberType ) , CreateDate = DateTime . Now } ) ;
2013-11-19 17:52:20 +11:00
_database . Insert ( "umbracoNode" , "id" , false , new NodeDto { NodeId = 1045 , Trashed = false , ParentId = - 1 , UserId = 0 , Level = 1 , Path = "-1,1045" , SortOrder = 2 , UniqueId = new Guid ( "7E3962CC-CE20-4FFC-B661-5897A894BA7E" ) , Text = "Multiple Media Picker" , NodeObjectType = new Guid ( Constants . ObjectTypes . DataType ) , CreateDate = DateTime . Now } ) ;
2016-05-18 10:55:19 +02:00
2013-10-30 08:59:28 +11:00
//TODO: We're not creating these for 7.0
//_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1039, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1039", SortOrder = 2, UniqueId = new Guid("06f349a9-c949-4b6a-8660-59c10451af42"), Text = "Ultimate Picker", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
//_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1038, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1038", SortOrder = 2, UniqueId = new Guid("1251c96c-185c-4e9b-93f4-b48205573cbd"), Text = "Simple Editor", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
2016-05-18 10:55:19 +02:00
2016-05-31 17:24:40 +02:00
//_database.Insert("umbracoNode", "id", false, new NodeDto { NodeId = 1042, Trashed = false, ParentId = -1, UserId = 0, Level = 1, Path = "-1,1042", SortOrder = 2, UniqueId = new Guid("0a452bd5-83f9-4bc3-8403-1286e13fb77e"), Text = "Macro Container", NodeObjectType = new Guid(Constants.ObjectTypes.DataType), CreateDate = DateTime.Now });
2012-10-23 07:30:00 -02:00
}
2016-05-18 10:55:19 +02:00
private void CreateUmbracoLockData ( )
{
// all lock objects
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . Servers , Name = "Servers" } ) ;
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . ContentTypes , Name = "ContentTypes" } ) ;
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . ContentTree , Name = "ContentTree" } ) ;
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . MediaTypes , Name = "MediaTypes" } ) ;
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . MediaTree , Name = "MediaTree" } ) ;
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . MemberTypes , Name = "MemberTypes" } ) ;
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . MemberTree , Name = "MemberTree" } ) ;
_database . Insert ( "umbracoLock" , "id" , false , new LockDto { Id = Constants . Locks . Domains , Name = "Domains" } ) ;
}
2012-10-23 07:30:00 -02:00
private void CreateCmsContentTypeData ( )
{
2014-08-15 11:57:01 -06:00
_database . Insert ( "cmsContentType" , "pk" , false , new ContentTypeDto { PrimaryKey = 532 , NodeId = 1031 , Alias = Constants . Conventions . MediaTypes . Folder , Icon = "icon-folder" , Thumbnail = "icon-folder" , IsContainer = false , AllowAtRoot = true } ) ;
2016-11-03 10:39:59 +01:00
_database . Insert ( "cmsContentType" , "pk" , false , new ContentTypeDto { PrimaryKey = 533 , NodeId = 1032 , Alias = Constants . Conventions . MediaTypes . Image , Icon = "icon-picture" , Thumbnail = "icon-picture" , AllowAtRoot = true } ) ;
_database . Insert ( "cmsContentType" , "pk" , false , new ContentTypeDto { PrimaryKey = 534 , NodeId = 1033 , Alias = Constants . Conventions . MediaTypes . File , Icon = "icon-document" , Thumbnail = "icon-document" , AllowAtRoot = true } ) ;
2014-08-15 11:57:01 -06:00
_database . Insert ( "cmsContentType" , "pk" , false , new ContentTypeDto { PrimaryKey = 531 , NodeId = 1044 , Alias = Constants . Conventions . MemberTypes . DefaultAlias , Icon = "icon-user" , Thumbnail = "icon-user" } ) ;
2012-10-23 07:30:00 -02:00
}
private void CreateUmbracoUserData ( )
{
2013-09-24 19:27:13 +10:00
_database . Insert ( "umbracoUser" , "id" , false , new UserDto { Id = 0 , Disabled = false , NoConsole = false , Type = 1 , ContentStartId = - 1 , MediaStartId = - 1 , UserName = "Administrator" , Login = "admin" , Password = "default" , Email = "" , UserLanguage = "en" } ) ;
2012-12-27 19:53:01 -01:00
//_database.Update<UserDto>("SET id = @IdAfter WHERE id = @IdBefore AND userLogin = @Login", new { IdAfter = 0, IdBefore = 1, Login = "admin" });
2012-10-23 07:30:00 -02:00
}
private void CreateUmbracoUserTypeData ( )
{
2013-08-28 17:52:44 +02:00
_database . Insert ( "umbracoUserType" , "id" , false , new UserTypeDto { Id = 1 , Alias = "admin" , Name = "Administrators" , DefaultPermissions = "CADMOSKTPIURZ:5F7" } ) ;
2012-12-05 14:18:08 -01:00
_database . Insert ( "umbracoUserType" , "id" , false , new UserTypeDto { Id = 2 , Alias = "writer" , Name = "Writer" , DefaultPermissions = "CAH:F" } ) ;
_database . Insert ( "umbracoUserType" , "id" , false , new UserTypeDto { Id = 3 , Alias = "editor" , Name = "Editors" , DefaultPermissions = "CADMOSKTPUZ:5F" } ) ;
_database . Insert ( "umbracoUserType" , "id" , false , new UserTypeDto { Id = 4 , Alias = "translator" , Name = "Translator" , DefaultPermissions = "AF" } ) ;
2012-10-23 07:30:00 -02:00
}
private void CreateUmbracoUser2AppData ( )
{
2013-03-22 13:13:05 +00:00
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Content } ) ;
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Developer } ) ;
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Media } ) ;
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Members } ) ;
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Settings } ) ;
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Users } ) ;
2014-09-22 20:07:35 +02:00
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Forms } ) ;
2016-03-22 12:35:59 +01:00
_database . Insert ( "umbracoUser2app" , "user" , false , new User2AppDto { UserId = 0 , AppAlias = Constants . Applications . Translation } ) ;
2012-10-23 07:30:00 -02:00
}
2013-09-19 13:05:36 +10:00
2012-10-23 07:30:00 -02:00
private void CreateCmsPropertyTypeGroupData ( )
2012-12-05 14:18:08 -01:00
{
2015-12-03 09:43:33 +01:00
_database . Insert ( "cmsPropertyTypeGroup" , "id" , false , new PropertyTypeGroupDto { Id = 3 , ContentTypeNodeId = 1032 , Text = "Image" , SortOrder = 1 , UniqueId = new Guid ( Constants . PropertyTypeGroups . Image ) } ) ;
_database . Insert ( "cmsPropertyTypeGroup" , "id" , false , new PropertyTypeGroupDto { Id = 4 , ContentTypeNodeId = 1033 , Text = "File" , SortOrder = 1 , UniqueId = new Guid ( Constants . PropertyTypeGroups . File ) } ) ;
_database . Insert ( "cmsPropertyTypeGroup" , "id" , false , new PropertyTypeGroupDto { Id = 5 , ContentTypeNodeId = 1031 , Text = "Contents" , SortOrder = 1 , UniqueId = new Guid ( Constants . PropertyTypeGroups . Contents ) } ) ;
2013-10-22 13:41:04 +11:00
//membership property group
2015-12-03 09:43:33 +01:00
_database . Insert ( "cmsPropertyTypeGroup" , "id" , false , new PropertyTypeGroupDto { Id = 11 , ContentTypeNodeId = 1044 , Text = "Membership" , SortOrder = 1 , UniqueId = new Guid ( Constants . PropertyTypeGroups . Membership ) } ) ;
2012-10-23 07:30:00 -02:00
}
private void CreateCmsPropertyTypeData ( )
{
2015-12-16 17:23:50 +01:00
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 6 , UniqueId = 6. ToGuid ( ) , DataTypeId = 1043 , ContentTypeId = 1032 , PropertyTypeGroupId = 3 , Alias = Constants . Conventions . Media . File , Name = "Upload image" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
2015-06-25 09:56:40 +02:00
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 7 , UniqueId = 7. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1032 , PropertyTypeGroupId = 3 , Alias = Constants . Conventions . Media . Width , Name = "Width" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 8 , UniqueId = 8. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1032 , PropertyTypeGroupId = 3 , Alias = Constants . Conventions . Media . Height , Name = "Height" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 9 , UniqueId = 9. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1032 , PropertyTypeGroupId = 3 , Alias = Constants . Conventions . Media . Bytes , Name = "Size" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 10 , UniqueId = 10. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1032 , PropertyTypeGroupId = 3 , Alias = Constants . Conventions . Media . Extension , Name = "Type" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 24 , UniqueId = 24. ToGuid ( ) , DataTypeId = - 90 , ContentTypeId = 1033 , PropertyTypeGroupId = 4 , Alias = Constants . Conventions . Media . File , Name = "Upload file" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 25 , UniqueId = 25. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1033 , PropertyTypeGroupId = 4 , Alias = Constants . Conventions . Media . Extension , Name = "Type" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 26 , UniqueId = 26. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1033 , PropertyTypeGroupId = 4 , Alias = Constants . Conventions . Media . Bytes , Name = "Size" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
2016-06-03 10:57:54 +02:00
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 27 , UniqueId = 27. ToGuid ( ) , DataTypeId = Constants . DataTypes . DefaultMediaListView , ContentTypeId = 1031 , PropertyTypeGroupId = 5 , Alias = "contents" , Name = "Contents:" , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
2013-10-22 13:41:04 +11:00
//membership property types
2015-06-25 09:56:40 +02:00
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 28 , UniqueId = 28. ToGuid ( ) , DataTypeId = - 89 , ContentTypeId = 1044 , PropertyTypeGroupId = 11 , Alias = Constants . Conventions . Member . Comments , Name = Constants . Conventions . Member . CommentsLabel , SortOrder = 0 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 29 , UniqueId = 29. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1044 , PropertyTypeGroupId = 11 , Alias = Constants . Conventions . Member . FailedPasswordAttempts , Name = Constants . Conventions . Member . FailedPasswordAttemptsLabel , SortOrder = 1 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 30 , UniqueId = 30. ToGuid ( ) , DataTypeId = - 49 , ContentTypeId = 1044 , PropertyTypeGroupId = 11 , Alias = Constants . Conventions . Member . IsApproved , Name = Constants . Conventions . Member . IsApprovedLabel , SortOrder = 2 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 31 , UniqueId = 31. ToGuid ( ) , DataTypeId = - 49 , ContentTypeId = 1044 , PropertyTypeGroupId = 11 , Alias = Constants . Conventions . Member . IsLockedOut , Name = Constants . Conventions . Member . IsLockedOutLabel , SortOrder = 3 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 32 , UniqueId = 32. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1044 , PropertyTypeGroupId = 11 , Alias = Constants . Conventions . Member . LastLockoutDate , Name = Constants . Conventions . Member . LastLockoutDateLabel , SortOrder = 4 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 33 , UniqueId = 33. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1044 , PropertyTypeGroupId = 11 , Alias = Constants . Conventions . Member . LastLoginDate , Name = Constants . Conventions . Member . LastLoginDateLabel , SortOrder = 5 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
_database . Insert ( "cmsPropertyType" , "id" , false , new PropertyTypeDto { Id = 34 , UniqueId = 34. ToGuid ( ) , DataTypeId = - 92 , ContentTypeId = 1044 , PropertyTypeGroupId = 11 , Alias = Constants . Conventions . Member . LastPasswordChangeDate , Name = Constants . Conventions . Member . LastPasswordChangeDateLabel , SortOrder = 6 , Mandatory = false , ValidationRegExp = null , Description = null } ) ;
2013-10-22 13:41:04 +11:00
2012-10-23 07:30:00 -02:00
}
private void CreateUmbracoLanguageData ( )
{
2012-12-05 14:18:08 -01:00
_database . Insert ( "umbracoLanguage" , "id" , false , new LanguageDto { Id = 1 , IsoCode = "en-US" , CultureName = "en-US" } ) ;
2012-10-23 07:30:00 -02:00
}
2012-10-25 18:38:23 -02:00
private void CreateCmsContentTypeAllowedContentTypeData ( )
2012-10-23 07:30:00 -02:00
{
2012-12-05 14:18:08 -01:00
_database . Insert ( "cmsContentTypeAllowedContentType" , "Id" , false , new ContentTypeAllowedContentTypeDto { Id = 1031 , AllowedId = 1031 } ) ;
_database . Insert ( "cmsContentTypeAllowedContentType" , "Id" , false , new ContentTypeAllowedContentTypeDto { Id = 1031 , AllowedId = 1032 } ) ;
_database . Insert ( "cmsContentTypeAllowedContentType" , "Id" , false , new ContentTypeAllowedContentTypeDto { Id = 1031 , AllowedId = 1033 } ) ;
2012-10-23 07:30:00 -02:00
}
private void CreateCmsDataTypeData ( )
{
2012-12-05 12:47:28 -01:00
//TODO Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors.
2013-09-05 18:38:54 +10:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 1 , DataTypeId = - 49 , PropertyEditorAlias = Constants . PropertyEditors . TrueFalseAlias , DbType = "Integer" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 2 , DataTypeId = - 51 , PropertyEditorAlias = Constants . PropertyEditors . IntegerAlias , DbType = "Integer" } ) ;
2013-11-14 13:39:03 +11:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 3 , DataTypeId = - 87 , PropertyEditorAlias = Constants . PropertyEditors . TinyMCEAlias , DbType = "Ntext" } ) ;
2013-09-05 18:38:54 +10:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 4 , DataTypeId = - 88 , PropertyEditorAlias = Constants . PropertyEditors . TextboxAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 5 , DataTypeId = - 89 , PropertyEditorAlias = Constants . PropertyEditors . TextboxMultipleAlias , DbType = "Ntext" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 6 , DataTypeId = - 90 , PropertyEditorAlias = Constants . PropertyEditors . UploadFieldAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 7 , DataTypeId = - 92 , PropertyEditorAlias = Constants . PropertyEditors . NoEditAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 8 , DataTypeId = - 36 , PropertyEditorAlias = Constants . PropertyEditors . DateTimeAlias , DbType = "Date" } ) ;
2015-10-22 17:34:01 +02:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 9 , DataTypeId = - 37 , PropertyEditorAlias = Constants . PropertyEditors . ColorPickerAlias , DbType = "Nvarchar" } ) ;
2013-09-05 18:38:54 +10:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 11 , DataTypeId = - 39 , PropertyEditorAlias = Constants . PropertyEditors . DropDownListMultipleAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 12 , DataTypeId = - 40 , PropertyEditorAlias = Constants . PropertyEditors . RadioButtonListAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 13 , DataTypeId = - 41 , PropertyEditorAlias = Constants . PropertyEditors . DateAlias , DbType = "Date" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 14 , DataTypeId = - 42 , PropertyEditorAlias = Constants . PropertyEditors . DropDownListAlias , DbType = "Integer" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 15 , DataTypeId = - 43 , PropertyEditorAlias = Constants . PropertyEditors . CheckBoxListAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 16 , DataTypeId = 1034 , PropertyEditorAlias = Constants . PropertyEditors . ContentPickerAlias , DbType = "Integer" } ) ;
2014-09-18 11:52:12 +10:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 18 , DataTypeId = 1036 , PropertyEditorAlias = Constants . PropertyEditors . MemberPickerAlias , DbType = "Integer" } ) ;
2016-05-09 14:35:55 +02:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 17 , DataTypeId = 1035 , PropertyEditorAlias = Constants . PropertyEditors . MultipleMediaPickerAlias , DbType = "Nvarchar" } ) ;
2013-09-05 18:38:54 +10:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 21 , DataTypeId = 1040 , PropertyEditorAlias = Constants . PropertyEditors . RelatedLinksAlias , DbType = "Ntext" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 22 , DataTypeId = 1041 , PropertyEditorAlias = Constants . PropertyEditors . TagsAlias , DbType = "Ntext" } ) ;
2014-09-12 12:51:41 +10:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 24 , DataTypeId = 1043 , PropertyEditorAlias = Constants . PropertyEditors . ImageCropperAlias , DbType = "Ntext" } ) ;
2013-11-19 17:52:20 +11:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = 25 , DataTypeId = 1045 , PropertyEditorAlias = Constants . PropertyEditors . MultipleMediaPickerAlias , DbType = "Nvarchar" } ) ;
2016-06-03 10:57:54 +02:00
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = - 26 , DataTypeId = Constants . DataTypes . DefaultContentListView , PropertyEditorAlias = Constants . PropertyEditors . ListViewAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = - 27 , DataTypeId = Constants . DataTypes . DefaultMediaListView , PropertyEditorAlias = Constants . PropertyEditors . ListViewAlias , DbType = "Nvarchar" } ) ;
_database . Insert ( "cmsDataType" , "pk" , false , new DataTypeDto { PrimaryKey = - 28 , DataTypeId = Constants . DataTypes . DefaultMembersListView , PropertyEditorAlias = Constants . PropertyEditors . ListViewAlias , DbType = "Nvarchar" } ) ;
2013-11-18 20:43:42 +01:00
2013-10-30 08:59:28 +11:00
//TODO: We're not creating these for 7.0
//_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 19, DataTypeId = 1038, PropertyEditorAlias = Constants.PropertyEditors.MarkdownEditorAlias, DbType = "Ntext" });
//_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 20, DataTypeId = 1039, PropertyEditorAlias = Constants.PropertyEditors.UltimatePickerAlias, DbType = "Ntext" });
//_database.Insert("cmsDataType", "pk", false, new DataTypeDto { PrimaryKey = 23, DataTypeId = 1042, PropertyEditorAlias = Constants.PropertyEditors.MacroContainerAlias, DbType = "Ntext" });
2012-10-23 07:30:00 -02:00
}
2012-10-30 15:03:58 -01:00
private void CreateCmsDataTypePreValuesData ( )
2012-12-03 11:49:09 -01:00
{
2012-12-05 12:47:28 -01:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = 3 , Alias = "" , SortOrder = 0 , DataTypeNodeId = - 87 , Value = ",code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,umbracoembed,mcecharmap,|1|1,2,3,|0|500,400|1049,|true|" } ) ;
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = 4 , Alias = "group" , SortOrder = 0 , DataTypeNodeId = 1041 , Value = "default" } ) ;
2014-05-28 13:33:03 +10:00
//default's for MultipleMediaPickerAlias picker
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = 5 , Alias = "multiPicker" , SortOrder = 0 , DataTypeNodeId = 1045 , Value = "1" } ) ;
2014-09-22 18:59:17 +10:00
//defaults for the member list
2016-06-03 10:57:54 +02:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 1 , Alias = "pageSize" , SortOrder = 1 , DataTypeNodeId = Constants . DataTypes . DefaultMembersListView , Value = "10" } ) ;
2016-11-03 10:31:44 +01:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 2 , Alias = "orderBy" , SortOrder = 2 , DataTypeNodeId = Constants . DataTypes . DefaultMembersListView , Value = "username" } ) ;
2016-06-03 10:57:54 +02:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 3 , Alias = "orderDirection" , SortOrder = 3 , DataTypeNodeId = Constants . DataTypes . DefaultMembersListView , Value = "asc" } ) ;
2016-11-03 10:31:44 +01:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 4 , Alias = "includeProperties" , SortOrder = 4 , DataTypeNodeId = Constants . DataTypes . DefaultMembersListView , Value = "[{\"alias\":\"username\",\"isSystem\":1},{\"alias\":\"email\",\"isSystem\":1},{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1}]" } ) ;
2015-10-21 12:52:10 +02:00
//layouts for the list view
var cardLayout = "{\"name\": \"Grid\",\"path\": \"views/propertyeditors/listview/layouts/grid/grid.html\", \"icon\": \"icon-thumbnails-small\", \"isSystem\": 1, \"selected\": true}" ;
var listLayout = "{\"name\": \"List\",\"path\": \"views/propertyeditors/listview/layouts/list/list.html\",\"icon\": \"icon-list\", \"isSystem\": 1,\"selected\": true}" ;
//defaults for the media list
2016-06-03 10:57:54 +02:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 5 , Alias = "pageSize" , SortOrder = 1 , DataTypeNodeId = Constants . DataTypes . DefaultMediaListView , Value = "100" } ) ;
2016-11-03 10:31:44 +01:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 6 , Alias = "orderBy" , SortOrder = 2 , DataTypeNodeId = Constants . DataTypes . DefaultMediaListView , Value = "updateDate" } ) ;
2016-06-03 10:57:54 +02:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 7 , Alias = "orderDirection" , SortOrder = 3 , DataTypeNodeId = Constants . DataTypes . DefaultMediaListView , Value = "desc" } ) ;
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 8 , Alias = "layouts" , SortOrder = 4 , DataTypeNodeId = Constants . DataTypes . DefaultMediaListView , Value = "[" + cardLayout + "," + listLayout + "]" } ) ;
2016-11-03 10:31:44 +01:00
_database . Insert ( "cmsDataTypePreValues" , "id" , false , new DataTypePreValueDto { Id = - 9 , Alias = "includeProperties" , SortOrder = 5 , DataTypeNodeId = Constants . DataTypes . DefaultMediaListView , Value = "[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]" } ) ;
2012-12-03 11:49:09 -01:00
}
2012-10-30 15:03:58 -01:00
private void CreateUmbracoRelationTypeData ( )
2012-11-09 08:49:48 -01:00
{
2015-01-04 17:09:05 +00:00
_database . Insert ( "umbracoRelationType" , "id" , false , new RelationTypeDto { Id = 1 , Alias = Constants . Conventions . RelationTypes . RelateDocumentOnCopyAlias , ChildObjectType = new Guid ( Constants . ObjectTypes . Document ) , ParentObjectType = new Guid ( Constants . ObjectTypes . Document ) , Dual = true , Name = Constants . Conventions . RelationTypes . RelateDocumentOnCopyName } ) ;
_database . Insert ( "umbracoRelationType" , "id" , false , new RelationTypeDto { Id = 2 , Alias = Constants . Conventions . RelationTypes . RelateParentDocumentOnDeleteAlias , ChildObjectType = new Guid ( Constants . ObjectTypes . Document ) , ParentObjectType = new Guid ( Constants . ObjectTypes . Document ) , Dual = false , Name = Constants . Conventions . RelationTypes . RelateParentDocumentOnDeleteName } ) ;
2012-11-09 08:49:48 -01:00
}
2012-10-30 15:03:58 -01:00
private void CreateCmsTaskTypeData ( )
2012-12-03 11:49:09 -01:00
{
2012-12-05 12:47:28 -01:00
_database . Insert ( "cmsTaskType" , "id" , false , new TaskTypeDto { Id = 1 , Alias = "toTranslate" } ) ;
2012-12-03 11:49:09 -01:00
}
2015-09-22 16:13:21 +02:00
private void CreateUmbracoMigrationData ( )
{
var dto = new MigrationDto
{
Id = 1 ,
Name = GlobalSettings . UmbracoMigrationName ,
2016-09-01 19:06:08 +02:00
Version = UmbracoVersion . SemanticVersion . ToString ( ) ,
2015-09-22 16:13:21 +02:00
CreateDate = DateTime . Now
} ;
_database . Insert ( "umbracoMigration" , "pk" , false , dto ) ;
}
2012-10-23 07:30:00 -02:00
}
}