Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region Insert Data
- #region Insert System Application
- migrationBuilder.InsertData(
- table: "Applications",
- columns: new[]
- {
- "Id",
- "Guid",
- "CreatedAt",
- "UpdatedAt",
- "Name",
- "Description"
- },
- values: new object[]
- {
- 1,
- Constants.ApplicationSystemGuid,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- "System",
- "This is a default application to manage users"
- }
- );
- migrationBuilder.InsertData(
- table: "Forms",
- columns: new[]
- {
- "Id",
- "Guid",
- "CreatedAt",
- "UpdatedAt",
- "Name",
- "ApplicationId"
- },
- values: new object[]
- {
- 1,
- Constants.FormUsersGuid,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- "Users",
- 1
- }
- );
- migrationBuilder.InsertData(
- table: "Forms",
- columns: new[]
- {
- "Id",
- "Guid",
- "CreatedAt",
- "UpdatedAt",
- "Name",
- "ApplicationId"
- },
- values: new object[]
- {
- 2,
- Constants.FormGroupsGuid,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- "Groups",
- 1
- }
- );
- migrationBuilder.InsertData(
- table: "FormAttributes",
- columns: new[]
- {
- "Id",
- "CreatedAt",
- "UpdatedAt",
- "Name",
- "FormId",
- "AttributeTypeId",
- "Column",
- "Code"
- },
- values: new object[]
- {
- 1,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- "First Name",
- 1,
- 1,
- "Text1",
- "UserFirstName"
- }
- );
- migrationBuilder.InsertData(
- table: "FormAttributes",
- columns: new[]
- {
- "Id",
- "CreatedAt",
- "UpdatedAt",
- "Name",
- "FormId",
- "AttributeTypeId",
- "Column",
- "Code"
- },
- values: new object[]
- {
- 2,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- "Last Name",
- 1,
- 1,
- "Text2",
- "UserLastName"
- }
- );
- migrationBuilder.InsertData(
- table: "FormAttributes",
- columns: new[]
- {
- "Id",
- "CreatedAt",
- "UpdatedAt",
- "Name",
- "FormId",
- "AttributeTypeId",
- "Column",
- "Code"
- },
- values: new object[]
- {
- 3,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- "Name",
- 2,
- 1,
- "Text1",
- "GroupName"
- }
- );
- migrationBuilder.InsertData(
- table: "Fields",
- columns: new[]
- {
- "Id",
- "CreatedAt",
- "UpdatedAt",
- "FormId",
- "PlaceholderId",
- "FieldPosition",
- "IsRequired",
- "IsEditable",
- "IsVisible",
- "FormAttributeId"
- },
- values: new object[]
- {
- 1,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- 1,
- 0,
- 0,
- true,
- true,
- true,
- 1
- }
- );
- migrationBuilder.InsertData(
- table: "Fields",
- columns: new[]
- {
- "Id",
- "CreatedAt",
- "UpdatedAt",
- "FormId",
- "PlaceholderId",
- "FieldPosition",
- "IsRequired",
- "IsEditable",
- "IsVisible",
- "FormAttributeId"
- },
- values: new object[]
- {
- 2,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- 1,
- 0,
- 1,
- true,
- true,
- true,
- 2
- }
- );
- migrationBuilder.InsertData(
- table: "Fields",
- columns: new[]
- {
- "Id",
- "CreatedAt",
- "UpdatedAt",
- "FormId",
- "PlaceholderId",
- "FieldPosition",
- "IsRequired",
- "IsEditable",
- "IsVisible",
- "FormAttributeId"
- },
- values: new object[]
- {
- 3,
- new DateTime(2019, 01, 30),
- new DateTime(2019, 01, 30),
- 2,
- 0,
- 0,
- true,
- true,
- true,
- 3
- }
- );
- migrationBuilder.InsertData(
- table: "Signatures",
- columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId" },
- values: new object[] { "1", new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 1 }
- );
- migrationBuilder.InsertData(
- table: "Signatures",
- columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId" },
- values: new object[] { "2", new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 2 }
- );
- #endregion
- #region Insert Users
- migrationBuilder.InsertData(
- table: "Documents",
- columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId", "Text1", "Text2" },
- values: new object[] { 1, new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 1, "Admin First Name", "Admin Surname" }
- );
- //username: admin
- //password: admin
- migrationBuilder.InsertData(
- table: "AspNetUsers",
- columns: new[]
- {
- "Id",
- "DocumentId",
- "UserName",
- "NormalizedUserName",
- "EmailConfirmed",
- "PasswordHash",
- "SecurityStamp",
- "ConcurrencyStamp",
- "PhoneNumber",
- "PhoneNumberConfirmed",
- "TwoFactorEnabled",
- "LockoutEnd",
- "LockoutEnabled",
- "AccessFailedCount"
- },
- values: new object[]
- {
- "0bbc790f-cf94-48b3-ae77-3cc2e15a2a9b",
- 1,
- "admin",
- "ADMIN",
- false,
- "AQAAAAEAACcQAAAAEK9jfhMVsZdoouotsMTWpJjnY46fCL6cbWMhArAYy3ONrOQRbxHvDXl+Y8R+Hm1fQQ==",
- "P4EBTGKUNSAFJLYUUPOTPWPDLZWF6DJA",
- "342eea67-c72f-4332-9930-dd9c2662f89b",
- null,
- false,
- false,
- null,
- true,
- 0
- }
- );
- #endregion
- #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement