Advertisement
Guest User

Untitled

a guest
Jan 28th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.31 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. ); migrationBuilder.InsertData(
  67. table: "FormViews",
  68. columns: new[]
  69. {
  70. "Id",
  71. "CreatedAt",
  72. "UpdatedAt",
  73. "Name",
  74. "FormId"
  75. },
  76. values: new object[]
  77. {
  78. 1,
  79. new DateTime(2019, 01, 30),
  80. new DateTime(2019, 01, 30),
  81. "UsersView",
  82. 1
  83. }
  84. ); migrationBuilder.InsertData(
  85. table: "FormViews",
  86. columns: new[]
  87. {
  88. "Id",
  89. "CreatedAt",
  90. "UpdatedAt",
  91. "Name",
  92. "FormId"
  93. },
  94. values: new object[]
  95. {
  96. 2,
  97. new DateTime(2019, 01, 30),
  98. new DateTime(2019, 01, 30),
  99. "GroupsView",
  100. 2
  101. }
  102. );
  103. migrationBuilder.InsertData(
  104. table: "FormAttributes",
  105. columns: new[]
  106. {
  107. "Id",
  108. "CreatedAt",
  109. "UpdatedAt",
  110. "Name",
  111. "FormId",
  112. "AttributeTypeId",
  113. "Column",
  114. "Code"
  115. },
  116. values: new object[]
  117. {
  118. 1,
  119. new DateTime(2019, 01, 30),
  120. new DateTime(2019, 01, 30),
  121. "First Name",
  122. 1,
  123. 1,
  124. "Text1",
  125. "UserFirstName"
  126. }
  127. );
  128. migrationBuilder.InsertData(
  129. table: "FormAttributes",
  130. columns: new[]
  131. {
  132. "Id",
  133. "CreatedAt",
  134. "UpdatedAt",
  135. "Name",
  136. "FormId",
  137. "AttributeTypeId",
  138. "Column",
  139. "Code"
  140. },
  141. values: new object[]
  142. {
  143. 2,
  144. new DateTime(2019, 01, 30),
  145. new DateTime(2019, 01, 30),
  146. "Last Name",
  147. 1,
  148. 1,
  149. "Text2",
  150. "UserLastName"
  151. }
  152. );
  153. migrationBuilder.InsertData(
  154. table: "FormAttributes",
  155. columns: new[]
  156. {
  157. "Id",
  158. "CreatedAt",
  159. "UpdatedAt",
  160. "Name",
  161. "FormId",
  162. "AttributeTypeId",
  163. "Column",
  164. "Code"
  165. },
  166. values: new object[]
  167. {
  168. 3,
  169. new DateTime(2019, 01, 30),
  170. new DateTime(2019, 01, 30),
  171. "Name",
  172. 2,
  173. 1,
  174. "Text1",
  175. "GroupName"
  176. }
  177. );
  178. migrationBuilder.InsertData(
  179. table: "Fields",
  180. columns: new[]
  181. {
  182. "Id",
  183. "CreatedAt",
  184. "UpdatedAt",
  185. "FormViewId",
  186. "PlaceholderId",
  187. "FieldPosition",
  188. "IsRequired",
  189. "IsEditable",
  190. "IsVisible",
  191. "FormAttributeId"
  192. },
  193. values: new object[]
  194. {
  195. 1,
  196. new DateTime(2019, 01, 30),
  197. new DateTime(2019, 01, 30),
  198. 1,
  199. 0,
  200. 0,
  201. true,
  202. true,
  203. true,
  204. 1
  205. }
  206. );
  207. migrationBuilder.InsertData(
  208. table: "Fields",
  209. columns: new[]
  210. {
  211. "Id",
  212. "CreatedAt",
  213. "UpdatedAt",
  214. "FormViewId",
  215. "PlaceholderId",
  216. "FieldPosition",
  217. "IsRequired",
  218. "IsEditable",
  219. "IsVisible",
  220. "FormAttributeId"
  221. },
  222. values: new object[]
  223. {
  224. 2,
  225. new DateTime(2019, 01, 30),
  226. new DateTime(2019, 01, 30),
  227. 1,
  228. 0,
  229. 1,
  230. true,
  231. true,
  232. true,
  233. 2
  234. }
  235. );
  236. migrationBuilder.InsertData(
  237. table: "Fields",
  238. columns: new[]
  239. {
  240. "Id",
  241. "CreatedAt",
  242. "UpdatedAt",
  243. "FormViewId",
  244. "PlaceholderId",
  245. "FieldPosition",
  246. "IsRequired",
  247. "IsEditable",
  248. "IsVisible",
  249. "FormAttributeId"
  250. },
  251. values: new object[]
  252. {
  253. 3,
  254. new DateTime(2019, 01, 30),
  255. new DateTime(2019, 01, 30),
  256. 2,
  257. 0,
  258. 0,
  259. true,
  260. true,
  261. true,
  262. 3
  263. }
  264. );
  265. migrationBuilder.InsertData(
  266. table: "Signatures",
  267. columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId" },
  268. values: new object[] { "1", new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 1 }
  269. );
  270. migrationBuilder.InsertData(
  271. table: "Signatures",
  272. columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId" },
  273. values: new object[] { "2", new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 2 }
  274. );
  275. #endregion
  276.  
  277. #region Insert Users
  278. migrationBuilder.InsertData(
  279. table: "Documents",
  280. columns: new[] { "Id", "CreatedAt", "UpdatedAt", "FormId", "Text1", "Text2" },
  281. values: new object[] { 1, new DateTime(2019, 01, 30), new DateTime(2019, 01, 30), 1, "Admin First Name", "Admin Surname" }
  282. );
  283. //username: admin
  284. //password: admin
  285. migrationBuilder.InsertData(
  286. table: "AspNetUsers",
  287. columns: new[]
  288. {
  289. "Id",
  290. "DocumentId",
  291. "UserName",
  292. "NormalizedUserName",
  293. "EmailConfirmed",
  294. "PasswordHash",
  295. "SecurityStamp",
  296. "ConcurrencyStamp",
  297. "PhoneNumber",
  298. "PhoneNumberConfirmed",
  299. "TwoFactorEnabled",
  300. "LockoutEnd",
  301. "LockoutEnabled",
  302. "AccessFailedCount"
  303. },
  304. values: new object[]
  305. {
  306. "0bbc790f-cf94-48b3-ae77-3cc2e15a2a9b",
  307. 1,
  308. "admin",
  309. "ADMIN",
  310. false,
  311. "AQAAAAEAACcQAAAAEK9jfhMVsZdoouotsMTWpJjnY46fCL6cbWMhArAYy3ONrOQRbxHvDXl+Y8R+Hm1fQQ==",
  312. "P4EBTGKUNSAFJLYUUPOTPWPDLZWF6DJA",
  313. "342eea67-c72f-4332-9930-dd9c2662f89b",
  314. null,
  315. false,
  316. false,
  317. null,
  318. true,
  319. 0
  320. }
  321. );
  322. #endregion
  323.  
  324. #endregion
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement