Advertisement
Guest User

Untitled

a guest
Jan 24th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.20 KB | None | 0 0
  1. #region Insert Data
  2.  
  3. #region Insert System Application
  4. migrationBuilder.InsertData(
  5. table: "Applications",
  6. columns: new[]
  7. {
  8. "Id",
  9. "Guid",
  10. "CreatedAt",
  11. "UpdatedAt",
  12. "Name",
  13. "Description"
  14. },
  15. values: new object[]
  16. {
  17. 1,
  18. Constants.ApplicationSystemGuid,
  19. new DateTime(2019, 01, 30),
  20. new DateTime(2019, 01, 30),
  21. "System",
  22. "This is a default application to manage users"
  23. }
  24. );
  25. migrationBuilder.InsertData(
  26. table: "Forms",
  27. columns: new[]
  28. {
  29. "Id",
  30. "Guid",
  31. "CreatedAt",
  32. "UpdatedAt",
  33. "Name",
  34. "ApplicationId"
  35. },
  36. values: new object[]
  37. {
  38. 1,
  39. Constants.FormUsersGuid,
  40. new DateTime(2019, 01, 30),
  41. new DateTime(2019, 01, 30),
  42. "Users",
  43. 1
  44. }
  45. );
  46. migrationBuilder.InsertData(
  47. table: "Forms",
  48. columns: new[]
  49. {
  50. "Id",
  51. "Guid",
  52. "CreatedAt",
  53. "UpdatedAt",
  54. "Name",
  55. "ApplicationId"
  56. },
  57. values: new object[]
  58. {
  59. 2,
  60. Constants.FormGroupsGuid,
  61. new DateTime(2019, 01, 30),
  62. new DateTime(2019, 01, 30),
  63. "Groups",
  64. 1
  65. }
  66. );
  67. migrationBuilder.InsertData(
  68. table: "FormAttributes",
  69. columns: new[]
  70. {
  71. "Id",
  72. "CreatedAt",
  73. "UpdatedAt",
  74. "Name",
  75. "FormId",
  76. "AttributeTypeId",
  77. "Column",
  78. "Code"
  79. },
  80. values: new object[]
  81. {
  82. 1,
  83. new DateTime(2019, 01, 30),
  84. new DateTime(2019, 01, 30),
  85. "First Name",
  86. 1,
  87. 1,
  88. "Text1",
  89. "UserFirstName"
  90. }
  91. );
  92. migrationBuilder.InsertData(
  93. table: "FormAttributes",
  94. columns: new[]
  95. {
  96. "Id",
  97. "CreatedAt",
  98. "UpdatedAt",
  99. "Name",
  100. "FormId",
  101. "AttributeTypeId",
  102. "Column",
  103. "Code"
  104. },
  105. values: new object[]
  106. {
  107. 2,
  108. new DateTime(2019, 01, 30),
  109. new DateTime(2019, 01, 30),
  110. "Last Name",
  111. 1,
  112. 1,
  113. "Text2",
  114. "UserLastName"
  115. }
  116. );
  117. migrationBuilder.InsertData(
  118. table: "FormAttributes",
  119. columns: new[]
  120. {
  121. "Id",
  122. "CreatedAt",
  123. "UpdatedAt",
  124. "Name",
  125. "FormId",
  126. "AttributeTypeId",
  127. "Column",
  128. "Code"
  129. },
  130. values: new object[]
  131. {
  132. 3,
  133. new DateTime(2019, 01, 30),
  134. new DateTime(2019, 01, 30),
  135. "Name",
  136. 2,
  137. 1,
  138. "Text1",
  139. "GroupName"
  140. }
  141. );
  142. migrationBuilder.InsertData(
  143. table: "Fields",
  144. columns: new[]
  145. {
  146. "Id",
  147. "CreatedAt",
  148. "UpdatedAt",
  149. "FormId",
  150. "PlaceholderId",
  151. "FieldPosition",
  152. "IsRequired",
  153. "IsEditable",
  154. "IsVisible",
  155. "FormAttributeId"
  156. },
  157. values: new object[]
  158. {
  159. 1,
  160. new DateTime(2019, 01, 30),
  161. new DateTime(2019, 01, 30),
  162. 1,
  163. 0,
  164. 0,
  165. true,
  166. true,
  167. true,
  168. 1
  169. }
  170. );
  171. migrationBuilder.InsertData(
  172. table: "Fields",
  173. columns: new[]
  174. {
  175. "Id",
  176. "CreatedAt",
  177. "UpdatedAt",
  178. "FormId",
  179. "PlaceholderId",
  180. "FieldPosition",
  181. "IsRequired",
  182. "IsEditable",
  183. "IsVisible",
  184. "FormAttributeId"
  185. },
  186. values: new object[]
  187. {
  188. 2,
  189. new DateTime(2019, 01, 30),
  190. new DateTime(2019, 01, 30),
  191. 1,
  192. 0,
  193. 1,
  194. true,
  195. true,
  196. true,
  197. 2
  198. }
  199. );
  200. migrationBuilder.InsertData(
  201. table: "Fields",
  202. columns: new[]
  203. {
  204. "Id",
  205. "CreatedAt",
  206. "UpdatedAt",
  207. "FormId",
  208. "PlaceholderId",
  209. "FieldPosition",
  210. "IsRequired",
  211. "IsEditable",
  212. "IsVisible",
  213. "FormAttributeId"
  214. },
  215. values: new object[]
  216. {
  217. 3,
  218. new DateTime(2019, 01, 30),
  219. new DateTime(2019, 01, 30),
  220. 2,
  221. 0,
  222. 0,
  223. true,
  224. true,
  225. true,
  226. 3
  227. }
  228. );
  229. migrationBuilder.InsertData(
  230. table: "Signatures",
  231. columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId" },
  232. values: new object[] { "1", new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 1 }
  233. );
  234. migrationBuilder.InsertData(
  235. table: "Signatures",
  236. columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId" },
  237. values: new object[] { "2", new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 2 }
  238. );
  239. #endregion
  240.  
  241. #region Insert Users
  242. migrationBuilder.InsertData(
  243. table: "Documents",
  244. columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId", "Text1", "Text2" },
  245. values: new object[] { 1, new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 1, "Admin First Name", "Admin Surname" }
  246. );
  247. //username: admin
  248. //password: admin
  249. migrationBuilder.InsertData(
  250. table: "AspNetUsers",
  251. columns: new[]
  252. {
  253. "Id",
  254. "DocumentId",
  255. "UserName",
  256. "NormalizedUserName",
  257. "EmailConfirmed",
  258. "PasswordHash",
  259. "SecurityStamp",
  260. "ConcurrencyStamp",
  261. "PhoneNumber",
  262. "PhoneNumberConfirmed",
  263. "TwoFactorEnabled",
  264. "LockoutEnd",
  265. "LockoutEnabled",
  266. "AccessFailedCount"
  267. },
  268. values: new object[]
  269. {
  270. "0bbc790f-cf94-48b3-ae77-3cc2e15a2a9b",
  271. 1,
  272. "admin",
  273. "ADMIN",
  274. false,
  275. "AQAAAAEAACcQAAAAEK9jfhMVsZdoouotsMTWpJjnY46fCL6cbWMhArAYy3ONrOQRbxHvDXl+Y8R+Hm1fQQ==",
  276. "P4EBTGKUNSAFJLYUUPOTPWPDLZWF6DJA",
  277. "342eea67-c72f-4332-9930-dd9c2662f89b",
  278. null,
  279. false,
  280. false,
  281. null,
  282. true,
  283. 0
  284. }
  285. );
  286. #endregion
  287.  
  288. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement