Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 254.21 KB | None | 0 0
  1. namespace ClientApp.BLL.Migrations
  2. {
  3. using System;
  4. using System.Data.Entity.Migrations;
  5. using System.Linq;
  6. using Bnsights.CoreLib.Model;
  7. using ClientApp.BLL.Model;
  8. using Bnsights.CoreLib.Migrations;
  9. using System.Collections.Generic;
  10.  
  11. public partial class InitialCreate : Bnsights.CoreLib.Migrations.CustomMigration<ClientAppContext>
  12. {
  13. public override void Up()
  14. {
  15. CreateTable(
  16. "bbsf._BMigrationHistory",
  17. c => new
  18. {
  19. ID = c.Int(nullable: false),
  20. BBSF = c.String(),
  21. Client = c.String(),
  22. })
  23. .PrimaryKey(t => t.ID);
  24.  
  25. CreateTable(
  26. "dbo.Achievement",
  27. c => new
  28. {
  29. ID = c.Int(nullable: false, identity: true),
  30. NameEN = c.String(nullable: false, maxLength: 255),
  31. NameAR = c.String(nullable: false, maxLength: 255),
  32. BadgeID = c.Int(nullable: false),
  33. RewardTypeID = c.Int(nullable: false),
  34. RequiredAmount = c.Int(nullable: false),
  35. RewardingPoints = c.Int(nullable: false),
  36. DisplayOrder = c.Int(nullable: false),
  37. Created = c.DateTime(nullable: false),
  38. Modified = c.DateTime(nullable: false),
  39. CreatedBy = c.String(nullable: false, maxLength: 256),
  40. ModifiedBy = c.String(nullable: false, maxLength: 256),
  41. })
  42. .PrimaryKey(t => t.ID)
  43. .ForeignKey("dbo.Badge", t => t.BadgeID)
  44. .ForeignKey("bbsf.LookupItem", t => t.RewardTypeID)
  45. .Index(t => t.BadgeID)
  46. .Index(t => t.RewardTypeID);
  47.  
  48. CreateTable(
  49. "dbo.Badge",
  50. c => new
  51. {
  52. ID = c.Int(nullable: false, identity: true),
  53. TitleEN = c.String(nullable: false, maxLength: 255),
  54. TitleAR = c.String(nullable: false, maxLength: 255),
  55. DescriptionEN = c.String(),
  56. DescriptionAR = c.String(),
  57. ImageID = c.Guid(nullable: false),
  58. Visible = c.Boolean(nullable: false),
  59. DisplayOrder = c.Int(nullable: false),
  60. Created = c.DateTime(nullable: false),
  61. Modified = c.DateTime(nullable: false),
  62. CreatedBy = c.String(nullable: false, maxLength: 256),
  63. ModifiedBy = c.String(nullable: false, maxLength: 256),
  64. })
  65. .PrimaryKey(t => t.ID);
  66.  
  67. CreateTable(
  68. "bbsf.LookupItem",
  69. c => new
  70. {
  71. ID = c.Int(nullable: false),
  72. NameEN = c.String(nullable: false, maxLength: 100),
  73. NameAR = c.String(nullable: false, maxLength: 100),
  74. Manageable = c.Boolean(nullable: false),
  75. DisplayOrder = c.Int(nullable: false),
  76. Value = c.String(maxLength: 500),
  77. SysName = c.String(nullable: false, maxLength: 100),
  78. LookupID = c.Int(nullable: false),
  79. Created = c.DateTime(nullable: false),
  80. Modified = c.DateTime(nullable: false),
  81. CreatedBy = c.String(nullable: false, maxLength: 256),
  82. ModifiedBy = c.String(nullable: false, maxLength: 256),
  83. Discriminator = c.String(nullable: false, maxLength: 128),
  84. })
  85. .PrimaryKey(t => t.ID)
  86. .ForeignKey("bbsf.Lookup", t => t.LookupID)
  87. .Index(t => t.SysName, unique: true)
  88. .Index(t => t.LookupID);
  89.  
  90. CreateTable(
  91. "dbo.IdeaFieldValue_Relation",
  92. c => new
  93. {
  94. ID = c.Int(nullable: false, identity: true),
  95. IdeaFieldValueID = c.Int(nullable: false),
  96. ChallengeID = c.Int(),
  97. GoalID = c.Int(),
  98. AreaOfFocusID = c.Int(),
  99. InnvoationLabID = c.Int(),
  100. LookupItemID = c.Int(),
  101. Created = c.DateTime(nullable: false),
  102. Modified = c.DateTime(nullable: false),
  103. CreatedBy = c.String(nullable: false, maxLength: 256),
  104. ModifiedBy = c.String(nullable: false, maxLength: 256),
  105. })
  106. .PrimaryKey(t => t.ID)
  107. .ForeignKey("dbo.AreaOfFocus", t => t.AreaOfFocusID)
  108. .ForeignKey("dbo.Challenge", t => t.ChallengeID)
  109. .ForeignKey("dbo.Goal", t => t.GoalID)
  110. .ForeignKey("dbo.IdeaFieldValue", t => t.IdeaFieldValueID)
  111. .ForeignKey("dbo.InnovationLab", t => t.InnvoationLabID)
  112. .ForeignKey("bbsf.LookupItem", t => t.LookupItemID)
  113. .Index(t => t.IdeaFieldValueID)
  114. .Index(t => t.ChallengeID)
  115. .Index(t => t.GoalID)
  116. .Index(t => t.AreaOfFocusID)
  117. .Index(t => t.InnvoationLabID)
  118. .Index(t => t.LookupItemID);
  119.  
  120. CreateTable(
  121. "dbo.AreaOfFocus",
  122. c => new
  123. {
  124. ID = c.Int(nullable: false, identity: true),
  125. TitleEN = c.String(nullable: false, maxLength: 255),
  126. TitleAR = c.String(nullable: false, maxLength: 255),
  127. DescriptionEN = c.String(),
  128. DescriptionAR = c.String(),
  129. ImageID = c.Guid(nullable: false),
  130. TypeID = c.Int(nullable: false),
  131. Visible = c.Boolean(nullable: false),
  132. DisplayOrder = c.Int(nullable: false),
  133. Created = c.DateTime(nullable: false),
  134. Modified = c.DateTime(nullable: false),
  135. CreatedBy = c.String(nullable: false, maxLength: 256),
  136. ModifiedBy = c.String(nullable: false, maxLength: 256),
  137. IsDeleted = c.Boolean(nullable: false),
  138. })
  139. .PrimaryKey(t => t.ID)
  140. .ForeignKey("bbsf.LookupItem", t => t.TypeID)
  141. .Index(t => t.TypeID);
  142.  
  143. CreateTable(
  144. "dbo.MindMap",
  145. c => new
  146. {
  147. ID = c.Int(nullable: false, identity: true),
  148. TitleEN = c.String(nullable: false, maxLength: 255),
  149. TitleAR = c.String(nullable: false, maxLength: 255),
  150. DescriptionEN = c.String(),
  151. DescriptionAR = c.String(),
  152. JsonString = c.String(),
  153. ProjectID = c.Int(),
  154. IdeaID = c.Int(),
  155. GoalID = c.Int(),
  156. ChallengeID = c.Int(),
  157. FocuseID = c.Int(),
  158. LabID = c.Int(),
  159. UserID = c.Int(nullable: false),
  160. Created = c.DateTime(nullable: false),
  161. Modified = c.DateTime(nullable: false),
  162. CreatedBy = c.String(nullable: false, maxLength: 256),
  163. ModifiedBy = c.String(nullable: false, maxLength: 256),
  164. IsDeleted = c.Boolean(nullable: false),
  165. })
  166. .PrimaryKey(t => t.ID)
  167. .ForeignKey("dbo.AreaOfFocus", t => t.FocuseID)
  168. .ForeignKey("dbo.Challenge", t => t.ChallengeID)
  169. .ForeignKey("dbo.Goal", t => t.GoalID)
  170. .ForeignKey("dbo.Idea", t => t.IdeaID)
  171. .ForeignKey("dbo.InnovationLab", t => t.LabID)
  172. .ForeignKey("bbsf.User", t => t.UserID)
  173. .ForeignKey("dbo.Project", t => t.ProjectID)
  174. .Index(t => t.ProjectID)
  175. .Index(t => t.IdeaID)
  176. .Index(t => t.GoalID)
  177. .Index(t => t.ChallengeID)
  178. .Index(t => t.FocuseID)
  179. .Index(t => t.LabID)
  180. .Index(t => t.UserID);
  181.  
  182. CreateTable(
  183. "dbo.Challenge",
  184. c => new
  185. {
  186. ID = c.Int(nullable: false, identity: true),
  187. TitleEN = c.String(nullable: false, maxLength: 255),
  188. TitleAR = c.String(nullable: false, maxLength: 255),
  189. DescriptionEN = c.String(),
  190. DescriptionAR = c.String(),
  191. StartDate = c.DateTime(nullable: false),
  192. EndDate = c.DateTime(nullable: false),
  193. Visible = c.Boolean(nullable: false),
  194. DisplayOrder = c.Int(nullable: false),
  195. FileCorrelationID = c.Guid(),
  196. Created = c.DateTime(nullable: false),
  197. Modified = c.DateTime(nullable: false),
  198. CreatedBy = c.String(nullable: false, maxLength: 256),
  199. ModifiedBy = c.String(nullable: false, maxLength: 256),
  200. ViewsCount = c.Int(nullable: false),
  201. IsDeleted = c.Boolean(nullable: false),
  202. })
  203. .PrimaryKey(t => t.ID);
  204.  
  205. CreateTable(
  206. "dbo.Goal",
  207. c => new
  208. {
  209. ID = c.Int(nullable: false, identity: true),
  210. TitleEN = c.String(nullable: false, maxLength: 255),
  211. TitleAR = c.String(nullable: false, maxLength: 255),
  212. DescriptionEN = c.String(),
  213. DescriptionAR = c.String(),
  214. Visible = c.Boolean(nullable: false),
  215. DisplayOrder = c.Int(nullable: false),
  216. Created = c.DateTime(nullable: false),
  217. Modified = c.DateTime(nullable: false),
  218. CreatedBy = c.String(nullable: false, maxLength: 256),
  219. ModifiedBy = c.String(nullable: false, maxLength: 256),
  220. IsDeleted = c.Boolean(nullable: false),
  221. })
  222. .PrimaryKey(t => t.ID);
  223.  
  224. CreateTable(
  225. "dbo.Idea",
  226. c => new
  227. {
  228. ID = c.Int(nullable: false, identity: true),
  229. NameEN = c.String(nullable: false, maxLength: 255),
  230. NameAR = c.String(nullable: false, maxLength: 255),
  231. DescriptionEN = c.String(),
  232. DescriptionAR = c.String(),
  233. ViewsCount = c.Int(nullable: false),
  234. OwnerID = c.Int(nullable: false),
  235. StatusItemID = c.Int(nullable: false),
  236. WFInstance = c.Int(),
  237. EvaluationCriteriaID = c.Int(),
  238. IsDeleted = c.Boolean(nullable: false),
  239. Created = c.DateTime(nullable: false),
  240. Modified = c.DateTime(nullable: false),
  241. CreatedBy = c.String(nullable: false, maxLength: 256),
  242. ModifiedBy = c.String(nullable: false, maxLength: 256),
  243. })
  244. .PrimaryKey(t => t.ID)
  245. .ForeignKey("dbo.EvaluationCriteria", t => t.EvaluationCriteriaID)
  246. .ForeignKey("bbsf.LookupItem", t => t.StatusItemID)
  247. .ForeignKey("bbsf.User", t => t.OwnerID)
  248. .Index(t => t.OwnerID)
  249. .Index(t => t.StatusItemID)
  250. .Index(t => t.EvaluationCriteriaID);
  251.  
  252. CreateTable(
  253. "dbo.IdeaComment",
  254. c => new
  255. {
  256. ID = c.Int(nullable: false, identity: true),
  257. IdeaID = c.Int(nullable: false),
  258. UserID = c.Int(nullable: false),
  259. ParentCommentID = c.Int(),
  260. Value = c.String(),
  261. Created = c.DateTime(nullable: false),
  262. Modified = c.DateTime(nullable: false),
  263. CreatedBy = c.String(nullable: false, maxLength: 256),
  264. ModifiedBy = c.String(nullable: false, maxLength: 256),
  265. })
  266. .PrimaryKey(t => t.ID)
  267. .ForeignKey("dbo.Idea", t => t.IdeaID)
  268. .ForeignKey("dbo.IdeaComment", t => t.ParentCommentID)
  269. .ForeignKey("bbsf.User", t => t.UserID)
  270. .Index(t => t.IdeaID)
  271. .Index(t => t.UserID)
  272. .Index(t => t.ParentCommentID);
  273.  
  274. CreateTable(
  275. "dbo.IdeaCommentReport",
  276. c => new
  277. {
  278. ID = c.Int(nullable: false, identity: true),
  279. ReportingComment = c.String(),
  280. IsDeleted = c.Boolean(nullable: false),
  281. CreatedBy = c.String(nullable: false, maxLength: 256),
  282. ModifiedBy = c.String(nullable: false, maxLength: 256),
  283. Created = c.DateTime(nullable: false),
  284. Modified = c.DateTime(nullable: false),
  285. IdeaCommentID = c.Int(nullable: false),
  286. UserID = c.Int(nullable: false),
  287. })
  288. .PrimaryKey(t => t.ID)
  289. .ForeignKey("dbo.IdeaComment", t => t.IdeaCommentID)
  290. .ForeignKey("bbsf.User", t => t.UserID)
  291. .Index(t => t.IdeaCommentID)
  292. .Index(t => t.UserID);
  293.  
  294. CreateTable(
  295. "bbsf.User",
  296. c => new
  297. {
  298. ID = c.Int(nullable: false, identity: true),
  299. OrganizationID = c.Int(nullable: false),
  300. Username = c.String(nullable: false, maxLength: 256, unicode: false),
  301. SamAccount = c.String(maxLength: 256, unicode: false),
  302. LanguageKey = c.String(maxLength: 2, unicode: false),
  303. OriginalImageFileID = c.Int(),
  304. LargeImageFileID = c.Int(),
  305. SmallImageFileID = c.Int(),
  306. PermissionSID = c.String(maxLength: 2000, unicode: false),
  307. PermissionSetSID = c.String(maxLength: 2000, unicode: false),
  308. NameEN = c.String(maxLength: 100),
  309. NameAR = c.String(maxLength: 100),
  310. TitleEN = c.String(maxLength: 100),
  311. TitleAR = c.String(maxLength: 100),
  312. GenderItemID = c.Int(),
  313. Created = c.DateTime(nullable: false),
  314. Modified = c.DateTime(nullable: false),
  315. CreatedBy = c.String(nullable: false, maxLength: 256),
  316. ModifiedBy = c.String(nullable: false, maxLength: 256),
  317. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  318. IsOnline = c.Boolean(nullable: false),
  319. License = c.Binary(),
  320. ChatRoom_ID = c.Int(),
  321. })
  322. .PrimaryKey(t => t.ID)
  323. .ForeignKey("bbsf.File", t => t.LargeImageFileID)
  324. .ForeignKey("bbsf.Organization", t => t.OrganizationID)
  325. .ForeignKey("bbsf.File", t => t.OriginalImageFileID)
  326. .ForeignKey("bbsf.ChatRoom", t => t.ChatRoom_ID)
  327. .ForeignKey("bbsf.File", t => t.SmallImageFileID)
  328. .Index(t => t.OrganizationID)
  329. .Index(t => t.Username, unique: true)
  330. .Index(t => t.OriginalImageFileID)
  331. .Index(t => t.LargeImageFileID)
  332. .Index(t => t.SmallImageFileID)
  333. .Index(t => t.ChatRoom_ID);
  334.  
  335. CreateTable(
  336. "bbsf.UserConnection",
  337. c => new
  338. {
  339. ID = c.Int(nullable: false, identity: true),
  340. UserID = c.Int(nullable: false),
  341. ConnectionID = c.String(),
  342. Agent = c.String(),
  343. IPAddress = c.String(),
  344. })
  345. .PrimaryKey(t => t.ID)
  346. .ForeignKey("bbsf.User", t => t.UserID)
  347. .Index(t => t.UserID);
  348.  
  349. CreateTable(
  350. "bbsf.File",
  351. c => new
  352. {
  353. ID = c.Int(nullable: false, identity: true),
  354. ID_GUID = c.Guid(nullable: false),
  355. CorrelationID = c.Guid(),
  356. Name = c.String(nullable: false, maxLength: 150),
  357. ExtraParams = c.String(maxLength: 500),
  358. MimeType = c.String(nullable: false, maxLength: 127),
  359. ProviderName = c.String(nullable: false, maxLength: 100),
  360. SizeMB = c.Decimal(nullable: false, precision: 6, scale: 3),
  361. Created = c.DateTime(nullable: false),
  362. Modified = c.DateTime(nullable: false),
  363. CreatedBy = c.String(nullable: false, maxLength: 256),
  364. ModifiedBy = c.String(nullable: false, maxLength: 256),
  365. })
  366. .PrimaryKey(t => t.ID)
  367. .Index(t => t.ID_GUID, unique: true);
  368.  
  369. CreateTable(
  370. "bbsf.Organization",
  371. c => new
  372. {
  373. ID = c.Int(nullable: false, identity: true),
  374. NameEN = c.String(nullable: false, maxLength: 100),
  375. NameAR = c.String(nullable: false, maxLength: 100),
  376. LogoFileID = c.Int(),
  377. DefaultLanguage = c.String(nullable: false, maxLength: 2),
  378. DefaultTimeZone = c.String(nullable: false, maxLength: 50),
  379. License = c.Binary(),
  380. DatabaseConnectionString = c.String(maxLength: 1024),
  381. Created = c.DateTime(nullable: false),
  382. Modified = c.DateTime(nullable: false),
  383. CreatedBy = c.String(nullable: false, maxLength: 256),
  384. ModifiedBy = c.String(nullable: false, maxLength: 256),
  385. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  386. })
  387. .PrimaryKey(t => t.ID);
  388.  
  389. CreateTable(
  390. "bbsf.Permission",
  391. c => new
  392. {
  393. ID = c.Int(nullable: false, identity: true),
  394. NameEN = c.String(maxLength: 100),
  395. NameAR = c.String(maxLength: 100),
  396. Created = c.DateTime(nullable: false),
  397. Modified = c.DateTime(nullable: false),
  398. CreatedBy = c.String(nullable: false, maxLength: 256),
  399. ModifiedBy = c.String(nullable: false, maxLength: 256),
  400. SysName = c.String(nullable: false, maxLength: 100),
  401. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  402. OrganizationID = c.Int(nullable: false),
  403. })
  404. .PrimaryKey(t => t.ID)
  405. .ForeignKey("bbsf.Organization", t => t.OrganizationID)
  406. .Index(t => t.SysName, unique: true)
  407. .Index(t => t.OrganizationID);
  408.  
  409. CreateTable(
  410. "bbsf.PermissionSet",
  411. c => new
  412. {
  413. ID = c.Int(nullable: false, identity: true),
  414. NameEN = c.String(maxLength: 100),
  415. NameAR = c.String(maxLength: 100),
  416. Created = c.DateTime(nullable: false),
  417. Modified = c.DateTime(nullable: false),
  418. CreatedBy = c.String(nullable: false, maxLength: 256),
  419. ModifiedBy = c.String(nullable: false, maxLength: 256),
  420. ActiveDirectoryGroup = c.String(maxLength: 64, unicode: false),
  421. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  422. SysName = c.String(nullable: false, maxLength: 100),
  423. OrganizationID = c.Int(nullable: false),
  424. })
  425. .PrimaryKey(t => t.ID)
  426. .ForeignKey("bbsf.Organization", t => t.OrganizationID)
  427. .Index(t => t.SysName, unique: true)
  428. .Index(t => t.OrganizationID);
  429.  
  430. CreateTable(
  431. "bbsf.Provider",
  432. c => new
  433. {
  434. ID = c.Int(nullable: false, identity: true),
  435. ProviderTypeItemID = c.Int(nullable: false),
  436. Name = c.String(maxLength: 100),
  437. Description = c.String(maxLength: 250),
  438. TypeFullName = c.String(nullable: false, maxLength: 256),
  439. IsDefault = c.Boolean(nullable: false),
  440. Created = c.DateTime(nullable: false),
  441. Modified = c.DateTime(nullable: false),
  442. CreatedBy = c.String(nullable: false, maxLength: 256),
  443. ModifiedBy = c.String(nullable: false, maxLength: 256),
  444. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  445. OrganizationID = c.Int(nullable: false),
  446. })
  447. .PrimaryKey(t => t.ID)
  448. .ForeignKey("bbsf.LookupItem", t => t.ProviderTypeItemID)
  449. .ForeignKey("bbsf.Organization", t => t.OrganizationID)
  450. .Index(t => t.ProviderTypeItemID)
  451. .Index(t => t.Name, unique: true)
  452. .Index(t => t.OrganizationID);
  453.  
  454. CreateTable(
  455. "bbsf.Lookup",
  456. c => new
  457. {
  458. ID = c.Int(nullable: false),
  459. NameEN = c.String(nullable: false, maxLength: 100),
  460. NameAR = c.String(nullable: false, maxLength: 100),
  461. DescriptionEN = c.String(maxLength: 250),
  462. DescriptionAR = c.String(maxLength: 250),
  463. Manageable = c.Boolean(nullable: false),
  464. LookupGroupID = c.Int(),
  465. SysName = c.String(nullable: false, maxLength: 100),
  466. Created = c.DateTime(nullable: false),
  467. Modified = c.DateTime(nullable: false),
  468. CreatedBy = c.String(nullable: false, maxLength: 256),
  469. ModifiedBy = c.String(nullable: false, maxLength: 256),
  470. })
  471. .PrimaryKey(t => t.ID)
  472. .ForeignKey("bbsf.LookupGroup", t => t.LookupGroupID)
  473. .Index(t => t.LookupGroupID)
  474. .Index(t => t.SysName, unique: true);
  475.  
  476. CreateTable(
  477. "bbsf.LookupGroup",
  478. c => new
  479. {
  480. ID = c.Int(nullable: false, identity: true),
  481. NameEN = c.String(nullable: false, maxLength: 100),
  482. NameAR = c.String(nullable: false, maxLength: 100),
  483. Created = c.DateTime(nullable: false),
  484. Modified = c.DateTime(nullable: false),
  485. CreatedBy = c.String(nullable: false, maxLength: 256),
  486. ModifiedBy = c.String(nullable: false, maxLength: 256),
  487. })
  488. .PrimaryKey(t => t.ID);
  489.  
  490. CreateTable(
  491. "bbsf.Template",
  492. c => new
  493. {
  494. ID = c.Int(nullable: false, identity: true),
  495. CategoryItemID = c.Int(),
  496. NameEN = c.String(maxLength: 100),
  497. NameAR = c.String(maxLength: 100),
  498. DescriptionEN = c.String(maxLength: 250),
  499. DescriptionAR = c.String(maxLength: 250),
  500. IsEmail = c.Boolean(nullable: false),
  501. IsSms = c.Boolean(nullable: false),
  502. EnableIntensiveLogging = c.Boolean(nullable: false),
  503. Created = c.DateTime(nullable: false),
  504. Modified = c.DateTime(nullable: false),
  505. CreatedBy = c.String(nullable: false, maxLength: 256),
  506. ModifiedBy = c.String(nullable: false, maxLength: 256),
  507. SysName = c.String(nullable: false, maxLength: 100),
  508. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  509. OrganizationID = c.Int(nullable: false),
  510. })
  511. .PrimaryKey(t => t.ID)
  512. .ForeignKey("bbsf.LookupItem", t => t.CategoryItemID)
  513. .ForeignKey("bbsf.Organization", t => t.OrganizationID)
  514. .Index(t => t.CategoryItemID)
  515. .Index(t => t.SysName, unique: true)
  516. .Index(t => t.OrganizationID);
  517.  
  518. CreateTable(
  519. "bbsf.TemplateInfo",
  520. c => new
  521. {
  522. ID = c.Int(nullable: false),
  523. Created = c.DateTime(nullable: false),
  524. Modified = c.DateTime(nullable: false),
  525. CreatedBy = c.String(nullable: false, maxLength: 256),
  526. ModifiedBy = c.String(nullable: false, maxLength: 256),
  527. EmailSubjectEN = c.String(maxLength: 70),
  528. EmailSubjectAR = c.String(maxLength: 70),
  529. EmailHtmlBodyTagAttributesEN = c.String(maxLength: 100),
  530. EmailHtmlBodyTagAttributesAR = c.String(maxLength: 100),
  531. EmailBodyEN = c.String(),
  532. EmailBodyAR = c.String(),
  533. LanguageModeItemID = c.Int(nullable: false),
  534. SmsEN = c.String(),
  535. SmsAR = c.String(),
  536. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  537. TemplateID = c.Int(nullable: false),
  538. EmailHeaderAndFooterTemplateID = c.Int(),
  539. })
  540. .PrimaryKey(t => t.ID)
  541. .ForeignKey("bbsf.EmailHeaderAndFooterTemplate", t => t.EmailHeaderAndFooterTemplateID)
  542. .ForeignKey("bbsf.LookupItem", t => t.LanguageModeItemID)
  543. .ForeignKey("bbsf.Template", t => t.TemplateID)
  544. .Index(t => t.LanguageModeItemID)
  545. .Index(t => t.TemplateID)
  546. .Index(t => t.EmailHeaderAndFooterTemplateID);
  547.  
  548. CreateTable(
  549. "bbsf.EmailHeaderAndFooterTemplate",
  550. c => new
  551. {
  552. ID = c.Int(nullable: false, identity: true),
  553. NameEN = c.String(nullable: false, maxLength: 100),
  554. NameAR = c.String(nullable: false, maxLength: 100),
  555. HeaderEN = c.String(),
  556. HeaderAR = c.String(),
  557. FooterEN = c.String(),
  558. FooterAR = c.String(),
  559. Created = c.DateTime(nullable: false),
  560. Modified = c.DateTime(nullable: false),
  561. CreatedBy = c.String(nullable: false, maxLength: 256),
  562. ModifiedBy = c.String(nullable: false, maxLength: 256),
  563. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  564. })
  565. .PrimaryKey(t => t.ID);
  566.  
  567. CreateTable(
  568. "bbsf.ProviderAttribute",
  569. c => new
  570. {
  571. ID = c.Int(nullable: false, identity: true),
  572. ProviderId = c.Int(nullable: false),
  573. Name = c.String(nullable: false, maxLength: 100),
  574. IsEncrypted = c.Boolean(nullable: false),
  575. Value = c.String(maxLength: 100),
  576. ValueEncrypted = c.Binary(),
  577. Created = c.DateTime(nullable: false),
  578. Modified = c.DateTime(nullable: false),
  579. CreatedBy = c.String(nullable: false, maxLength: 256),
  580. ModifiedBy = c.String(nullable: false, maxLength: 256),
  581. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  582. })
  583. .PrimaryKey(t => t.ID)
  584. .ForeignKey("bbsf.Provider", t => t.ProviderId)
  585. .Index(t => t.ProviderId);
  586.  
  587. CreateTable(
  588. "bbsf.ChatMessage",
  589. c => new
  590. {
  591. ID = c.Int(nullable: false, identity: true),
  592. MessageText = c.String(nullable: false, maxLength: 1000),
  593. RoomID = c.Int(nullable: false),
  594. TypeID = c.Int(nullable: false),
  595. MessageTypeItemID = c.Int(nullable: false),
  596. OwnerID = c.Int(nullable: false),
  597. Created = c.DateTime(nullable: false),
  598. Modified = c.DateTime(nullable: false),
  599. CreatedBy = c.String(nullable: false, maxLength: 256),
  600. ModifiedBy = c.String(nullable: false, maxLength: 256),
  601. })
  602. .PrimaryKey(t => t.ID)
  603. .ForeignKey("bbsf.LookupItem", t => t.MessageTypeItemID)
  604. .ForeignKey("bbsf.User", t => t.OwnerID)
  605. .ForeignKey("bbsf.ChatRoom", t => t.RoomID)
  606. .Index(t => t.RoomID)
  607. .Index(t => t.MessageTypeItemID)
  608. .Index(t => t.OwnerID);
  609.  
  610. CreateTable(
  611. "bbsf.ChatMessageAttachment",
  612. c => new
  613. {
  614. ID = c.Int(nullable: false, identity: true),
  615. AttachmentTypeItemID = c.Int(nullable: false),
  616. MessageID = c.Int(nullable: false),
  617. Created = c.DateTime(nullable: false),
  618. Modified = c.DateTime(nullable: false),
  619. CreatedBy = c.String(nullable: false, maxLength: 256),
  620. ModifiedBy = c.String(nullable: false, maxLength: 256),
  621. ChatMessage_ID = c.Int(),
  622. })
  623. .PrimaryKey(t => t.ID)
  624. .ForeignKey("bbsf.LookupItem", t => t.AttachmentTypeItemID)
  625. .ForeignKey("bbsf.ChatMessage", t => t.ChatMessage_ID)
  626. .Index(t => t.AttachmentTypeItemID)
  627. .Index(t => t.ChatMessage_ID);
  628.  
  629. CreateTable(
  630. "bbsf.ChatRoom",
  631. c => new
  632. {
  633. ID = c.Int(nullable: false, identity: true),
  634. Title = c.String(nullable: false, maxLength: 255),
  635. OwnerID = c.Int(nullable: false),
  636. RoomTypeItemID = c.Int(nullable: false),
  637. Created = c.DateTime(nullable: false),
  638. Modified = c.DateTime(nullable: false),
  639. CreatedBy = c.String(nullable: false, maxLength: 256),
  640. ModifiedBy = c.String(nullable: false, maxLength: 256),
  641. })
  642. .PrimaryKey(t => t.ID)
  643. .ForeignKey("bbsf.LookupItem", t => t.RoomTypeItemID)
  644. .Index(t => t.RoomTypeItemID);
  645.  
  646. CreateTable(
  647. "bbsf.ChatUnreadMessage",
  648. c => new
  649. {
  650. ID = c.Int(nullable: false, identity: true),
  651. RoomID = c.Int(nullable: false),
  652. UserID = c.Int(nullable: false),
  653. MessagesCount = c.Int(nullable: false),
  654. Created = c.DateTime(nullable: false),
  655. Modified = c.DateTime(nullable: false),
  656. CreatedBy = c.String(nullable: false, maxLength: 256),
  657. ModifiedBy = c.String(nullable: false, maxLength: 256),
  658. })
  659. .PrimaryKey(t => t.ID)
  660. .ForeignKey("bbsf.ChatRoom", t => t.RoomID)
  661. .ForeignKey("bbsf.User", t => t.UserID)
  662. .Index(t => t.RoomID)
  663. .Index(t => t.UserID);
  664.  
  665. CreateTable(
  666. "bbsf.UserInfo",
  667. c => new
  668. {
  669. ID = c.Int(nullable: false),
  670. UserID = c.Int(nullable: false),
  671. Mobile = c.String(maxLength: 15, unicode: false),
  672. Email = c.String(nullable: false, maxLength: 256, unicode: false),
  673. Password = c.String(nullable: false, maxLength: 75, unicode: false),
  674. Token = c.String(nullable: false, maxLength: 25),
  675. Token_IsCompleted = c.Boolean(nullable: false),
  676. Token_CanExpire = c.Boolean(nullable: false),
  677. IsActive = c.Boolean(nullable: false),
  678. CanLogin = c.Boolean(nullable: false),
  679. IsLicensed = c.Boolean(nullable: false),
  680. FailedLoginCount = c.Short(nullable: false),
  681. FailedLoginAttempt = c.DateTime(),
  682. LastLogin = c.DateTime(),
  683. LastPasswordChangeDate = c.DateTime(),
  684. ActivationDate = c.DateTime(),
  685. DeactivationDate = c.DateTime(),
  686. RowVersion = c.Binary(nullable: false, fixedLength: true, timestamp: true, storeType: "rowversion"),
  687. Created = c.DateTime(nullable: false),
  688. Modified = c.DateTime(nullable: false),
  689. CreatedBy = c.String(nullable: false, maxLength: 256),
  690. ModifiedBy = c.String(nullable: false, maxLength: 256),
  691. })
  692. .PrimaryKey(t => t.ID)
  693. .ForeignKey("bbsf.User", t => t.UserID)
  694. .Index(t => t.UserID)
  695. .Index(t => t.Token, unique: true);
  696.  
  697. CreateTable(
  698. "dbo.IdeaInteraction",
  699. c => new
  700. {
  701. ID = c.Int(nullable: false, identity: true),
  702. IdeaID = c.Int(nullable: false),
  703. InteractionTypeItemID = c.Int(nullable: false),
  704. UserID = c.Int(nullable: false),
  705. CommentID = c.Int(),
  706. Created = c.DateTime(nullable: false),
  707. Modified = c.DateTime(nullable: false),
  708. CreatedBy = c.String(nullable: false, maxLength: 256),
  709. ModifiedBy = c.String(nullable: false, maxLength: 256),
  710. })
  711. .PrimaryKey(t => t.ID)
  712. .ForeignKey("dbo.IdeaComment", t => t.CommentID)
  713. .ForeignKey("dbo.Idea", t => t.IdeaID)
  714. .ForeignKey("bbsf.LookupItem", t => t.InteractionTypeItemID)
  715. .ForeignKey("bbsf.User", t => t.UserID)
  716. .Index(t => t.IdeaID)
  717. .Index(t => t.InteractionTypeItemID)
  718. .Index(t => t.UserID)
  719. .Index(t => t.CommentID);
  720.  
  721. CreateTable(
  722. "dbo.EvaluationCriteria",
  723. c => new
  724. {
  725. ID = c.Int(nullable: false, identity: true),
  726. NameEN = c.String(nullable: false, maxLength: 255),
  727. NameAR = c.String(nullable: false, maxLength: 255),
  728. DescriptionEN = c.String(),
  729. DescriptionAR = c.String(),
  730. IsActive = c.Boolean(nullable: false),
  731. Visible = c.Boolean(nullable: false),
  732. DisplayOrder = c.Int(nullable: false),
  733. Created = c.DateTime(nullable: false),
  734. Modified = c.DateTime(nullable: false),
  735. CreatedBy = c.String(nullable: false, maxLength: 256),
  736. ModifiedBy = c.String(nullable: false, maxLength: 256),
  737. })
  738. .PrimaryKey(t => t.ID);
  739.  
  740. CreateTable(
  741. "dbo.Criterion",
  742. c => new
  743. {
  744. ID = c.Int(nullable: false, identity: true),
  745. NameEN = c.String(nullable: false, maxLength: 255),
  746. NameAR = c.String(),
  747. DescriptionEN = c.String(),
  748. DescriptionAR = c.String(nullable: false, maxLength: 255),
  749. Weight = c.Int(nullable: false),
  750. EvaluationCriteriaID = c.Int(nullable: false),
  751. DisplayOrder = c.Int(nullable: false),
  752. Created = c.DateTime(nullable: false),
  753. Modified = c.DateTime(nullable: false),
  754. CreatedBy = c.String(nullable: false, maxLength: 256),
  755. ModifiedBy = c.String(nullable: false, maxLength: 256),
  756. })
  757. .PrimaryKey(t => t.ID)
  758. .ForeignKey("dbo.EvaluationCriteria", t => t.EvaluationCriteriaID)
  759. .Index(t => t.EvaluationCriteriaID);
  760.  
  761. CreateTable(
  762. "dbo.Idea_CriterionScore",
  763. c => new
  764. {
  765. IdeaID = c.Int(nullable: false),
  766. CriterionID = c.Int(nullable: false),
  767. UserID = c.Int(nullable: false),
  768. Score = c.Decimal(nullable: false, precision: 18, scale: 2),
  769. })
  770. .PrimaryKey(t => new { t.IdeaID, t.CriterionID, t.UserID })
  771. .ForeignKey("dbo.Criterion", t => t.CriterionID)
  772. .ForeignKey("dbo.Idea", t => t.IdeaID)
  773. .ForeignKey("bbsf.User", t => t.UserID)
  774. .Index(t => t.IdeaID)
  775. .Index(t => t.CriterionID)
  776. .Index(t => t.UserID);
  777.  
  778. CreateTable(
  779. "dbo.EvaluationPanel",
  780. c => new
  781. {
  782. ID = c.Int(nullable: false, identity: true),
  783. NameEN = c.String(nullable: false, maxLength: 255),
  784. NameAR = c.String(nullable: false, maxLength: 255),
  785. DescriptionEN = c.String(),
  786. DescriptionAR = c.String(),
  787. IsActive = c.Boolean(nullable: false),
  788. Visible = c.Boolean(nullable: false),
  789. DisplayOrder = c.Int(nullable: false),
  790. EvaluationCriteriaID = c.Int(nullable: false),
  791. Created = c.DateTime(nullable: false),
  792. Modified = c.DateTime(nullable: false),
  793. CreatedBy = c.String(nullable: false, maxLength: 256),
  794. ModifiedBy = c.String(nullable: false, maxLength: 256),
  795. })
  796. .PrimaryKey(t => t.ID)
  797. .ForeignKey("dbo.EvaluationCriteria", t => t.EvaluationCriteriaID)
  798. .Index(t => t.EvaluationCriteriaID);
  799.  
  800. CreateTable(
  801. "dbo.EvaluationPanel_User",
  802. c => new
  803. {
  804. ID = c.Int(nullable: false, identity: true),
  805. UserID = c.Int(nullable: false),
  806. EvaluationPanelID = c.Int(nullable: false),
  807. Created = c.DateTime(nullable: false),
  808. Modified = c.DateTime(nullable: false),
  809. CreatedBy = c.String(nullable: false, maxLength: 256),
  810. ModifiedBy = c.String(nullable: false, maxLength: 256),
  811. })
  812. .PrimaryKey(t => t.ID)
  813. .ForeignKey("dbo.EvaluationPanel", t => t.EvaluationPanelID)
  814. .ForeignKey("bbsf.User", t => t.UserID)
  815. .Index(t => t.UserID)
  816. .Index(t => t.EvaluationPanelID);
  817.  
  818. CreateTable(
  819. "dbo.Idea_Contributor",
  820. c => new
  821. {
  822. ID = c.Int(nullable: false, identity: true),
  823. IdeaID = c.Int(nullable: false),
  824. UserID = c.Int(nullable: false),
  825. ContributorTypeItemID = c.Int(nullable: false),
  826. Created = c.DateTime(nullable: false),
  827. Modified = c.DateTime(nullable: false),
  828. CreatedBy = c.String(nullable: false, maxLength: 256),
  829. ModifiedBy = c.String(nullable: false, maxLength: 256),
  830. })
  831. .PrimaryKey(t => t.ID)
  832. .ForeignKey("bbsf.LookupItem", t => t.ContributorTypeItemID)
  833. .ForeignKey("dbo.Idea", t => t.IdeaID)
  834. .ForeignKey("bbsf.User", t => t.UserID)
  835. .Index(t => t.IdeaID)
  836. .Index(t => t.UserID)
  837. .Index(t => t.ContributorTypeItemID);
  838.  
  839. CreateTable(
  840. "dbo.IdeaFieldValue",
  841. c => new
  842. {
  843. ID = c.Int(nullable: false, identity: true),
  844. IdeaID = c.Int(),
  845. IdeaFieldID = c.Int(nullable: false),
  846. Text = c.String(),
  847. DateTime = c.DateTime(),
  848. Longitude = c.String(maxLength: 100),
  849. Latitude = c.String(maxLength: 100),
  850. SingleSelectID = c.Int(),
  851. Boolean = c.Boolean(),
  852. FileOrImageID = c.Int(),
  853. FileCorrelationID = c.Guid(),
  854. Created = c.DateTime(nullable: false),
  855. Modified = c.DateTime(nullable: false),
  856. CreatedBy = c.String(nullable: false, maxLength: 256),
  857. ModifiedBy = c.String(nullable: false, maxLength: 256),
  858. IsDeleted = c.Boolean(nullable: false),
  859. })
  860. .PrimaryKey(t => t.ID)
  861. .ForeignKey("bbsf.File", t => t.FileOrImageID)
  862. .ForeignKey("dbo.Idea", t => t.IdeaID)
  863. .ForeignKey("dbo.IdeaField", t => t.IdeaFieldID)
  864. .Index(t => t.IdeaID)
  865. .Index(t => t.IdeaFieldID)
  866. .Index(t => t.FileOrImageID);
  867.  
  868. CreateTable(
  869. "dbo.IdeaField",
  870. c => new
  871. {
  872. ID = c.Int(nullable: false, identity: true),
  873. Name = c.String(nullable: false, maxLength: 255),
  874. DataTypeItemID = c.Int(),
  875. WidthTypeItemID = c.Int(nullable: false),
  876. DisplayOrder = c.Int(nullable: false),
  877. IsRequiredOnCreate = c.Boolean(nullable: false),
  878. IsRequiredOnEdit = c.Boolean(nullable: false),
  879. IsShowInCreate = c.Boolean(nullable: false),
  880. IsShowInDisplay = c.Boolean(nullable: false),
  881. IsDeleted = c.Boolean(nullable: false),
  882. IsShowToPublic = c.Boolean(nullable: false),
  883. LabelResourceKey = c.String(nullable: false, maxLength: 1024),
  884. IsHidden = c.Boolean(nullable: false),
  885. CanDelete = c.Boolean(nullable: false),
  886. MinLength = c.Int(),
  887. MaxLength = c.Int(),
  888. Rows = c.Int(),
  889. LangValidationItemID = c.Int(),
  890. HasSearch = c.Boolean(),
  891. ChooseMultipleData = c.Boolean(),
  892. AllowedExtensions = c.String(),
  893. MultiSelectLookupID = c.Int(),
  894. MaxFileCount = c.Int(),
  895. Created = c.DateTime(nullable: false),
  896. Modified = c.DateTime(nullable: false),
  897. CreatedBy = c.String(nullable: false, maxLength: 256),
  898. ModifiedBy = c.String(nullable: false, maxLength: 256),
  899. })
  900. .PrimaryKey(t => t.ID)
  901. .ForeignKey("bbsf.LookupItem", t => t.DataTypeItemID)
  902. .ForeignKey("bbsf.LookupItem", t => t.LangValidationItemID)
  903. .ForeignKey("bbsf.Lookup", t => t.MultiSelectLookupID)
  904. .ForeignKey("bbsf.LookupItem", t => t.WidthTypeItemID)
  905. .Index(t => t.DataTypeItemID)
  906. .Index(t => t.WidthTypeItemID)
  907. .Index(t => t.LangValidationItemID)
  908. .Index(t => t.MultiSelectLookupID);
  909.  
  910. CreateTable(
  911. "dbo.IdeaVersion_Correlation",
  912. c => new
  913. {
  914. IdeaID = c.Int(nullable: false),
  915. IdeaVersionID = c.Int(nullable: false),
  916. FileCorrelationID = c.Guid(nullable: false),
  917. })
  918. .PrimaryKey(t => new { t.IdeaID, t.IdeaVersionID })
  919. .ForeignKey("dbo.Idea", t => t.IdeaID)
  920. .ForeignKey("dbo.IdeaVersion", t => t.IdeaVersionID)
  921. .Index(t => t.IdeaID)
  922. .Index(t => t.IdeaVersionID);
  923.  
  924. CreateTable(
  925. "dbo.IdeaVersion",
  926. c => new
  927. {
  928. ID = c.Int(nullable: false, identity: true),
  929. IdeaID = c.Int(nullable: false),
  930. SerializedVersion = c.String(),
  931. Created = c.DateTime(nullable: false),
  932. Modified = c.DateTime(nullable: false),
  933. CreatedBy = c.String(nullable: false, maxLength: 256),
  934. ModifiedBy = c.String(nullable: false, maxLength: 256),
  935. })
  936. .PrimaryKey(t => t.ID)
  937. .ForeignKey("dbo.Idea", t => t.IdeaID)
  938. .Index(t => t.IdeaID);
  939.  
  940. CreateTable(
  941. "dbo.IdeaVersion_File",
  942. c => new
  943. {
  944. IdeaID = c.Int(nullable: false),
  945. IdeaVersionID = c.Int(nullable: false),
  946. FileID = c.Int(nullable: false),
  947. })
  948. .PrimaryKey(t => new { t.IdeaID, t.IdeaVersionID, t.FileID })
  949. .ForeignKey("bbsf.File", t => t.FileID)
  950. .ForeignKey("dbo.Idea", t => t.IdeaID)
  951. .ForeignKey("dbo.IdeaVersion", t => t.IdeaVersionID)
  952. .Index(t => t.IdeaID)
  953. .Index(t => t.IdeaVersionID)
  954. .Index(t => t.FileID);
  955.  
  956. CreateTable(
  957. "dbo.Idea_RelatedIdea",
  958. c => new
  959. {
  960. ID = c.Int(nullable: false, identity: true),
  961. IdeaID = c.Int(nullable: false),
  962. RelatedIdeaID = c.Int(nullable: false),
  963. Created = c.DateTime(nullable: false),
  964. Modified = c.DateTime(nullable: false),
  965. CreatedBy = c.String(nullable: false, maxLength: 256),
  966. ModifiedBy = c.String(nullable: false, maxLength: 256),
  967. Idea_ID = c.Int(),
  968. })
  969. .PrimaryKey(t => t.ID)
  970. .ForeignKey("dbo.Idea", t => t.IdeaID)
  971. .ForeignKey("dbo.Idea", t => t.RelatedIdeaID)
  972. .ForeignKey("dbo.Idea", t => t.Idea_ID)
  973. .Index(t => t.IdeaID)
  974. .Index(t => t.RelatedIdeaID)
  975. .Index(t => t.Idea_ID);
  976.  
  977. CreateTable(
  978. "dbo.Tag",
  979. c => new
  980. {
  981. ID = c.Int(nullable: false, identity: true),
  982. NameEN = c.String(nullable: false, maxLength: 255),
  983. NameAR = c.String(nullable: false, maxLength: 255),
  984. Created = c.DateTime(nullable: false),
  985. Modified = c.DateTime(nullable: false),
  986. CreatedBy = c.String(nullable: false, maxLength: 256),
  987. ModifiedBy = c.String(nullable: false, maxLength: 256),
  988. })
  989. .PrimaryKey(t => t.ID);
  990.  
  991. CreateTable(
  992. "dbo.Title",
  993. c => new
  994. {
  995. ID = c.Int(nullable: false, identity: true),
  996. DescriptionEN = c.String(),
  997. DescriptionAR = c.String(),
  998. GoalID = c.Int(nullable: false),
  999. AreaOfFocusID = c.Int(nullable: false),
  1000. ChallengeID = c.Int(nullable: false),
  1001. ImageFileID = c.Guid(nullable: false),
  1002. ImpactEN = c.String(nullable: false, maxLength: 255),
  1003. ImpactAR = c.String(nullable: false, maxLength: 255),
  1004. ResourcesEN = c.String(nullable: false, maxLength: 255),
  1005. ResourcesAR = c.String(nullable: false, maxLength: 255),
  1006. RisksAR = c.String(nullable: false, maxLength: 255),
  1007. RisksEN = c.String(nullable: false, maxLength: 255),
  1008. SourceEN = c.String(nullable: false, maxLength: 255),
  1009. SourceAR = c.String(nullable: false, maxLength: 255),
  1010. ImplementationPlanFileCorrelID = c.Guid(nullable: false),
  1011. AttachmentCorrelID = c.Guid(nullable: false),
  1012. Created = c.DateTime(nullable: false),
  1013. Modified = c.DateTime(nullable: false),
  1014. CreatedBy = c.String(nullable: false, maxLength: 256),
  1015. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1016. })
  1017. .PrimaryKey(t => t.ID)
  1018. .ForeignKey("dbo.AreaOfFocus", t => t.AreaOfFocusID)
  1019. .ForeignKey("dbo.Challenge", t => t.ChallengeID)
  1020. .ForeignKey("dbo.Goal", t => t.GoalID)
  1021. .Index(t => t.GoalID)
  1022. .Index(t => t.AreaOfFocusID)
  1023. .Index(t => t.ChallengeID);
  1024.  
  1025. CreateTable(
  1026. "dbo.InnovationLab",
  1027. c => new
  1028. {
  1029. ID = c.Int(nullable: false, identity: true),
  1030. NameEN = c.String(nullable: false, maxLength: 255),
  1031. NameAR = c.String(nullable: false, maxLength: 255),
  1032. DescriptionEN = c.String(),
  1033. DescriptionAR = c.String(),
  1034. StartDate = c.DateTime(nullable: false),
  1035. EndDate = c.DateTime(nullable: false),
  1036. Visible = c.Boolean(nullable: false),
  1037. DisplayOrder = c.Int(nullable: false),
  1038. Created = c.DateTime(nullable: false),
  1039. Modified = c.DateTime(nullable: false),
  1040. CreatedBy = c.String(nullable: false, maxLength: 256),
  1041. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1042. OwnerID = c.Int(nullable: false),
  1043. })
  1044. .PrimaryKey(t => t.ID)
  1045. .ForeignKey("bbsf.User", t => t.OwnerID)
  1046. .Index(t => t.OwnerID);
  1047.  
  1048. CreateTable(
  1049. "dbo.Agenda",
  1050. c => new
  1051. {
  1052. ID = c.Int(nullable: false, identity: true),
  1053. NameEN = c.String(nullable: false, maxLength: 255),
  1054. NameAR = c.String(nullable: false, maxLength: 255),
  1055. DescriptionEN = c.String(),
  1056. DescriptionAR = c.String(),
  1057. InnovationLabID = c.Int(nullable: false),
  1058. Date = c.DateTime(nullable: false),
  1059. StartTime = c.DateTime(nullable: false),
  1060. EndTime = c.DateTime(nullable: false),
  1061. LocationEN = c.String(nullable: false, maxLength: 500),
  1062. LocationAR = c.String(nullable: false, maxLength: 500),
  1063. DisplayOrder = c.Int(nullable: false),
  1064. Created = c.DateTime(nullable: false),
  1065. Modified = c.DateTime(nullable: false),
  1066. CreatedBy = c.String(nullable: false, maxLength: 256),
  1067. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1068. })
  1069. .PrimaryKey(t => t.ID)
  1070. .ForeignKey("dbo.InnovationLab", t => t.InnovationLabID)
  1071. .Index(t => t.InnovationLabID);
  1072.  
  1073. CreateTable(
  1074. "dbo.Team",
  1075. c => new
  1076. {
  1077. ID = c.Int(nullable: false, identity: true),
  1078. NameEN = c.String(nullable: false, maxLength: 255),
  1079. NameAR = c.String(nullable: false, maxLength: 255),
  1080. InnovationLabID = c.Int(nullable: false),
  1081. DisplayOrder = c.Int(nullable: false),
  1082. Created = c.DateTime(nullable: false),
  1083. Modified = c.DateTime(nullable: false),
  1084. CreatedBy = c.String(nullable: false, maxLength: 256),
  1085. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1086. })
  1087. .PrimaryKey(t => t.ID)
  1088. .ForeignKey("dbo.InnovationLab", t => t.InnovationLabID)
  1089. .Index(t => t.InnovationLabID);
  1090.  
  1091. CreateTable(
  1092. "dbo.Team_User",
  1093. c => new
  1094. {
  1095. ID = c.Int(nullable: false, identity: true),
  1096. UserID = c.Int(nullable: false),
  1097. TeamID = c.Int(nullable: false),
  1098. Created = c.DateTime(nullable: false),
  1099. Modified = c.DateTime(nullable: false),
  1100. CreatedBy = c.String(nullable: false, maxLength: 256),
  1101. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1102. })
  1103. .PrimaryKey(t => t.ID)
  1104. .ForeignKey("dbo.Team", t => t.TeamID)
  1105. .ForeignKey("bbsf.User", t => t.UserID)
  1106. .Index(t => t.UserID)
  1107. .Index(t => t.TeamID);
  1108.  
  1109. CreateTable(
  1110. "dbo.Project",
  1111. c => new
  1112. {
  1113. ID = c.Int(nullable: false, identity: true),
  1114. NameEN = c.String(nullable: false, maxLength: 255),
  1115. NameAR = c.String(nullable: false, maxLength: 255),
  1116. DescriptionEN = c.String(),
  1117. DescriptionAR = c.String(),
  1118. StartDate = c.DateTime(nullable: false),
  1119. EndDate = c.DateTime(),
  1120. ManagerID = c.Int(nullable: false),
  1121. IdeaID = c.Int(),
  1122. CreatedBy = c.String(nullable: false, maxLength: 256),
  1123. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1124. Created = c.DateTime(nullable: false),
  1125. Modified = c.DateTime(nullable: false),
  1126. IsDeleted = c.Boolean(nullable: false),
  1127. })
  1128. .PrimaryKey(t => t.ID)
  1129. .ForeignKey("dbo.Idea", t => t.IdeaID)
  1130. .ForeignKey("bbsf.User", t => t.ManagerID)
  1131. .Index(t => t.ManagerID)
  1132. .Index(t => t.IdeaID);
  1133.  
  1134. CreateTable(
  1135. "dbo.Deliverable",
  1136. c => new
  1137. {
  1138. ID = c.Int(nullable: false, identity: true),
  1139. NameEN = c.String(nullable: false, maxLength: 255),
  1140. NameAR = c.String(nullable: false, maxLength: 255),
  1141. DescriptionEN = c.String(),
  1142. DescriptionAR = c.String(),
  1143. IsDeleted = c.Boolean(nullable: false),
  1144. CreatedBy = c.String(nullable: false, maxLength: 256),
  1145. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1146. Created = c.DateTime(nullable: false),
  1147. Modified = c.DateTime(nullable: false),
  1148. ProjectID = c.Int(nullable: false),
  1149. FileID = c.Int(nullable: false),
  1150. FileCorrelationID = c.Guid(),
  1151. })
  1152. .PrimaryKey(t => t.ID)
  1153. .ForeignKey("bbsf.File", t => t.FileID)
  1154. .ForeignKey("dbo.Project", t => t.ProjectID)
  1155. .Index(t => t.ProjectID)
  1156. .Index(t => t.FileID);
  1157.  
  1158. CreateTable(
  1159. "dbo.Folder",
  1160. c => new
  1161. {
  1162. ID = c.Int(nullable: false, identity: true),
  1163. Name = c.String(nullable: false, maxLength: 256),
  1164. ParentFolderID = c.Int(),
  1165. Created = c.DateTime(nullable: false),
  1166. Modified = c.DateTime(nullable: false),
  1167. CreatedBy = c.String(nullable: false, maxLength: 256),
  1168. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1169. CorrelationID = c.Guid(),
  1170. ProjectID = c.Int(),
  1171. IsDeleted = c.Boolean(nullable: false),
  1172. })
  1173. .PrimaryKey(t => t.ID)
  1174. .ForeignKey("dbo.Folder", t => t.ParentFolderID)
  1175. .ForeignKey("dbo.Project", t => t.ProjectID)
  1176. .Index(t => t.ParentFolderID)
  1177. .Index(t => t.ProjectID);
  1178.  
  1179. CreateTable(
  1180. "dbo.Issue",
  1181. c => new
  1182. {
  1183. ID = c.Int(nullable: false, identity: true),
  1184. NameEN = c.String(nullable: false, maxLength: 255),
  1185. NameAR = c.String(nullable: false, maxLength: 255),
  1186. DescriptionEN = c.String(),
  1187. DescriptionAR = c.String(),
  1188. ActionEN = c.String(),
  1189. ActionAR = c.String(),
  1190. CreatedBy = c.String(nullable: false, maxLength: 256),
  1191. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1192. Created = c.DateTime(nullable: false),
  1193. Modified = c.DateTime(nullable: false),
  1194. IsDeleted = c.Boolean(nullable: false),
  1195. ProjectID = c.Int(nullable: false),
  1196. })
  1197. .PrimaryKey(t => t.ID)
  1198. .ForeignKey("dbo.Project", t => t.ProjectID)
  1199. .Index(t => t.ProjectID);
  1200.  
  1201. CreateTable(
  1202. "dbo.Project_Member",
  1203. c => new
  1204. {
  1205. ID = c.Int(nullable: false, identity: true),
  1206. ProjectID = c.Int(nullable: false),
  1207. UserID = c.Int(nullable: false),
  1208. Created = c.DateTime(nullable: false),
  1209. Modified = c.DateTime(nullable: false),
  1210. CreatedBy = c.String(nullable: false, maxLength: 256),
  1211. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1212. IsDeleted = c.Boolean(nullable: false),
  1213. })
  1214. .PrimaryKey(t => t.ID)
  1215. .ForeignKey("dbo.Project", t => t.ProjectID)
  1216. .ForeignKey("bbsf.User", t => t.UserID)
  1217. .Index(t => t.ProjectID)
  1218. .Index(t => t.UserID);
  1219.  
  1220. CreateTable(
  1221. "dbo.Milestone",
  1222. c => new
  1223. {
  1224. ID = c.Int(nullable: false, identity: true),
  1225. NameEN = c.String(nullable: false, maxLength: 255),
  1226. NameAR = c.String(nullable: false, maxLength: 255),
  1227. DescriptionEN = c.String(),
  1228. DescriptionAR = c.String(),
  1229. CreatedBy = c.String(nullable: false, maxLength: 256),
  1230. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1231. Created = c.DateTime(nullable: false),
  1232. Modified = c.DateTime(nullable: false),
  1233. IsDeleted = c.Boolean(nullable: false),
  1234. Weight = c.Int(),
  1235. ProjectID = c.Int(nullable: false),
  1236. })
  1237. .PrimaryKey(t => t.ID)
  1238. .ForeignKey("dbo.Project", t => t.ProjectID)
  1239. .Index(t => t.ProjectID);
  1240.  
  1241. CreateTable(
  1242. "dbo.ProjectTask",
  1243. c => new
  1244. {
  1245. ID = c.Int(nullable: false, identity: true),
  1246. NameEN = c.String(nullable: false, maxLength: 255),
  1247. NameAR = c.String(nullable: false, maxLength: 255),
  1248. DescriptionEN = c.String(),
  1249. DescriptionAR = c.String(),
  1250. CreatedBy = c.String(nullable: false, maxLength: 256),
  1251. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1252. Created = c.DateTime(nullable: false),
  1253. Modified = c.DateTime(nullable: false),
  1254. IsDeleted = c.Boolean(nullable: false),
  1255. StartDate = c.DateTime(nullable: false),
  1256. EndDate = c.DateTime(),
  1257. ParentTaskID = c.Int(),
  1258. MileStoneID = c.Int(),
  1259. })
  1260. .PrimaryKey(t => t.ID)
  1261. .ForeignKey("dbo.Milestone", t => t.MileStoneID)
  1262. .ForeignKey("dbo.ProjectTask", t => t.ParentTaskID)
  1263. .Index(t => t.ParentTaskID)
  1264. .Index(t => t.MileStoneID);
  1265.  
  1266. CreateTable(
  1267. "dbo.Risk",
  1268. c => new
  1269. {
  1270. ID = c.Int(nullable: false, identity: true),
  1271. TitleEN = c.String(nullable: false, maxLength: 255),
  1272. TitleAR = c.String(nullable: false, maxLength: 255),
  1273. DescriptionEN = c.String(),
  1274. DescriptionAR = c.String(),
  1275. ActionEN = c.String(),
  1276. ActionAR = c.String(),
  1277. IdentificationDate = c.DateTime(nullable: false),
  1278. IsDeleted = c.Boolean(nullable: false),
  1279. ProjectID = c.Int(nullable: false),
  1280. StatusItemID = c.Int(nullable: false),
  1281. ImpactItemID = c.Int(nullable: false),
  1282. ProbabilityItemID = c.Int(nullable: false),
  1283. CreatedBy = c.String(nullable: false, maxLength: 256),
  1284. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1285. Created = c.DateTime(nullable: false),
  1286. Modified = c.DateTime(nullable: false),
  1287. })
  1288. .PrimaryKey(t => t.ID)
  1289. .ForeignKey("bbsf.LookupItem", t => t.ImpactItemID)
  1290. .ForeignKey("bbsf.LookupItem", t => t.ProbabilityItemID)
  1291. .ForeignKey("dbo.Project", t => t.ProjectID)
  1292. .ForeignKey("bbsf.LookupItem", t => t.StatusItemID)
  1293. .Index(t => t.ProjectID)
  1294. .Index(t => t.StatusItemID)
  1295. .Index(t => t.ImpactItemID)
  1296. .Index(t => t.ProbabilityItemID);
  1297.  
  1298. CreateTable(
  1299. "dbo.Activity",
  1300. c => new
  1301. {
  1302. ID = c.Int(nullable: false, identity: true),
  1303. TitleEN = c.String(nullable: false, maxLength: 255),
  1304. TitleAR = c.String(nullable: false, maxLength: 255),
  1305. Created = c.DateTime(nullable: false),
  1306. Modified = c.DateTime(nullable: false),
  1307. CreatedBy = c.String(nullable: false, maxLength: 256),
  1308. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1309. IncludeFiles = c.Boolean(nullable: false),
  1310. CreateEvent = c.Boolean(nullable: false),
  1311. FilesCorrelationID = c.Guid(),
  1312. StageID = c.Int(),
  1313. StatusItemID = c.Int(nullable: false),
  1314. ActivityTemplateID = c.Int(),
  1315. IsDeleted = c.Boolean(nullable: false),
  1316. })
  1317. .PrimaryKey(t => t.ID)
  1318. .ForeignKey("dbo.ActivityTemplate", t => t.ActivityTemplateID)
  1319. .ForeignKey("dbo.Stage", t => t.StageID)
  1320. .ForeignKey("bbsf.LookupItem", t => t.StatusItemID)
  1321. .Index(t => t.StageID)
  1322. .Index(t => t.StatusItemID)
  1323. .Index(t => t.ActivityTemplateID);
  1324.  
  1325. CreateTable(
  1326. "dbo.ActivityTemplate",
  1327. c => new
  1328. {
  1329. ID = c.Int(nullable: false, identity: true),
  1330. TitleEN = c.String(nullable: false, maxLength: 255),
  1331. TitleAR = c.String(nullable: false, maxLength: 255),
  1332. DescriptionEN = c.String(),
  1333. DescriptionAR = c.String(),
  1334. Created = c.DateTime(nullable: false),
  1335. Modified = c.DateTime(nullable: false),
  1336. CreatedBy = c.String(nullable: false, maxLength: 256),
  1337. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1338. IsDeleted = c.Boolean(nullable: false),
  1339. })
  1340. .PrimaryKey(t => t.ID);
  1341.  
  1342. CreateTable(
  1343. "dbo.ActivityComment",
  1344. c => new
  1345. {
  1346. ID = c.Int(nullable: false, identity: true),
  1347. Comment = c.String(),
  1348. Created = c.DateTime(nullable: false),
  1349. Modified = c.DateTime(nullable: false),
  1350. CreatedBy = c.String(nullable: false, maxLength: 256),
  1351. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1352. IsDeleted = c.Boolean(nullable: false),
  1353. ActivityID = c.Int(nullable: false),
  1354. })
  1355. .PrimaryKey(t => t.ID)
  1356. .ForeignKey("dbo.Activity", t => t.ActivityID)
  1357. .Index(t => t.ActivityID);
  1358.  
  1359. CreateTable(
  1360. "dbo.Stage",
  1361. c => new
  1362. {
  1363. ID = c.Int(nullable: false, identity: true),
  1364. NameEN = c.String(nullable: false, maxLength: 255),
  1365. NameAR = c.String(nullable: false, maxLength: 255),
  1366. Number = c.Int(nullable: false),
  1367. Created = c.DateTime(nullable: false),
  1368. Modified = c.DateTime(nullable: false),
  1369. CreatedBy = c.String(nullable: false, maxLength: 256),
  1370. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1371. IsDeleted = c.Boolean(nullable: false),
  1372. AnalysisID = c.Int(),
  1373. PlaningID = c.Int(),
  1374. MonitoringID = c.Int(),
  1375. StageTemplateID = c.Int(),
  1376. })
  1377. .PrimaryKey(t => t.ID)
  1378. .ForeignKey("dbo.IMOAnalysis", t => t.AnalysisID)
  1379. .ForeignKey("dbo.IMOMonitoring", t => t.MonitoringID)
  1380. .ForeignKey("dbo.IMOPlanning", t => t.PlaningID)
  1381. .ForeignKey("dbo.StageTemplate", t => t.StageTemplateID)
  1382. .Index(t => t.AnalysisID)
  1383. .Index(t => t.PlaningID)
  1384. .Index(t => t.MonitoringID)
  1385. .Index(t => t.StageTemplateID);
  1386.  
  1387. CreateTable(
  1388. "dbo.IMOAnalysis",
  1389. c => new
  1390. {
  1391. ID = c.Int(nullable: false, identity: true),
  1392. NameEN = c.String(nullable: false, maxLength: 255),
  1393. NameAR = c.String(nullable: false, maxLength: 255),
  1394. DescriptionEN = c.String(),
  1395. DescriptionAR = c.String(),
  1396. Created = c.DateTime(nullable: false),
  1397. Modified = c.DateTime(nullable: false),
  1398. CreatedBy = c.String(nullable: false, maxLength: 256),
  1399. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1400. IsDeleted = c.Boolean(nullable: false),
  1401. Number = c.Int(nullable: false),
  1402. Active = c.Boolean(nullable: false),
  1403. })
  1404. .PrimaryKey(t => t.ID);
  1405.  
  1406. CreateTable(
  1407. "dbo.IMOMonitoring",
  1408. c => new
  1409. {
  1410. ID = c.Int(nullable: false, identity: true),
  1411. NameEN = c.String(nullable: false, maxLength: 255),
  1412. NameAR = c.String(nullable: false, maxLength: 255),
  1413. DescriptionEN = c.String(),
  1414. DescriptionAR = c.String(),
  1415. Created = c.DateTime(nullable: false),
  1416. Modified = c.DateTime(nullable: false),
  1417. CreatedBy = c.String(nullable: false, maxLength: 256),
  1418. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1419. Number = c.Int(nullable: false),
  1420. Active = c.Boolean(nullable: false),
  1421. IsDeleted = c.Boolean(nullable: false),
  1422. })
  1423. .PrimaryKey(t => t.ID);
  1424.  
  1425. CreateTable(
  1426. "dbo.IMOPlanning",
  1427. c => new
  1428. {
  1429. ID = c.Int(nullable: false, identity: true),
  1430. NameEN = c.String(nullable: false, maxLength: 255),
  1431. NameAR = c.String(nullable: false, maxLength: 255),
  1432. DescriptionEN = c.String(),
  1433. DescriptionAR = c.String(),
  1434. Created = c.DateTime(nullable: false),
  1435. Modified = c.DateTime(nullable: false),
  1436. CreatedBy = c.String(nullable: false, maxLength: 256),
  1437. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1438. Number = c.Int(nullable: false),
  1439. Active = c.Boolean(nullable: false),
  1440. IsDeleted = c.Boolean(nullable: false),
  1441. })
  1442. .PrimaryKey(t => t.ID);
  1443.  
  1444. CreateTable(
  1445. "dbo.StageTemplate",
  1446. c => new
  1447. {
  1448. ID = c.Int(nullable: false, identity: true),
  1449. NameEN = c.String(nullable: false, maxLength: 255),
  1450. NameAR = c.String(nullable: false, maxLength: 255),
  1451. DescriptionEN = c.String(),
  1452. DescriptionAR = c.String(),
  1453. Created = c.DateTime(nullable: false),
  1454. Modified = c.DateTime(nullable: false),
  1455. CreatedBy = c.String(nullable: false, maxLength: 256),
  1456. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1457. IsDeleted = c.Boolean(nullable: false),
  1458. })
  1459. .PrimaryKey(t => t.ID);
  1460.  
  1461. CreateTable(
  1462. "bbsf.WorkflowActivity",
  1463. c => new
  1464. {
  1465. ID = c.Int(nullable: false, identity: true),
  1466. SysName = c.String(nullable: false, maxLength: 100),
  1467. NameEN = c.String(nullable: false, maxLength: 255),
  1468. NameAR = c.String(nullable: false, maxLength: 255),
  1469. WorkflowVersionID = c.Int(nullable: false),
  1470. ActivityTypeItemID = c.Int(nullable: false),
  1471. TaskCorrelationTypeItemID = c.Int(),
  1472. TemplateID = c.Int(),
  1473. StopOnError = c.Boolean(nullable: false),
  1474. TaskNameEN = c.String(maxLength: 255),
  1475. TaskNameAR = c.String(maxLength: 255),
  1476. TaskDescriptionEN = c.String(maxLength: 255),
  1477. TaskDescriptionAR = c.String(maxLength: 255),
  1478. TaskURL = c.String(maxLength: 2083),
  1479. CanCompleteFromTME = c.Boolean(nullable: false),
  1480. Created = c.DateTime(nullable: false),
  1481. Modified = c.DateTime(nullable: false),
  1482. CreatedBy = c.String(nullable: false, maxLength: 256),
  1483. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1484. })
  1485. .PrimaryKey(t => t.ID)
  1486. .ForeignKey("bbsf.LookupItem", t => t.ActivityTypeItemID)
  1487. .ForeignKey("bbsf.Template", t => t.TemplateID)
  1488. .ForeignKey("bbsf.WorkflowVersion", t => t.WorkflowVersionID)
  1489. .Index(t => t.SysName)
  1490. .Index(t => t.WorkflowVersionID)
  1491. .Index(t => t.ActivityTypeItemID)
  1492. .Index(t => t.TemplateID);
  1493.  
  1494. CreateTable(
  1495. "bbsf.WorkflowActivityVariable",
  1496. c => new
  1497. {
  1498. ID = c.Int(nullable: false, identity: true),
  1499. ActivityID = c.Int(nullable: false),
  1500. VariableID = c.Int(nullable: false),
  1501. IsMandatory = c.Boolean(nullable: false),
  1502. IsEnabled = c.Boolean(nullable: false),
  1503. IsVisible = c.Boolean(nullable: false),
  1504. Created = c.DateTime(nullable: false),
  1505. Modified = c.DateTime(nullable: false),
  1506. CreatedBy = c.String(nullable: false, maxLength: 256),
  1507. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1508. })
  1509. .PrimaryKey(t => t.ID)
  1510. .ForeignKey("bbsf.WorkflowActivity", t => t.ActivityID)
  1511. .ForeignKey("bbsf.WorkflowVariable", t => t.VariableID)
  1512. .Index(t => t.ActivityID)
  1513. .Index(t => t.VariableID);
  1514.  
  1515. CreateTable(
  1516. "bbsf.WorkflowLogVariable",
  1517. c => new
  1518. {
  1519. ID = c.Int(nullable: false, identity: true),
  1520. LogID = c.Int(nullable: false),
  1521. ActivityVariableID = c.Int(nullable: false),
  1522. Value_Text = c.String(maxLength: 2500),
  1523. Value_Number = c.Double(),
  1524. Value_Boolean = c.Boolean(),
  1525. Value_Date = c.DateTime(),
  1526. Value_Guid = c.Guid(),
  1527. Value_VariableLookupID = c.Long(),
  1528. Created = c.DateTime(nullable: false),
  1529. Modified = c.DateTime(nullable: false),
  1530. CreatedBy = c.String(nullable: false, maxLength: 256),
  1531. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1532. })
  1533. .PrimaryKey(t => t.ID)
  1534. .ForeignKey("bbsf.WorkflowActivityVariable", t => t.ActivityVariableID)
  1535. .ForeignKey("bbsf.WorkflowLog", t => t.LogID)
  1536. .Index(t => t.LogID)
  1537. .Index(t => t.ActivityVariableID);
  1538.  
  1539. CreateTable(
  1540. "bbsf.WorkflowLog",
  1541. c => new
  1542. {
  1543. ID = c.Int(nullable: false, identity: true),
  1544. InstanceID = c.Int(nullable: false),
  1545. WorkflowVersionID = c.Int(nullable: false),
  1546. ActivityID = c.Int(nullable: false),
  1547. ActivityOutcomeID = c.Int(),
  1548. CompletedByUserID = c.Int(nullable: false),
  1549. CompletedOn = c.DateTime(nullable: false),
  1550. Created = c.DateTime(nullable: false),
  1551. Modified = c.DateTime(nullable: false),
  1552. CreatedBy = c.String(nullable: false, maxLength: 256),
  1553. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1554. })
  1555. .PrimaryKey(t => t.ID)
  1556. .ForeignKey("bbsf.WorkflowActivity", t => t.ActivityID)
  1557. .ForeignKey("bbsf.WorkflowActivityOutcome", t => t.ActivityOutcomeID)
  1558. .ForeignKey("bbsf.User", t => t.CompletedByUserID)
  1559. .ForeignKey("bbsf.WorkflowInstance", t => t.InstanceID)
  1560. .ForeignKey("bbsf.WorkflowVersion", t => t.WorkflowVersionID)
  1561. .Index(t => t.InstanceID)
  1562. .Index(t => t.WorkflowVersionID)
  1563. .Index(t => t.ActivityID)
  1564. .Index(t => t.ActivityOutcomeID)
  1565. .Index(t => t.CompletedByUserID);
  1566.  
  1567. CreateTable(
  1568. "bbsf.WorkflowActivityOutcome",
  1569. c => new
  1570. {
  1571. ID = c.Int(nullable: false, identity: true),
  1572. NameEN = c.String(nullable: false, maxLength: 255),
  1573. NameAR = c.String(nullable: false, maxLength: 255),
  1574. SysName = c.String(nullable: false, maxLength: 100),
  1575. ActivityID = c.Int(nullable: false),
  1576. NextActivityID = c.Int(),
  1577. CanAddComment = c.Boolean(nullable: false),
  1578. Created = c.DateTime(nullable: false),
  1579. Modified = c.DateTime(nullable: false),
  1580. CreatedBy = c.String(nullable: false, maxLength: 256),
  1581. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1582. })
  1583. .PrimaryKey(t => t.ID)
  1584. .ForeignKey("bbsf.WorkflowActivity", t => t.NextActivityID)
  1585. .ForeignKey("bbsf.WorkflowActivity", t => t.ActivityID)
  1586. .Index(t => t.SysName)
  1587. .Index(t => t.ActivityID)
  1588. .Index(t => t.NextActivityID);
  1589.  
  1590. CreateTable(
  1591. "bbsf.WorkflowInstance",
  1592. c => new
  1593. {
  1594. ID = c.Int(nullable: false, identity: true),
  1595. SysName = c.String(nullable: false, maxLength: 255),
  1596. NameEN = c.String(nullable: false, maxLength: 255),
  1597. NameAR = c.String(nullable: false, maxLength: 255),
  1598. WorkflowVersionID = c.Int(nullable: false),
  1599. CurrentActivityID = c.Int(nullable: false),
  1600. StartedByUserID = c.Int(nullable: false),
  1601. InstanceStatusItemID = c.Int(nullable: false),
  1602. AssociatedObjectID = c.String(nullable: false, maxLength: 255),
  1603. StartDate = c.DateTime(nullable: false),
  1604. EndDate = c.DateTime(),
  1605. Created = c.DateTime(nullable: false),
  1606. Modified = c.DateTime(nullable: false),
  1607. CreatedBy = c.String(nullable: false, maxLength: 256),
  1608. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1609. })
  1610. .PrimaryKey(t => t.ID)
  1611. .ForeignKey("bbsf.WorkflowActivity", t => t.CurrentActivityID)
  1612. .ForeignKey("bbsf.LookupItem", t => t.InstanceStatusItemID)
  1613. .ForeignKey("bbsf.User", t => t.StartedByUserID)
  1614. .ForeignKey("bbsf.WorkflowVersion", t => t.WorkflowVersionID)
  1615. .Index(t => t.WorkflowVersionID)
  1616. .Index(t => t.CurrentActivityID)
  1617. .Index(t => t.StartedByUserID)
  1618. .Index(t => t.InstanceStatusItemID);
  1619.  
  1620. CreateTable(
  1621. "bbsf.WorkflowError",
  1622. c => new
  1623. {
  1624. ID = c.Int(nullable: false, identity: true),
  1625. InstanceID = c.Int(nullable: false),
  1626. ActivityID = c.Int(nullable: false),
  1627. Message = c.String(nullable: false),
  1628. Created = c.DateTime(nullable: false),
  1629. Modified = c.DateTime(nullable: false),
  1630. CreatedBy = c.String(nullable: false, maxLength: 256),
  1631. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1632. })
  1633. .PrimaryKey(t => t.ID)
  1634. .ForeignKey("bbsf.WorkflowActivity", t => t.ActivityID)
  1635. .ForeignKey("bbsf.WorkflowInstance", t => t.InstanceID)
  1636. .Index(t => t.InstanceID)
  1637. .Index(t => t.ActivityID);
  1638.  
  1639. CreateTable(
  1640. "bbsf.WorkflowInstanceComment",
  1641. c => new
  1642. {
  1643. ID = c.Int(nullable: false, identity: true),
  1644. WorkflowInstanceID = c.Int(nullable: false),
  1645. Text = c.String(nullable: false, maxLength: 255),
  1646. ParentCommentID = c.Int(),
  1647. UserID = c.Int(nullable: false),
  1648. Created = c.DateTime(nullable: false),
  1649. Modified = c.DateTime(nullable: false),
  1650. CreatedBy = c.String(nullable: false, maxLength: 256),
  1651. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1652. })
  1653. .PrimaryKey(t => t.ID)
  1654. .ForeignKey("bbsf.WorkflowInstance", t => t.WorkflowInstanceID)
  1655. .ForeignKey("bbsf.WorkflowInstanceComment", t => t.ParentCommentID)
  1656. .ForeignKey("bbsf.User", t => t.UserID)
  1657. .Index(t => t.WorkflowInstanceID)
  1658. .Index(t => t.ParentCommentID)
  1659. .Index(t => t.UserID);
  1660.  
  1661. CreateTable(
  1662. "bbsf.WorkflowInstanceTask",
  1663. c => new
  1664. {
  1665. ID = c.Int(nullable: false, identity: true),
  1666. WorkflowInstanceID = c.Int(nullable: false),
  1667. ActivityID = c.Int(nullable: false),
  1668. IsCompleted = c.Boolean(nullable: false),
  1669. TaskCorrelationID = c.Guid(),
  1670. Created = c.DateTime(nullable: false),
  1671. Modified = c.DateTime(nullable: false),
  1672. CreatedBy = c.String(nullable: false, maxLength: 256),
  1673. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1674. })
  1675. .PrimaryKey(t => t.ID)
  1676. .ForeignKey("bbsf.WorkflowActivity", t => t.ActivityID)
  1677. .ForeignKey("bbsf.WorkflowInstance", t => t.WorkflowInstanceID)
  1678. .Index(t => t.WorkflowInstanceID)
  1679. .Index(t => t.ActivityID);
  1680.  
  1681. CreateTable(
  1682. "bbsf.TMETask",
  1683. c => new
  1684. {
  1685. ID = c.Int(nullable: false, identity: true),
  1686. NameEN = c.String(nullable: false, maxLength: 255),
  1687. NameAR = c.String(nullable: false, maxLength: 255),
  1688. DescriptionEN = c.String(nullable: false, maxLength: 255),
  1689. DescriptionAR = c.String(nullable: false, maxLength: 255),
  1690. TaskURL = c.String(maxLength: 2083),
  1691. TaskComment = c.String(maxLength: 500),
  1692. CorrelationID = c.Guid(),
  1693. IsAlive = c.Boolean(nullable: false),
  1694. TaskTypeItemID = c.Int(nullable: false),
  1695. WFInstanceTaskID = c.Int(),
  1696. TaskStatusItemID = c.Int(nullable: false),
  1697. TaskOutcomeItemID = c.Int(),
  1698. AssociatedObjectID = c.String(),
  1699. AssignedToUserID = c.Int(nullable: false),
  1700. CompletionDate = c.DateTime(),
  1701. PercentCompleted = c.Short(),
  1702. CorrelationTypeItemID = c.Int(nullable: false),
  1703. Created = c.DateTime(nullable: false),
  1704. Modified = c.DateTime(nullable: false),
  1705. CreatedBy = c.String(nullable: false, maxLength: 256),
  1706. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1707. })
  1708. .PrimaryKey(t => t.ID)
  1709. .ForeignKey("bbsf.LookupItem", t => t.CorrelationTypeItemID)
  1710. .ForeignKey("bbsf.WorkflowInstanceTask", t => t.WFInstanceTaskID)
  1711. .ForeignKey("bbsf.LookupItem", t => t.TaskStatusItemID)
  1712. .Index(t => t.WFInstanceTaskID)
  1713. .Index(t => t.TaskStatusItemID)
  1714. .Index(t => t.CorrelationTypeItemID);
  1715.  
  1716. CreateTable(
  1717. "bbsf.WorkflowInstanceVariable",
  1718. c => new
  1719. {
  1720. ID = c.Int(nullable: false, identity: true),
  1721. InstanceID = c.Int(nullable: false),
  1722. ActivityID = c.Int(),
  1723. VariableID = c.Int(nullable: false),
  1724. Value_Text = c.String(maxLength: 2500),
  1725. Value_Number = c.Double(),
  1726. Value_Boolean = c.Boolean(),
  1727. Value_Date = c.DateTime(),
  1728. Value_Guid = c.Guid(),
  1729. Value_Identifier = c.String(),
  1730. Value_VariableLookupID = c.Int(),
  1731. Created = c.DateTime(nullable: false),
  1732. Modified = c.DateTime(nullable: false),
  1733. CreatedBy = c.String(nullable: false, maxLength: 256),
  1734. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1735. })
  1736. .PrimaryKey(t => t.ID)
  1737. .ForeignKey("bbsf.WorkflowActivity", t => t.ActivityID)
  1738. .ForeignKey("bbsf.WorkflowInstance", t => t.InstanceID)
  1739. .ForeignKey("bbsf.WorkflowVariable", t => t.VariableID)
  1740. .Index(t => t.InstanceID)
  1741. .Index(t => t.ActivityID)
  1742. .Index(t => t.VariableID);
  1743.  
  1744. CreateTable(
  1745. "bbsf.WorkflowVariableLookup",
  1746. c => new
  1747. {
  1748. ID = c.Int(nullable: false, identity: true),
  1749. Value = c.String(nullable: false, maxLength: 2000),
  1750. NameEN = c.String(nullable: false, maxLength: 255),
  1751. NameAR = c.String(nullable: false, maxLength: 255),
  1752. VariableID = c.Int(nullable: false),
  1753. Created = c.DateTime(nullable: false),
  1754. Modified = c.DateTime(nullable: false),
  1755. CreatedBy = c.String(nullable: false, maxLength: 256),
  1756. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1757. })
  1758. .PrimaryKey(t => t.ID)
  1759. .ForeignKey("bbsf.WorkflowVariable", t => t.VariableID)
  1760. .Index(t => t.VariableID);
  1761.  
  1762. CreateTable(
  1763. "bbsf.WorkflowVariable",
  1764. c => new
  1765. {
  1766. ID = c.Int(nullable: false, identity: true),
  1767. NameEN = c.String(nullable: false, maxLength: 255),
  1768. NameAR = c.String(nullable: false, maxLength: 255),
  1769. SysName = c.String(nullable: false, maxLength: 100),
  1770. WorkflowVersionID = c.Int(nullable: false),
  1771. DataTypeItemID = c.Int(nullable: false),
  1772. VariableTypeItemID = c.Int(nullable: false),
  1773. IsConstant = c.Boolean(nullable: false),
  1774. Value_Number = c.Double(),
  1775. Value_Boolean = c.Boolean(),
  1776. Value_Date = c.DateTime(),
  1777. Value_VariableLookupID = c.Int(),
  1778. Value_Identifier = c.String(maxLength: 100),
  1779. Value_Text = c.String(maxLength: 2500),
  1780. Created = c.DateTime(nullable: false),
  1781. Modified = c.DateTime(nullable: false),
  1782. CreatedBy = c.String(nullable: false, maxLength: 256),
  1783. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1784. })
  1785. .PrimaryKey(t => t.ID)
  1786. .ForeignKey("bbsf.LookupItem", t => t.DataTypeItemID)
  1787. .ForeignKey("bbsf.LookupItem", t => t.VariableTypeItemID)
  1788. .ForeignKey("bbsf.WorkflowVersion", t => t.WorkflowVersionID)
  1789. .Index(t => t.SysName)
  1790. .Index(t => t.WorkflowVersionID)
  1791. .Index(t => t.DataTypeItemID)
  1792. .Index(t => t.VariableTypeItemID)
  1793. .Index(t => t.Value_Identifier);
  1794.  
  1795. CreateTable(
  1796. "bbsf.WorkflowVersion",
  1797. c => new
  1798. {
  1799. ID = c.Int(nullable: false, identity: true),
  1800. WorkflowID = c.Int(nullable: false),
  1801. ChangeEN = c.String(nullable: false, maxLength: 255),
  1802. ChangeAR = c.String(nullable: false, maxLength: 255),
  1803. IsCurrent = c.Boolean(nullable: false),
  1804. IsPublished = c.Boolean(nullable: false),
  1805. Created = c.DateTime(nullable: false),
  1806. Modified = c.DateTime(nullable: false),
  1807. CreatedBy = c.String(nullable: false, maxLength: 256),
  1808. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1809. })
  1810. .PrimaryKey(t => t.ID)
  1811. .ForeignKey("bbsf.Workflow", t => t.WorkflowID)
  1812. .Index(t => t.WorkflowID);
  1813.  
  1814. CreateTable(
  1815. "bbsf.Workflow",
  1816. c => new
  1817. {
  1818. ID = c.Int(nullable: false, identity: true),
  1819. SysName = c.String(nullable: false, maxLength: 100),
  1820. NameEN = c.String(nullable: false, maxLength: 255),
  1821. NameAR = c.String(nullable: false, maxLength: 255),
  1822. DescriptionEN = c.String(maxLength: 1000),
  1823. DescriptionAR = c.String(maxLength: 1000),
  1824. IsActive = c.Boolean(nullable: false),
  1825. Created = c.DateTime(nullable: false),
  1826. Modified = c.DateTime(nullable: false),
  1827. CreatedBy = c.String(nullable: false, maxLength: 256),
  1828. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1829. })
  1830. .PrimaryKey(t => t.ID)
  1831. .Index(t => t.SysName, unique: true);
  1832.  
  1833. CreateTable(
  1834. "bbsf.Participant",
  1835. c => new
  1836. {
  1837. ID = c.Int(nullable: false, identity: true),
  1838. DescriptionEN = c.String(),
  1839. DescriptionAR = c.String(),
  1840. Created = c.DateTime(nullable: false),
  1841. Modified = c.DateTime(nullable: false),
  1842. CreatedBy = c.String(nullable: false, maxLength: 256),
  1843. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1844. ParticipantTypeItemID = c.Int(nullable: false),
  1845. WorkflowActivityID = c.Int(),
  1846. CorrelationID = c.Guid(nullable: false),
  1847. PermissionSetID = c.Int(),
  1848. UserID = c.Int(),
  1849. WorkflowVariableID = c.Int(),
  1850. })
  1851. .PrimaryKey(t => t.ID)
  1852. .ForeignKey("bbsf.WorkflowActivity", t => t.WorkflowActivityID)
  1853. .ForeignKey("bbsf.LookupItem", t => t.ParticipantTypeItemID)
  1854. .ForeignKey("bbsf.PermissionSet", t => t.PermissionSetID)
  1855. .ForeignKey("bbsf.User", t => t.UserID)
  1856. .ForeignKey("bbsf.WorkflowVariable", t => t.WorkflowVariableID)
  1857. .Index(t => t.ParticipantTypeItemID)
  1858. .Index(t => t.WorkflowActivityID)
  1859. .Index(t => t.PermissionSetID)
  1860. .Index(t => t.UserID)
  1861. .Index(t => t.WorkflowVariableID);
  1862.  
  1863. CreateTable(
  1864. "dbo.BrainstormingSession_Element",
  1865. c => new
  1866. {
  1867. ID = c.Int(nullable: false, identity: true),
  1868. BrainstormingSessionID = c.Int(nullable: false),
  1869. ElementID = c.Int(nullable: false),
  1870. ToolID = c.Int(nullable: false),
  1871. Value = c.String(),
  1872. Created = c.DateTime(nullable: false),
  1873. Modified = c.DateTime(nullable: false),
  1874. CreatedBy = c.String(nullable: false, maxLength: 256),
  1875. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1876. })
  1877. .PrimaryKey(t => t.ID)
  1878. .ForeignKey("dbo.BrainstormingSession", t => t.BrainstormingSessionID)
  1879. .ForeignKey("dbo.Element", t => t.ElementID)
  1880. .ForeignKey("dbo.Tool", t => t.ToolID)
  1881. .Index(t => t.BrainstormingSessionID)
  1882. .Index(t => t.ElementID)
  1883. .Index(t => t.ToolID);
  1884.  
  1885. CreateTable(
  1886. "dbo.BrainstormingSession",
  1887. c => new
  1888. {
  1889. ID = c.Int(nullable: false, identity: true),
  1890. TitleEN = c.String(nullable: false, maxLength: 255),
  1891. TitleAR = c.String(nullable: false, maxLength: 255),
  1892. DescriptionEN = c.String(),
  1893. DescriptionAR = c.String(),
  1894. ToolID = c.Int(nullable: false),
  1895. UserID = c.Int(nullable: false),
  1896. Created = c.DateTime(nullable: false),
  1897. Modified = c.DateTime(nullable: false),
  1898. CreatedBy = c.String(nullable: false, maxLength: 256),
  1899. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1900. IsDeleted = c.Boolean(nullable: false),
  1901. })
  1902. .PrimaryKey(t => t.ID)
  1903. .ForeignKey("dbo.Tool", t => t.ToolID)
  1904. .ForeignKey("bbsf.User", t => t.UserID)
  1905. .Index(t => t.ToolID)
  1906. .Index(t => t.UserID);
  1907.  
  1908. CreateTable(
  1909. "dbo.BrainstormingSession_ToolPerspectiveElement",
  1910. c => new
  1911. {
  1912. ID = c.Int(nullable: false, identity: true),
  1913. BrainstormingSessionID = c.Int(nullable: false),
  1914. ElementID = c.Int(nullable: false),
  1915. ToolID = c.Int(nullable: false),
  1916. ToolPerspectiveID = c.Int(nullable: false),
  1917. Value = c.String(),
  1918. Created = c.DateTime(nullable: false),
  1919. Modified = c.DateTime(nullable: false),
  1920. CreatedBy = c.String(nullable: false, maxLength: 256),
  1921. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1922. })
  1923. .PrimaryKey(t => t.ID)
  1924. .ForeignKey("dbo.BrainstormingSession", t => t.BrainstormingSessionID)
  1925. .ForeignKey("dbo.Element", t => t.ElementID)
  1926. .ForeignKey("dbo.Tool", t => t.ToolID)
  1927. .ForeignKey("dbo.ToolPerspective", t => t.ToolPerspectiveID)
  1928. .Index(t => t.BrainstormingSessionID)
  1929. .Index(t => t.ElementID)
  1930. .Index(t => t.ToolID)
  1931. .Index(t => t.ToolPerspectiveID);
  1932.  
  1933. CreateTable(
  1934. "dbo.Element",
  1935. c => new
  1936. {
  1937. ID = c.Int(nullable: false, identity: true),
  1938. NameEN = c.String(nullable: false, maxLength: 255),
  1939. NameAR = c.String(nullable: false, maxLength: 255),
  1940. DescriptionEN = c.String(),
  1941. DescriptionAR = c.String(),
  1942. ToolID = c.Int(nullable: false),
  1943. DisplayOrder = c.Int(nullable: false),
  1944. Created = c.DateTime(nullable: false),
  1945. Modified = c.DateTime(nullable: false),
  1946. CreatedBy = c.String(nullable: false, maxLength: 256),
  1947. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1948. })
  1949. .PrimaryKey(t => t.ID)
  1950. .ForeignKey("dbo.Tool", t => t.ToolID)
  1951. .Index(t => t.ToolID);
  1952.  
  1953. CreateTable(
  1954. "dbo.SessionInstance_Element",
  1955. c => new
  1956. {
  1957. ID = c.Int(nullable: false, identity: true),
  1958. SessionInstanceID = c.Int(nullable: false),
  1959. ElementID = c.Int(nullable: false),
  1960. ToolID = c.Int(nullable: false),
  1961. Value = c.String(),
  1962. Created = c.DateTime(nullable: false),
  1963. Modified = c.DateTime(nullable: false),
  1964. CreatedBy = c.String(nullable: false, maxLength: 256),
  1965. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1966. })
  1967. .PrimaryKey(t => t.ID)
  1968. .ForeignKey("dbo.Element", t => t.ElementID)
  1969. .ForeignKey("dbo.SessionInstance", t => t.SessionInstanceID)
  1970. .ForeignKey("dbo.Tool", t => t.ToolID)
  1971. .Index(t => t.SessionInstanceID)
  1972. .Index(t => t.ElementID)
  1973. .Index(t => t.ToolID);
  1974.  
  1975. CreateTable(
  1976. "dbo.SessionInstance",
  1977. c => new
  1978. {
  1979. ID = c.Int(nullable: false, identity: true),
  1980. SessionID = c.Int(nullable: false),
  1981. InnovationLabID = c.Int(nullable: false),
  1982. Created = c.DateTime(nullable: false),
  1983. Modified = c.DateTime(nullable: false),
  1984. CreatedBy = c.String(nullable: false, maxLength: 256),
  1985. ModifiedBy = c.String(nullable: false, maxLength: 256),
  1986. IsDeleted = c.Boolean(nullable: false),
  1987. })
  1988. .PrimaryKey(t => t.ID)
  1989. .ForeignKey("dbo.InnovationLab", t => t.InnovationLabID)
  1990. .ForeignKey("dbo.Session", t => t.SessionID)
  1991. .Index(t => t.SessionID)
  1992. .Index(t => t.InnovationLabID);
  1993.  
  1994. CreateTable(
  1995. "dbo.Session",
  1996. c => new
  1997. {
  1998. ID = c.Int(nullable: false, identity: true),
  1999. TitleEN = c.String(nullable: false, maxLength: 255),
  2000. TitleAR = c.String(nullable: false, maxLength: 255),
  2001. DescriptionEN = c.String(),
  2002. DescriptionAR = c.String(),
  2003. DisplayOrder = c.Int(nullable: false),
  2004. CategoryTypeID = c.Int(),
  2005. Visible = c.Boolean(nullable: false),
  2006. Created = c.DateTime(nullable: false),
  2007. Modified = c.DateTime(nullable: false),
  2008. CreatedBy = c.String(nullable: false, maxLength: 256),
  2009. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2010. })
  2011. .PrimaryKey(t => t.ID)
  2012. .ForeignKey("bbsf.LookupItem", t => t.CategoryTypeID)
  2013. .Index(t => t.CategoryTypeID);
  2014.  
  2015. CreateTable(
  2016. "dbo.Session_Tool",
  2017. c => new
  2018. {
  2019. ID = c.Int(nullable: false, identity: true),
  2020. SessionID = c.Int(nullable: false),
  2021. ToolID = c.Int(nullable: false),
  2022. Hours = c.Int(nullable: false),
  2023. Minutes = c.Int(nullable: false),
  2024. })
  2025. .PrimaryKey(t => t.ID)
  2026. .ForeignKey("dbo.Session", t => t.SessionID)
  2027. .ForeignKey("dbo.Tool", t => t.ToolID)
  2028. .Index(t => t.SessionID)
  2029. .Index(t => t.ToolID);
  2030.  
  2031. CreateTable(
  2032. "dbo.Tool",
  2033. c => new
  2034. {
  2035. ID = c.Int(nullable: false, identity: true),
  2036. NameEN = c.String(nullable: false, maxLength: 255),
  2037. NameAR = c.String(nullable: false, maxLength: 255),
  2038. DescriptionEN = c.String(),
  2039. DescriptionAR = c.String(),
  2040. HowToUseEN = c.String(nullable: false, maxLength: 1000),
  2041. HowToUseAR = c.String(nullable: false, maxLength: 1000),
  2042. CategoryTypeID = c.Int(nullable: false),
  2043. SuggestedTimeItemID = c.Int(),
  2044. LevelofDifficultyItemID = c.Int(),
  2045. ToolTypeItemID = c.Int(),
  2046. RowsCount = c.Int(nullable: false),
  2047. ColumnsCount = c.Int(nullable: false),
  2048. RequiredAmount = c.Int(nullable: false),
  2049. RewardingPoints = c.Int(nullable: false),
  2050. DisplayOrder = c.Int(nullable: false),
  2051. MaterialsNeededEN = c.String(maxLength: 512),
  2052. MaterialsNeededAR = c.String(maxLength: 512),
  2053. ParticipantsEN = c.String(maxLength: 1000),
  2054. ParticipantsAR = c.String(maxLength: 1000),
  2055. Visible = c.Boolean(nullable: false),
  2056. Created = c.DateTime(nullable: false),
  2057. Modified = c.DateTime(nullable: false),
  2058. CreatedBy = c.String(nullable: false, maxLength: 256),
  2059. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2060. })
  2061. .PrimaryKey(t => t.ID)
  2062. .ForeignKey("bbsf.LookupItem", t => t.CategoryTypeID)
  2063. .ForeignKey("bbsf.LookupItem", t => t.LevelofDifficultyItemID)
  2064. .ForeignKey("bbsf.LookupItem", t => t.SuggestedTimeItemID)
  2065. .ForeignKey("bbsf.LookupItem", t => t.ToolTypeItemID)
  2066. .Index(t => t.CategoryTypeID)
  2067. .Index(t => t.SuggestedTimeItemID)
  2068. .Index(t => t.LevelofDifficultyItemID)
  2069. .Index(t => t.ToolTypeItemID);
  2070.  
  2071. CreateTable(
  2072. "dbo.ToolPerspective",
  2073. c => new
  2074. {
  2075. ID = c.Int(nullable: false, identity: true),
  2076. ToolID = c.Int(nullable: false),
  2077. NameEN = c.String(nullable: false, maxLength: 255),
  2078. NameAR = c.String(nullable: false, maxLength: 255),
  2079. DescriptionEN = c.String(),
  2080. DescriptionAR = c.String(),
  2081. Visible = c.Boolean(nullable: false),
  2082. Created = c.DateTime(nullable: false),
  2083. Modified = c.DateTime(nullable: false),
  2084. CreatedBy = c.String(nullable: false, maxLength: 256),
  2085. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2086. })
  2087. .PrimaryKey(t => t.ID)
  2088. .ForeignKey("dbo.Tool", t => t.ToolID)
  2089. .Index(t => t.ToolID);
  2090.  
  2091. CreateTable(
  2092. "dbo.SessionInstance_ToolPerspectiveElement",
  2093. c => new
  2094. {
  2095. ID = c.Int(nullable: false, identity: true),
  2096. SessionInstanceID = c.Int(nullable: false),
  2097. ElementID = c.Int(nullable: false),
  2098. ToolID = c.Int(nullable: false),
  2099. ToolPerspectiveID = c.Int(nullable: false),
  2100. Value = c.String(),
  2101. Created = c.DateTime(nullable: false),
  2102. Modified = c.DateTime(nullable: false),
  2103. CreatedBy = c.String(nullable: false, maxLength: 256),
  2104. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2105. })
  2106. .PrimaryKey(t => t.ID)
  2107. .ForeignKey("dbo.Element", t => t.ElementID)
  2108. .ForeignKey("dbo.SessionInstance", t => t.SessionInstanceID)
  2109. .ForeignKey("dbo.Tool", t => t.ToolID)
  2110. .ForeignKey("dbo.ToolPerspective", t => t.ToolPerspectiveID)
  2111. .Index(t => t.SessionInstanceID)
  2112. .Index(t => t.ElementID)
  2113. .Index(t => t.ToolID)
  2114. .Index(t => t.ToolPerspectiveID);
  2115.  
  2116. CreateTable(
  2117. "bbsf.BTimeZone",
  2118. c => new
  2119. {
  2120. ID = c.Int(nullable: false, identity: true),
  2121. NameEN = c.String(nullable: false, maxLength: 100),
  2122. NameAR = c.String(nullable: false, maxLength: 100),
  2123. DotNetId = c.String(nullable: false, maxLength: 50),
  2124. })
  2125. .PrimaryKey(t => t.ID);
  2126.  
  2127. CreateTable(
  2128. "dbo.CaseStudy",
  2129. c => new
  2130. {
  2131. ID = c.Int(nullable: false, identity: true),
  2132. TitleEN = c.String(nullable: false, maxLength: 255),
  2133. TitleAR = c.String(nullable: false, maxLength: 255),
  2134. DescriptionEN = c.String(),
  2135. DescriptionAR = c.String(),
  2136. SummaryEN = c.String(nullable: false, maxLength: 255),
  2137. SummaryAR = c.String(nullable: false, maxLength: 255),
  2138. IdeaAR = c.String(nullable: false, maxLength: 255),
  2139. IdeaEN = c.String(nullable: false, maxLength: 255),
  2140. ResultAR = c.String(nullable: false, maxLength: 255),
  2141. ResultsEN = c.String(nullable: false, maxLength: 255),
  2142. FileID = c.Guid(),
  2143. CategoryItemID = c.Int(nullable: false),
  2144. DisplayOrder = c.Int(nullable: false),
  2145. Visible = c.Boolean(nullable: false),
  2146. Created = c.DateTime(nullable: false),
  2147. Modified = c.DateTime(nullable: false),
  2148. CreatedBy = c.String(nullable: false, maxLength: 256),
  2149. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2150. })
  2151. .PrimaryKey(t => t.ID)
  2152. .ForeignKey("bbsf.LookupItem", t => t.CategoryItemID)
  2153. .Index(t => t.CategoryItemID);
  2154.  
  2155. CreateTable(
  2156. "dbo.CaseStudyCommentReport",
  2157. c => new
  2158. {
  2159. ID = c.Int(nullable: false, identity: true),
  2160. ReportingComment = c.String(),
  2161. IsDeleted = c.Boolean(nullable: false),
  2162. CreatedBy = c.String(nullable: false, maxLength: 256),
  2163. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2164. Created = c.DateTime(nullable: false),
  2165. Modified = c.DateTime(nullable: false),
  2166. CaseStudyCommentID = c.Int(nullable: false),
  2167. UserID = c.Int(nullable: false),
  2168. })
  2169. .PrimaryKey(t => t.ID)
  2170. .ForeignKey("dbo.CaseStudyComment", t => t.CaseStudyCommentID)
  2171. .ForeignKey("bbsf.User", t => t.UserID)
  2172. .Index(t => t.CaseStudyCommentID)
  2173. .Index(t => t.UserID);
  2174.  
  2175. CreateTable(
  2176. "dbo.CaseStudyComment",
  2177. c => new
  2178. {
  2179. ID = c.Int(nullable: false, identity: true),
  2180. CaseStudyID = c.Int(nullable: false),
  2181. UserID = c.Int(nullable: false),
  2182. ParentCommentID = c.Int(),
  2183. Value = c.String(),
  2184. Created = c.DateTime(nullable: false),
  2185. Modified = c.DateTime(nullable: false),
  2186. CreatedBy = c.String(nullable: false, maxLength: 256),
  2187. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2188. IsDeleted = c.Boolean(nullable: false),
  2189. })
  2190. .PrimaryKey(t => t.ID)
  2191. .ForeignKey("dbo.CaseStudy", t => t.CaseStudyID)
  2192. .ForeignKey("dbo.CaseStudyComment", t => t.ParentCommentID)
  2193. .ForeignKey("bbsf.User", t => t.UserID)
  2194. .Index(t => t.CaseStudyID)
  2195. .Index(t => t.UserID)
  2196. .Index(t => t.ParentCommentID);
  2197.  
  2198. CreateTable(
  2199. "dbo.ChallengeCommentReport",
  2200. c => new
  2201. {
  2202. ID = c.Int(nullable: false, identity: true),
  2203. ReportingComment = c.String(),
  2204. IsDeleted = c.Boolean(nullable: false),
  2205. CreatedBy = c.String(nullable: false, maxLength: 256),
  2206. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2207. Created = c.DateTime(nullable: false),
  2208. Modified = c.DateTime(nullable: false),
  2209. ChallengeCommentID = c.Int(nullable: false),
  2210. UserID = c.Int(nullable: false),
  2211. })
  2212. .PrimaryKey(t => t.ID)
  2213. .ForeignKey("dbo.ChallengeComment", t => t.ChallengeCommentID)
  2214. .ForeignKey("bbsf.User", t => t.UserID)
  2215. .Index(t => t.ChallengeCommentID)
  2216. .Index(t => t.UserID);
  2217.  
  2218. CreateTable(
  2219. "dbo.ChallengeComment",
  2220. c => new
  2221. {
  2222. ID = c.Int(nullable: false, identity: true),
  2223. ChallengeID = c.Int(nullable: false),
  2224. UserID = c.Int(nullable: false),
  2225. ParentCommentID = c.Int(),
  2226. Value = c.String(),
  2227. Created = c.DateTime(nullable: false),
  2228. Modified = c.DateTime(nullable: false),
  2229. CreatedBy = c.String(nullable: false, maxLength: 256),
  2230. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2231. IsDeleted = c.Boolean(nullable: false),
  2232. })
  2233. .PrimaryKey(t => t.ID)
  2234. .ForeignKey("dbo.Challenge", t => t.ChallengeID)
  2235. .ForeignKey("dbo.ChallengeComment", t => t.ParentCommentID)
  2236. .ForeignKey("bbsf.User", t => t.UserID)
  2237. .Index(t => t.ChallengeID)
  2238. .Index(t => t.UserID)
  2239. .Index(t => t.ParentCommentID);
  2240.  
  2241. CreateTable(
  2242. "dbo.Chapter",
  2243. c => new
  2244. {
  2245. ID = c.Int(nullable: false, identity: true),
  2246. TitleEN = c.String(nullable: false, maxLength: 255),
  2247. TitleAR = c.String(nullable: false, maxLength: 255),
  2248. DescriptionEN = c.String(),
  2249. DescriptionAR = c.String(),
  2250. ModuleID = c.Int(nullable: false),
  2251. DisplayOrder = c.Int(nullable: false),
  2252. Created = c.DateTime(nullable: false),
  2253. Modified = c.DateTime(nullable: false),
  2254. CreatedBy = c.String(nullable: false, maxLength: 256),
  2255. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2256. })
  2257. .PrimaryKey(t => t.ID)
  2258. .ForeignKey("dbo.Module", t => t.ModuleID)
  2259. .Index(t => t.ModuleID);
  2260.  
  2261. CreateTable(
  2262. "dbo.Module",
  2263. c => new
  2264. {
  2265. ID = c.Int(nullable: false, identity: true),
  2266. TitleEN = c.String(nullable: false, maxLength: 255),
  2267. TitleAR = c.String(nullable: false, maxLength: 255),
  2268. DescriptionEN = c.String(),
  2269. DescriptionAR = c.String(),
  2270. objectiveEN = c.String(nullable: false, maxLength: 1000),
  2271. objectiveAR = c.String(nullable: false, maxLength: 1000),
  2272. ImageID = c.Guid(nullable: false),
  2273. Visible = c.Boolean(nullable: false),
  2274. DisplayOrder = c.Int(nullable: false),
  2275. Created = c.DateTime(nullable: false),
  2276. Modified = c.DateTime(nullable: false),
  2277. CreatedBy = c.String(nullable: false, maxLength: 256),
  2278. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2279. })
  2280. .PrimaryKey(t => t.ID);
  2281.  
  2282. CreateTable(
  2283. "dbo.ModuleTopic",
  2284. c => new
  2285. {
  2286. ID = c.Int(nullable: false, identity: true),
  2287. QuestionEN = c.String(nullable: false, maxLength: 1000),
  2288. QuestionAR = c.String(nullable: false, maxLength: 1000),
  2289. AnswerEN = c.String(nullable: false, maxLength: 1000),
  2290. AnswerAR = c.String(nullable: false, maxLength: 1000),
  2291. DescriptionEN = c.String(),
  2292. DescriptionAR = c.String(),
  2293. ChapterID = c.Int(nullable: false),
  2294. Visible = c.Boolean(nullable: false),
  2295. DisplayOrder = c.Int(nullable: false),
  2296. Created = c.DateTime(nullable: false),
  2297. Modified = c.DateTime(nullable: false),
  2298. CreatedBy = c.String(nullable: false, maxLength: 256),
  2299. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2300. })
  2301. .PrimaryKey(t => t.ID)
  2302. .ForeignKey("dbo.Chapter", t => t.ChapterID)
  2303. .Index(t => t.ChapterID);
  2304.  
  2305. CreateTable(
  2306. "bbsf.Country",
  2307. c => new
  2308. {
  2309. ID = c.Int(nullable: false, identity: true),
  2310. NameEN = c.String(nullable: false, maxLength: 50),
  2311. NameAR = c.String(nullable: false, maxLength: 50),
  2312. Code = c.String(nullable: false, maxLength: 2),
  2313. TelCode = c.String(nullable: false, maxLength: 4),
  2314. })
  2315. .PrimaryKey(t => t.ID);
  2316.  
  2317. CreateTable(
  2318. "dbo.DraftIdea",
  2319. c => new
  2320. {
  2321. ID = c.Int(nullable: false, identity: true),
  2322. IdeaID = c.Int(nullable: false),
  2323. IdeaFieldID = c.Int(),
  2324. IdeaFieldValues = c.String(),
  2325. Created = c.DateTime(nullable: false),
  2326. Modified = c.DateTime(nullable: false),
  2327. CreatedBy = c.String(nullable: false, maxLength: 256),
  2328. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2329. })
  2330. .PrimaryKey(t => t.ID);
  2331.  
  2332. CreateTable(
  2333. "bbsf.FormsHubConnection",
  2334. c => new
  2335. {
  2336. ID = c.Int(nullable: false, identity: true),
  2337. UserId = c.Int(nullable: false),
  2338. ConnectionId = c.String(maxLength: 256),
  2339. ObjectId = c.String(maxLength: 256),
  2340. ObjectName = c.String(maxLength: 256),
  2341. Created = c.DateTime(nullable: false),
  2342. Modified = c.DateTime(nullable: false),
  2343. CreatedBy = c.String(nullable: false, maxLength: 256),
  2344. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2345. })
  2346. .PrimaryKey(t => t.ID)
  2347. .ForeignKey("bbsf.User", t => t.UserId)
  2348. .Index(t => t.UserId);
  2349.  
  2350. CreateTable(
  2351. "dbo.IdeaWFMapping",
  2352. c => new
  2353. {
  2354. ID = c.Int(nullable: false, identity: true),
  2355. IdeaStatusID = c.Int(nullable: false),
  2356. WFActivitySysName = c.String(),
  2357. WFOutcomeSysName = c.String(),
  2358. Created = c.DateTime(nullable: false),
  2359. Modified = c.DateTime(nullable: false),
  2360. CreatedBy = c.String(nullable: false, maxLength: 256),
  2361. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2362. })
  2363. .PrimaryKey(t => t.ID)
  2364. .ForeignKey("bbsf.LookupItem", t => t.IdeaStatusID)
  2365. .Index(t => t.IdeaStatusID);
  2366.  
  2367. CreateTable(
  2368. "dbo.Invoice",
  2369. c => new
  2370. {
  2371. ID = c.Int(nullable: false, identity: true),
  2372. Code = c.String(nullable: false, maxLength: 255),
  2373. CreatedBy = c.String(nullable: false, maxLength: 256),
  2374. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2375. Created = c.DateTime(nullable: false),
  2376. Modified = c.DateTime(nullable: false),
  2377. IsDeleted = c.Boolean(nullable: false),
  2378. Ammount = c.Double(nullable: false),
  2379. InvoiceStatusItemID = c.Int(nullable: false),
  2380. InvoiceCurrencyItemID = c.Int(nullable: false),
  2381. MilestoneID = c.Int(),
  2382. ProjectID = c.Int(nullable: false),
  2383. CorrelationID = c.Guid(),
  2384. })
  2385. .PrimaryKey(t => t.ID)
  2386. .ForeignKey("bbsf.LookupItem", t => t.InvoiceCurrencyItemID)
  2387. .ForeignKey("bbsf.LookupItem", t => t.InvoiceStatusItemID)
  2388. .ForeignKey("dbo.Milestone", t => t.MilestoneID)
  2389. .ForeignKey("dbo.Project", t => t.ProjectID)
  2390. .Index(t => t.InvoiceStatusItemID)
  2391. .Index(t => t.InvoiceCurrencyItemID)
  2392. .Index(t => t.MilestoneID)
  2393. .Index(t => t.ProjectID);
  2394.  
  2395. CreateTable(
  2396. "dbo.LibraryResource",
  2397. c => new
  2398. {
  2399. ID = c.Int(nullable: false, identity: true),
  2400. TitleEN = c.String(nullable: false, maxLength: 255),
  2401. TitleAR = c.String(nullable: false, maxLength: 255),
  2402. DescriptionEN = c.String(),
  2403. DescriptionAR = c.String(),
  2404. CategoryTypeID = c.Int(nullable: false),
  2405. ImageID = c.Guid(nullable: false),
  2406. FileID = c.Guid(nullable: false),
  2407. Visible = c.Boolean(nullable: false),
  2408. DisplayOrder = c.Int(nullable: false),
  2409. Created = c.DateTime(nullable: false),
  2410. Modified = c.DateTime(nullable: false),
  2411. CreatedBy = c.String(nullable: false, maxLength: 256),
  2412. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2413. })
  2414. .PrimaryKey(t => t.ID)
  2415. .ForeignKey("bbsf.LookupItem", t => t.CategoryTypeID)
  2416. .Index(t => t.CategoryTypeID);
  2417.  
  2418. CreateTable(
  2419. "dbo.Localization",
  2420. c => new
  2421. {
  2422. pk = c.Int(nullable: false, identity: true),
  2423. ResourceId = c.String(nullable: false, maxLength: 1024),
  2424. Value = c.String(),
  2425. LocaleId = c.String(maxLength: 10),
  2426. ResourceSet = c.String(maxLength: 512),
  2427. Type = c.String(maxLength: 512),
  2428. BinFile = c.Binary(),
  2429. TextFile = c.String(),
  2430. Filename = c.String(maxLength: 128),
  2431. Comment = c.String(maxLength: 512),
  2432. ValueType = c.Int(nullable: false),
  2433. Updated = c.DateTime(nullable: false),
  2434. IsWentToProduction = c.Boolean(nullable: false),
  2435. WentToProductionDate = c.DateTime(),
  2436. CreatedBy = c.String(nullable: false, maxLength: 256),
  2437. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2438. Created = c.DateTime(nullable: false),
  2439. Modified = c.DateTime(nullable: false),
  2440. })
  2441. .PrimaryKey(t => t.pk);
  2442.  
  2443. CreateTable(
  2444. "dbo.NotificationClientUser",
  2445. c => new
  2446. {
  2447. NotificationID = c.Int(nullable: false),
  2448. ClientUserID = c.Int(nullable: false),
  2449. Seen = c.Boolean(nullable: false),
  2450. })
  2451. .PrimaryKey(t => new { t.NotificationID, t.ClientUserID })
  2452. .ForeignKey("dbo.Notification", t => t.NotificationID)
  2453. .ForeignKey("bbsf.User", t => t.ClientUserID)
  2454. .Index(t => t.NotificationID)
  2455. .Index(t => t.ClientUserID);
  2456.  
  2457. CreateTable(
  2458. "dbo.Notification",
  2459. c => new
  2460. {
  2461. ID = c.Int(nullable: false, identity: true),
  2462. Created = c.DateTime(nullable: false),
  2463. Modified = c.DateTime(nullable: false),
  2464. CreatedBy = c.String(nullable: false, maxLength: 256),
  2465. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2466. NotificationAR = c.String(),
  2467. NotificationEN = c.String(),
  2468. URL = c.String(),
  2469. IdeaID = c.Int(),
  2470. })
  2471. .PrimaryKey(t => t.ID)
  2472. .ForeignKey("dbo.Idea", t => t.IdeaID)
  2473. .Index(t => t.IdeaID);
  2474.  
  2475. CreateTable(
  2476. "dbo.SignalRConnection",
  2477. c => new
  2478. {
  2479. ID = c.Int(nullable: false, identity: true),
  2480. UserId = c.Int(nullable: false),
  2481. ConnectionId = c.String(),
  2482. Agent = c.String(),
  2483. IsOnline = c.Boolean(nullable: false),
  2484. })
  2485. .PrimaryKey(t => t.ID);
  2486.  
  2487. CreateTable(
  2488. "dbo.TopicCategory",
  2489. c => new
  2490. {
  2491. ID = c.Int(nullable: false, identity: true),
  2492. NameEN = c.String(nullable: false, maxLength: 255),
  2493. NameAR = c.String(nullable: false, maxLength: 255),
  2494. DescriptionEN = c.String(),
  2495. DescriptionAR = c.String(),
  2496. ImageGuidID = c.Guid(),
  2497. Created = c.DateTime(nullable: false),
  2498. Modified = c.DateTime(nullable: false),
  2499. CreatedBy = c.String(nullable: false, maxLength: 256),
  2500. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2501. })
  2502. .PrimaryKey(t => t.ID);
  2503.  
  2504. CreateTable(
  2505. "dbo.Topic",
  2506. c => new
  2507. {
  2508. ID = c.Int(nullable: false, identity: true),
  2509. TopicEN = c.String(nullable: false, maxLength: 1000),
  2510. TopicAR = c.String(nullable: false, maxLength: 1000),
  2511. DescriptionEN = c.String(),
  2512. DescriptionAR = c.String(),
  2513. CategoryID = c.Int(nullable: false),
  2514. Visible = c.Boolean(nullable: false),
  2515. IsAdmin = c.Boolean(nullable: false),
  2516. DisplayOrder = c.Int(nullable: false),
  2517. Created = c.DateTime(nullable: false),
  2518. Modified = c.DateTime(nullable: false),
  2519. CreatedBy = c.String(nullable: false, maxLength: 256),
  2520. ModifiedBy = c.String(nullable: false, maxLength: 256),
  2521. })
  2522. .PrimaryKey(t => t.ID)
  2523. .ForeignKey("dbo.TopicCategory", t => t.CategoryID)
  2524. .Index(t => t.CategoryID);
  2525.  
  2526. CreateTable(
  2527. "dbo.UserMenu",
  2528. c => new
  2529. {
  2530. ID = c.Int(nullable: false),
  2531. NameEN = c.String(),
  2532. NameAR = c.String(),
  2533. IconUrl = c.String(),
  2534. Url = c.String(),
  2535. ControllerFullName = c.String(),
  2536. Order = c.Int(nullable: false),
  2537. CssClass = c.String(),
  2538. Visible = c.Boolean(nullable: false),
  2539. })
  2540. .PrimaryKey(t => t.ID);
  2541.  
  2542. CreateTable(
  2543. "bbsf.PermissionSet_Permission",
  2544. c => new
  2545. {
  2546. PermissionSetID = c.Int(nullable: false),
  2547. PermissionID = c.Int(nullable: false),
  2548. })
  2549. .PrimaryKey(t => new { t.PermissionSetID, t.PermissionID })
  2550. .ForeignKey("bbsf.PermissionSet", t => t.PermissionSetID)
  2551. .ForeignKey("bbsf.Permission", t => t.PermissionID)
  2552. .Index(t => t.PermissionSetID)
  2553. .Index(t => t.PermissionID);
  2554.  
  2555. CreateTable(
  2556. "bbsf.PermissionSet_User",
  2557. c => new
  2558. {
  2559. PermissionSetID = c.Int(nullable: false),
  2560. UserID = c.Int(nullable: false),
  2561. })
  2562. .PrimaryKey(t => new { t.PermissionSetID, t.UserID })
  2563. .ForeignKey("bbsf.PermissionSet", t => t.PermissionSetID)
  2564. .ForeignKey("bbsf.User", t => t.UserID)
  2565. .Index(t => t.PermissionSetID)
  2566. .Index(t => t.UserID);
  2567.  
  2568. CreateTable(
  2569. "bbsf.ChatMessage_SeenBy",
  2570. c => new
  2571. {
  2572. UserID = c.Int(nullable: false),
  2573. ChatMessageID = c.Int(nullable: false),
  2574. })
  2575. .PrimaryKey(t => new { t.UserID, t.ChatMessageID })
  2576. .ForeignKey("bbsf.ChatMessage", t => t.UserID)
  2577. .ForeignKey("bbsf.User", t => t.ChatMessageID)
  2578. .Index(t => t.UserID)
  2579. .Index(t => t.ChatMessageID);
  2580.  
  2581. CreateTable(
  2582. "dbo.TagIdea",
  2583. c => new
  2584. {
  2585. Tag_ID = c.Int(nullable: false),
  2586. Idea_ID = c.Int(nullable: false),
  2587. })
  2588. .PrimaryKey(t => new { t.Tag_ID, t.Idea_ID })
  2589. .ForeignKey("dbo.Tag", t => t.Tag_ID)
  2590. .ForeignKey("dbo.Idea", t => t.Idea_ID)
  2591. .Index(t => t.Tag_ID)
  2592. .Index(t => t.Idea_ID);
  2593.  
  2594. CreateTable(
  2595. "dbo.TitleTag",
  2596. c => new
  2597. {
  2598. Title_ID = c.Int(nullable: false),
  2599. Tag_ID = c.Int(nullable: false),
  2600. })
  2601. .PrimaryKey(t => new { t.Title_ID, t.Tag_ID })
  2602. .ForeignKey("dbo.Title", t => t.Title_ID)
  2603. .ForeignKey("dbo.Tag", t => t.Tag_ID)
  2604. .Index(t => t.Title_ID)
  2605. .Index(t => t.Tag_ID);
  2606.  
  2607. CreateTable(
  2608. "bbsf.WorkflowInstanceVariable_VariableLookup",
  2609. c => new
  2610. {
  2611. VariableLookupID = c.Int(nullable: false),
  2612. InstanceVariableID = c.Int(nullable: false),
  2613. })
  2614. .PrimaryKey(t => new { t.VariableLookupID, t.InstanceVariableID })
  2615. .ForeignKey("bbsf.WorkflowInstanceVariable", t => t.VariableLookupID)
  2616. .ForeignKey("bbsf.WorkflowVariableLookup", t => t.InstanceVariableID)
  2617. .Index(t => t.VariableLookupID)
  2618. .Index(t => t.InstanceVariableID);
  2619.  
  2620. }
  2621.  
  2622. public override void Down()
  2623. {
  2624. DropForeignKey("dbo.Topic", "CategoryID", "dbo.TopicCategory");
  2625. DropForeignKey("dbo.NotificationClientUser", "ClientUserID", "bbsf.User");
  2626. DropForeignKey("dbo.NotificationClientUser", "NotificationID", "dbo.Notification");
  2627. DropForeignKey("dbo.Notification", "IdeaID", "dbo.Idea");
  2628. DropForeignKey("dbo.LibraryResource", "CategoryTypeID", "bbsf.LookupItem");
  2629. DropForeignKey("dbo.Invoice", "ProjectID", "dbo.Project");
  2630. DropForeignKey("dbo.Invoice", "MilestoneID", "dbo.Milestone");
  2631. DropForeignKey("dbo.Invoice", "InvoiceStatusItemID", "bbsf.LookupItem");
  2632. DropForeignKey("dbo.Invoice", "InvoiceCurrencyItemID", "bbsf.LookupItem");
  2633. DropForeignKey("dbo.IdeaWFMapping", "IdeaStatusID", "bbsf.LookupItem");
  2634. DropForeignKey("bbsf.FormsHubConnection", "UserId", "bbsf.User");
  2635. DropForeignKey("dbo.ModuleTopic", "ChapterID", "dbo.Chapter");
  2636. DropForeignKey("dbo.Chapter", "ModuleID", "dbo.Module");
  2637. DropForeignKey("dbo.ChallengeCommentReport", "UserID", "bbsf.User");
  2638. DropForeignKey("dbo.ChallengeCommentReport", "ChallengeCommentID", "dbo.ChallengeComment");
  2639. DropForeignKey("dbo.ChallengeComment", "UserID", "bbsf.User");
  2640. DropForeignKey("dbo.ChallengeComment", "ParentCommentID", "dbo.ChallengeComment");
  2641. DropForeignKey("dbo.ChallengeComment", "ChallengeID", "dbo.Challenge");
  2642. DropForeignKey("dbo.CaseStudyCommentReport", "UserID", "bbsf.User");
  2643. DropForeignKey("dbo.CaseStudyCommentReport", "CaseStudyCommentID", "dbo.CaseStudyComment");
  2644. DropForeignKey("dbo.CaseStudyComment", "UserID", "bbsf.User");
  2645. DropForeignKey("dbo.CaseStudyComment", "ParentCommentID", "dbo.CaseStudyComment");
  2646. DropForeignKey("dbo.CaseStudyComment", "CaseStudyID", "dbo.CaseStudy");
  2647. DropForeignKey("dbo.CaseStudy", "CategoryItemID", "bbsf.LookupItem");
  2648. DropForeignKey("dbo.BrainstormingSession_Element", "ToolID", "dbo.Tool");
  2649. DropForeignKey("dbo.BrainstormingSession_Element", "ElementID", "dbo.Element");
  2650. DropForeignKey("dbo.BrainstormingSession_Element", "BrainstormingSessionID", "dbo.BrainstormingSession");
  2651. DropForeignKey("dbo.BrainstormingSession", "UserID", "bbsf.User");
  2652. DropForeignKey("dbo.BrainstormingSession", "ToolID", "dbo.Tool");
  2653. DropForeignKey("dbo.BrainstormingSession_ToolPerspectiveElement", "ToolPerspectiveID", "dbo.ToolPerspective");
  2654. DropForeignKey("dbo.BrainstormingSession_ToolPerspectiveElement", "ToolID", "dbo.Tool");
  2655. DropForeignKey("dbo.BrainstormingSession_ToolPerspectiveElement", "ElementID", "dbo.Element");
  2656. DropForeignKey("dbo.Element", "ToolID", "dbo.Tool");
  2657. DropForeignKey("dbo.SessionInstance_Element", "ToolID", "dbo.Tool");
  2658. DropForeignKey("dbo.SessionInstance_Element", "SessionInstanceID", "dbo.SessionInstance");
  2659. DropForeignKey("dbo.SessionInstance", "SessionID", "dbo.Session");
  2660. DropForeignKey("dbo.Session_Tool", "ToolID", "dbo.Tool");
  2661. DropForeignKey("dbo.Tool", "ToolTypeItemID", "bbsf.LookupItem");
  2662. DropForeignKey("dbo.Tool", "SuggestedTimeItemID", "bbsf.LookupItem");
  2663. DropForeignKey("dbo.ToolPerspective", "ToolID", "dbo.Tool");
  2664. DropForeignKey("dbo.SessionInstance_ToolPerspectiveElement", "ToolPerspectiveID", "dbo.ToolPerspective");
  2665. DropForeignKey("dbo.SessionInstance_ToolPerspectiveElement", "ToolID", "dbo.Tool");
  2666. DropForeignKey("dbo.SessionInstance_ToolPerspectiveElement", "SessionInstanceID", "dbo.SessionInstance");
  2667. DropForeignKey("dbo.SessionInstance_ToolPerspectiveElement", "ElementID", "dbo.Element");
  2668. DropForeignKey("dbo.Tool", "LevelofDifficultyItemID", "bbsf.LookupItem");
  2669. DropForeignKey("dbo.Tool", "CategoryTypeID", "bbsf.LookupItem");
  2670. DropForeignKey("dbo.Session_Tool", "SessionID", "dbo.Session");
  2671. DropForeignKey("dbo.Session", "CategoryTypeID", "bbsf.LookupItem");
  2672. DropForeignKey("dbo.SessionInstance", "InnovationLabID", "dbo.InnovationLab");
  2673. DropForeignKey("dbo.SessionInstance_Element", "ElementID", "dbo.Element");
  2674. DropForeignKey("dbo.BrainstormingSession_ToolPerspectiveElement", "BrainstormingSessionID", "dbo.BrainstormingSession");
  2675. DropForeignKey("bbsf.WorkflowActivity", "WorkflowVersionID", "bbsf.WorkflowVersion");
  2676. DropForeignKey("bbsf.WorkflowActivity", "TemplateID", "bbsf.Template");
  2677. DropForeignKey("bbsf.Participant", "WorkflowVariableID", "bbsf.WorkflowVariable");
  2678. DropForeignKey("bbsf.Participant", "UserID", "bbsf.User");
  2679. DropForeignKey("bbsf.Participant", "PermissionSetID", "bbsf.PermissionSet");
  2680. DropForeignKey("bbsf.Participant", "ParticipantTypeItemID", "bbsf.LookupItem");
  2681. DropForeignKey("bbsf.Participant", "WorkflowActivityID", "bbsf.WorkflowActivity");
  2682. DropForeignKey("bbsf.WorkflowActivityOutcome", "ActivityID", "bbsf.WorkflowActivity");
  2683. DropForeignKey("bbsf.WorkflowActivityOutcome", "NextActivityID", "bbsf.WorkflowActivity");
  2684. DropForeignKey("bbsf.WorkflowActivityVariable", "VariableID", "bbsf.WorkflowVariable");
  2685. DropForeignKey("bbsf.WorkflowLogVariable", "LogID", "bbsf.WorkflowLog");
  2686. DropForeignKey("bbsf.WorkflowLog", "WorkflowVersionID", "bbsf.WorkflowVersion");
  2687. DropForeignKey("bbsf.WorkflowLog", "InstanceID", "bbsf.WorkflowInstance");
  2688. DropForeignKey("bbsf.WorkflowInstance", "WorkflowVersionID", "bbsf.WorkflowVersion");
  2689. DropForeignKey("bbsf.WorkflowInstance", "StartedByUserID", "bbsf.User");
  2690. DropForeignKey("bbsf.WorkflowInstanceVariable", "VariableID", "bbsf.WorkflowVariable");
  2691. DropForeignKey("bbsf.WorkflowInstanceVariable_VariableLookup", "InstanceVariableID", "bbsf.WorkflowVariableLookup");
  2692. DropForeignKey("bbsf.WorkflowInstanceVariable_VariableLookup", "VariableLookupID", "bbsf.WorkflowInstanceVariable");
  2693. DropForeignKey("bbsf.WorkflowVariableLookup", "VariableID", "bbsf.WorkflowVariable");
  2694. DropForeignKey("bbsf.WorkflowVariable", "WorkflowVersionID", "bbsf.WorkflowVersion");
  2695. DropForeignKey("bbsf.WorkflowVersion", "WorkflowID", "bbsf.Workflow");
  2696. DropForeignKey("bbsf.WorkflowVariable", "VariableTypeItemID", "bbsf.LookupItem");
  2697. DropForeignKey("bbsf.WorkflowVariable", "DataTypeItemID", "bbsf.LookupItem");
  2698. DropForeignKey("bbsf.WorkflowInstanceVariable", "InstanceID", "bbsf.WorkflowInstance");
  2699. DropForeignKey("bbsf.WorkflowInstanceVariable", "ActivityID", "bbsf.WorkflowActivity");
  2700. DropForeignKey("bbsf.TMETask", "TaskStatusItemID", "bbsf.LookupItem");
  2701. DropForeignKey("bbsf.TMETask", "WFInstanceTaskID", "bbsf.WorkflowInstanceTask");
  2702. DropForeignKey("bbsf.TMETask", "CorrelationTypeItemID", "bbsf.LookupItem");
  2703. DropForeignKey("bbsf.WorkflowInstanceTask", "WorkflowInstanceID", "bbsf.WorkflowInstance");
  2704. DropForeignKey("bbsf.WorkflowInstanceTask", "ActivityID", "bbsf.WorkflowActivity");
  2705. DropForeignKey("bbsf.WorkflowInstance", "InstanceStatusItemID", "bbsf.LookupItem");
  2706. DropForeignKey("bbsf.WorkflowInstanceComment", "UserID", "bbsf.User");
  2707. DropForeignKey("bbsf.WorkflowInstanceComment", "ParentCommentID", "bbsf.WorkflowInstanceComment");
  2708. DropForeignKey("bbsf.WorkflowInstanceComment", "WorkflowInstanceID", "bbsf.WorkflowInstance");
  2709. DropForeignKey("bbsf.WorkflowError", "InstanceID", "bbsf.WorkflowInstance");
  2710. DropForeignKey("bbsf.WorkflowError", "ActivityID", "bbsf.WorkflowActivity");
  2711. DropForeignKey("bbsf.WorkflowInstance", "CurrentActivityID", "bbsf.WorkflowActivity");
  2712. DropForeignKey("bbsf.WorkflowLog", "CompletedByUserID", "bbsf.User");
  2713. DropForeignKey("bbsf.WorkflowLog", "ActivityOutcomeID", "bbsf.WorkflowActivityOutcome");
  2714. DropForeignKey("bbsf.WorkflowLog", "ActivityID", "bbsf.WorkflowActivity");
  2715. DropForeignKey("bbsf.WorkflowLogVariable", "ActivityVariableID", "bbsf.WorkflowActivityVariable");
  2716. DropForeignKey("bbsf.WorkflowActivityVariable", "ActivityID", "bbsf.WorkflowActivity");
  2717. DropForeignKey("bbsf.WorkflowActivity", "ActivityTypeItemID", "bbsf.LookupItem");
  2718. DropForeignKey("dbo.Activity", "StatusItemID", "bbsf.LookupItem");
  2719. DropForeignKey("dbo.Activity", "StageID", "dbo.Stage");
  2720. DropForeignKey("dbo.Stage", "StageTemplateID", "dbo.StageTemplate");
  2721. DropForeignKey("dbo.Stage", "PlaningID", "dbo.IMOPlanning");
  2722. DropForeignKey("dbo.Stage", "MonitoringID", "dbo.IMOMonitoring");
  2723. DropForeignKey("dbo.Stage", "AnalysisID", "dbo.IMOAnalysis");
  2724. DropForeignKey("dbo.ActivityComment", "ActivityID", "dbo.Activity");
  2725. DropForeignKey("dbo.Activity", "ActivityTemplateID", "dbo.ActivityTemplate");
  2726. DropForeignKey("dbo.Achievement", "RewardTypeID", "bbsf.LookupItem");
  2727. DropForeignKey("dbo.IdeaFieldValue_Relation", "LookupItemID", "bbsf.LookupItem");
  2728. DropForeignKey("dbo.IdeaFieldValue_Relation", "InnvoationLabID", "dbo.InnovationLab");
  2729. DropForeignKey("dbo.IdeaFieldValue_Relation", "IdeaFieldValueID", "dbo.IdeaFieldValue");
  2730. DropForeignKey("dbo.IdeaFieldValue_Relation", "GoalID", "dbo.Goal");
  2731. DropForeignKey("dbo.IdeaFieldValue_Relation", "ChallengeID", "dbo.Challenge");
  2732. DropForeignKey("dbo.IdeaFieldValue_Relation", "AreaOfFocusID", "dbo.AreaOfFocus");
  2733. DropForeignKey("dbo.AreaOfFocus", "TypeID", "bbsf.LookupItem");
  2734. DropForeignKey("dbo.MindMap", "ProjectID", "dbo.Project");
  2735. DropForeignKey("dbo.Project", "ManagerID", "bbsf.User");
  2736. DropForeignKey("dbo.Risk", "StatusItemID", "bbsf.LookupItem");
  2737. DropForeignKey("dbo.Risk", "ProjectID", "dbo.Project");
  2738. DropForeignKey("dbo.Risk", "ProbabilityItemID", "bbsf.LookupItem");
  2739. DropForeignKey("dbo.Risk", "ImpactItemID", "bbsf.LookupItem");
  2740. DropForeignKey("dbo.ProjectTask", "ParentTaskID", "dbo.ProjectTask");
  2741. DropForeignKey("dbo.ProjectTask", "MileStoneID", "dbo.Milestone");
  2742. DropForeignKey("dbo.Milestone", "ProjectID", "dbo.Project");
  2743. DropForeignKey("dbo.Project_Member", "UserID", "bbsf.User");
  2744. DropForeignKey("dbo.Project_Member", "ProjectID", "dbo.Project");
  2745. DropForeignKey("dbo.Issue", "ProjectID", "dbo.Project");
  2746. DropForeignKey("dbo.Project", "IdeaID", "dbo.Idea");
  2747. DropForeignKey("dbo.Folder", "ProjectID", "dbo.Project");
  2748. DropForeignKey("dbo.Folder", "ParentFolderID", "dbo.Folder");
  2749. DropForeignKey("dbo.Deliverable", "ProjectID", "dbo.Project");
  2750. DropForeignKey("dbo.Deliverable", "FileID", "bbsf.File");
  2751. DropForeignKey("dbo.MindMap", "UserID", "bbsf.User");
  2752. DropForeignKey("dbo.MindMap", "LabID", "dbo.InnovationLab");
  2753. DropForeignKey("dbo.Team_User", "UserID", "bbsf.User");
  2754. DropForeignKey("dbo.Team_User", "TeamID", "dbo.Team");
  2755. DropForeignKey("dbo.Team", "InnovationLabID", "dbo.InnovationLab");
  2756. DropForeignKey("dbo.InnovationLab", "OwnerID", "bbsf.User");
  2757. DropForeignKey("dbo.Agenda", "InnovationLabID", "dbo.InnovationLab");
  2758. DropForeignKey("dbo.MindMap", "IdeaID", "dbo.Idea");
  2759. DropForeignKey("dbo.TitleTag", "Tag_ID", "dbo.Tag");
  2760. DropForeignKey("dbo.TitleTag", "Title_ID", "dbo.Title");
  2761. DropForeignKey("dbo.Title", "GoalID", "dbo.Goal");
  2762. DropForeignKey("dbo.Title", "ChallengeID", "dbo.Challenge");
  2763. DropForeignKey("dbo.Title", "AreaOfFocusID", "dbo.AreaOfFocus");
  2764. DropForeignKey("dbo.TagIdea", "Idea_ID", "dbo.Idea");
  2765. DropForeignKey("dbo.TagIdea", "Tag_ID", "dbo.Tag");
  2766. DropForeignKey("dbo.Idea_RelatedIdea", "Idea_ID", "dbo.Idea");
  2767. DropForeignKey("dbo.Idea_RelatedIdea", "RelatedIdeaID", "dbo.Idea");
  2768. DropForeignKey("dbo.Idea_RelatedIdea", "IdeaID", "dbo.Idea");
  2769. DropForeignKey("dbo.Idea", "OwnerID", "bbsf.User");
  2770. DropForeignKey("dbo.IdeaVersion_Correlation", "IdeaVersionID", "dbo.IdeaVersion");
  2771. DropForeignKey("dbo.IdeaVersion_File", "IdeaVersionID", "dbo.IdeaVersion");
  2772. DropForeignKey("dbo.IdeaVersion_File", "IdeaID", "dbo.Idea");
  2773. DropForeignKey("dbo.IdeaVersion_File", "FileID", "bbsf.File");
  2774. DropForeignKey("dbo.IdeaVersion", "IdeaID", "dbo.Idea");
  2775. DropForeignKey("dbo.IdeaVersion_Correlation", "IdeaID", "dbo.Idea");
  2776. DropForeignKey("dbo.Idea", "StatusItemID", "bbsf.LookupItem");
  2777. DropForeignKey("dbo.IdeaFieldValue", "IdeaFieldID", "dbo.IdeaField");
  2778. DropForeignKey("dbo.IdeaField", "WidthTypeItemID", "bbsf.LookupItem");
  2779. DropForeignKey("dbo.IdeaField", "MultiSelectLookupID", "bbsf.Lookup");
  2780. DropForeignKey("dbo.IdeaField", "LangValidationItemID", "bbsf.LookupItem");
  2781. DropForeignKey("dbo.IdeaField", "DataTypeItemID", "bbsf.LookupItem");
  2782. DropForeignKey("dbo.IdeaFieldValue", "IdeaID", "dbo.Idea");
  2783. DropForeignKey("dbo.IdeaFieldValue", "FileOrImageID", "bbsf.File");
  2784. DropForeignKey("dbo.Idea_Contributor", "UserID", "bbsf.User");
  2785. DropForeignKey("dbo.Idea_Contributor", "IdeaID", "dbo.Idea");
  2786. DropForeignKey("dbo.Idea_Contributor", "ContributorTypeItemID", "bbsf.LookupItem");
  2787. DropForeignKey("dbo.Idea", "EvaluationCriteriaID", "dbo.EvaluationCriteria");
  2788. DropForeignKey("dbo.EvaluationPanel_User", "UserID", "bbsf.User");
  2789. DropForeignKey("dbo.EvaluationPanel_User", "EvaluationPanelID", "dbo.EvaluationPanel");
  2790. DropForeignKey("dbo.EvaluationPanel", "EvaluationCriteriaID", "dbo.EvaluationCriteria");
  2791. DropForeignKey("dbo.Idea_CriterionScore", "UserID", "bbsf.User");
  2792. DropForeignKey("dbo.Idea_CriterionScore", "IdeaID", "dbo.Idea");
  2793. DropForeignKey("dbo.Idea_CriterionScore", "CriterionID", "dbo.Criterion");
  2794. DropForeignKey("dbo.Criterion", "EvaluationCriteriaID", "dbo.EvaluationCriteria");
  2795. DropForeignKey("dbo.IdeaComment", "UserID", "bbsf.User");
  2796. DropForeignKey("dbo.IdeaComment", "ParentCommentID", "dbo.IdeaComment");
  2797. DropForeignKey("dbo.IdeaInteraction", "UserID", "bbsf.User");
  2798. DropForeignKey("dbo.IdeaInteraction", "InteractionTypeItemID", "bbsf.LookupItem");
  2799. DropForeignKey("dbo.IdeaInteraction", "IdeaID", "dbo.Idea");
  2800. DropForeignKey("dbo.IdeaInteraction", "CommentID", "dbo.IdeaComment");
  2801. DropForeignKey("dbo.IdeaComment", "IdeaID", "dbo.Idea");
  2802. DropForeignKey("dbo.IdeaCommentReport", "UserID", "bbsf.User");
  2803. DropForeignKey("bbsf.UserInfo", "UserID", "bbsf.User");
  2804. DropForeignKey("bbsf.User", "SmallImageFileID", "bbsf.File");
  2805. DropForeignKey("bbsf.ChatMessage_SeenBy", "ChatMessageID", "bbsf.User");
  2806. DropForeignKey("bbsf.ChatMessage_SeenBy", "UserID", "bbsf.ChatMessage");
  2807. DropForeignKey("bbsf.User", "ChatRoom_ID", "bbsf.ChatRoom");
  2808. DropForeignKey("bbsf.ChatUnreadMessage", "UserID", "bbsf.User");
  2809. DropForeignKey("bbsf.ChatUnreadMessage", "RoomID", "bbsf.ChatRoom");
  2810. DropForeignKey("bbsf.ChatRoom", "RoomTypeItemID", "bbsf.LookupItem");
  2811. DropForeignKey("bbsf.ChatMessage", "RoomID", "bbsf.ChatRoom");
  2812. DropForeignKey("bbsf.ChatMessage", "OwnerID", "bbsf.User");
  2813. DropForeignKey("bbsf.ChatMessage", "MessageTypeItemID", "bbsf.LookupItem");
  2814. DropForeignKey("bbsf.ChatMessageAttachment", "ChatMessage_ID", "bbsf.ChatMessage");
  2815. DropForeignKey("bbsf.ChatMessageAttachment", "AttachmentTypeItemID", "bbsf.LookupItem");
  2816. DropForeignKey("bbsf.User", "OriginalImageFileID", "bbsf.File");
  2817. DropForeignKey("bbsf.User", "OrganizationID", "bbsf.Organization");
  2818. DropForeignKey("bbsf.ProviderAttribute", "ProviderId", "bbsf.Provider");
  2819. DropForeignKey("bbsf.Provider", "OrganizationID", "bbsf.Organization");
  2820. DropForeignKey("bbsf.Provider", "ProviderTypeItemID", "bbsf.LookupItem");
  2821. DropForeignKey("bbsf.TemplateInfo", "TemplateID", "bbsf.Template");
  2822. DropForeignKey("bbsf.TemplateInfo", "LanguageModeItemID", "bbsf.LookupItem");
  2823. DropForeignKey("bbsf.TemplateInfo", "EmailHeaderAndFooterTemplateID", "bbsf.EmailHeaderAndFooterTemplate");
  2824. DropForeignKey("bbsf.Template", "OrganizationID", "bbsf.Organization");
  2825. DropForeignKey("bbsf.Template", "CategoryItemID", "bbsf.LookupItem");
  2826. DropForeignKey("bbsf.LookupItem", "LookupID", "bbsf.Lookup");
  2827. DropForeignKey("bbsf.Lookup", "LookupGroupID", "bbsf.LookupGroup");
  2828. DropForeignKey("bbsf.PermissionSet_User", "UserID", "bbsf.User");
  2829. DropForeignKey("bbsf.PermissionSet_User", "PermissionSetID", "bbsf.PermissionSet");
  2830. DropForeignKey("bbsf.PermissionSet_Permission", "PermissionID", "bbsf.Permission");
  2831. DropForeignKey("bbsf.PermissionSet_Permission", "PermissionSetID", "bbsf.PermissionSet");
  2832. DropForeignKey("bbsf.PermissionSet", "OrganizationID", "bbsf.Organization");
  2833. DropForeignKey("bbsf.Permission", "OrganizationID", "bbsf.Organization");
  2834. DropForeignKey("bbsf.User", "LargeImageFileID", "bbsf.File");
  2835. DropForeignKey("bbsf.UserConnection", "UserID", "bbsf.User");
  2836. DropForeignKey("dbo.IdeaCommentReport", "IdeaCommentID", "dbo.IdeaComment");
  2837. DropForeignKey("dbo.MindMap", "GoalID", "dbo.Goal");
  2838. DropForeignKey("dbo.MindMap", "ChallengeID", "dbo.Challenge");
  2839. DropForeignKey("dbo.MindMap", "FocuseID", "dbo.AreaOfFocus");
  2840. DropForeignKey("dbo.Achievement", "BadgeID", "dbo.Badge");
  2841. DropIndex("bbsf.WorkflowInstanceVariable_VariableLookup", new[] { "InstanceVariableID" });
  2842. DropIndex("bbsf.WorkflowInstanceVariable_VariableLookup", new[] { "VariableLookupID" });
  2843. DropIndex("dbo.TitleTag", new[] { "Tag_ID" });
  2844. DropIndex("dbo.TitleTag", new[] { "Title_ID" });
  2845. DropIndex("dbo.TagIdea", new[] { "Idea_ID" });
  2846. DropIndex("dbo.TagIdea", new[] { "Tag_ID" });
  2847. DropIndex("bbsf.ChatMessage_SeenBy", new[] { "ChatMessageID" });
  2848. DropIndex("bbsf.ChatMessage_SeenBy", new[] { "UserID" });
  2849. DropIndex("bbsf.PermissionSet_User", new[] { "UserID" });
  2850. DropIndex("bbsf.PermissionSet_User", new[] { "PermissionSetID" });
  2851. DropIndex("bbsf.PermissionSet_Permission", new[] { "PermissionID" });
  2852. DropIndex("bbsf.PermissionSet_Permission", new[] { "PermissionSetID" });
  2853. DropIndex("dbo.Topic", new[] { "CategoryID" });
  2854. DropIndex("dbo.Notification", new[] { "IdeaID" });
  2855. DropIndex("dbo.NotificationClientUser", new[] { "ClientUserID" });
  2856. DropIndex("dbo.NotificationClientUser", new[] { "NotificationID" });
  2857. DropIndex("dbo.LibraryResource", new[] { "CategoryTypeID" });
  2858. DropIndex("dbo.Invoice", new[] { "ProjectID" });
  2859. DropIndex("dbo.Invoice", new[] { "MilestoneID" });
  2860. DropIndex("dbo.Invoice", new[] { "InvoiceCurrencyItemID" });
  2861. DropIndex("dbo.Invoice", new[] { "InvoiceStatusItemID" });
  2862. DropIndex("dbo.IdeaWFMapping", new[] { "IdeaStatusID" });
  2863. DropIndex("bbsf.FormsHubConnection", new[] { "UserId" });
  2864. DropIndex("dbo.ModuleTopic", new[] { "ChapterID" });
  2865. DropIndex("dbo.Chapter", new[] { "ModuleID" });
  2866. DropIndex("dbo.ChallengeComment", new[] { "ParentCommentID" });
  2867. DropIndex("dbo.ChallengeComment", new[] { "UserID" });
  2868. DropIndex("dbo.ChallengeComment", new[] { "ChallengeID" });
  2869. DropIndex("dbo.ChallengeCommentReport", new[] { "UserID" });
  2870. DropIndex("dbo.ChallengeCommentReport", new[] { "ChallengeCommentID" });
  2871. DropIndex("dbo.CaseStudyComment", new[] { "ParentCommentID" });
  2872. DropIndex("dbo.CaseStudyComment", new[] { "UserID" });
  2873. DropIndex("dbo.CaseStudyComment", new[] { "CaseStudyID" });
  2874. DropIndex("dbo.CaseStudyCommentReport", new[] { "UserID" });
  2875. DropIndex("dbo.CaseStudyCommentReport", new[] { "CaseStudyCommentID" });
  2876. DropIndex("dbo.CaseStudy", new[] { "CategoryItemID" });
  2877. DropIndex("dbo.SessionInstance_ToolPerspectiveElement", new[] { "ToolPerspectiveID" });
  2878. DropIndex("dbo.SessionInstance_ToolPerspectiveElement", new[] { "ToolID" });
  2879. DropIndex("dbo.SessionInstance_ToolPerspectiveElement", new[] { "ElementID" });
  2880. DropIndex("dbo.SessionInstance_ToolPerspectiveElement", new[] { "SessionInstanceID" });
  2881. DropIndex("dbo.ToolPerspective", new[] { "ToolID" });
  2882. DropIndex("dbo.Tool", new[] { "ToolTypeItemID" });
  2883. DropIndex("dbo.Tool", new[] { "LevelofDifficultyItemID" });
  2884. DropIndex("dbo.Tool", new[] { "SuggestedTimeItemID" });
  2885. DropIndex("dbo.Tool", new[] { "CategoryTypeID" });
  2886. DropIndex("dbo.Session_Tool", new[] { "ToolID" });
  2887. DropIndex("dbo.Session_Tool", new[] { "SessionID" });
  2888. DropIndex("dbo.Session", new[] { "CategoryTypeID" });
  2889. DropIndex("dbo.SessionInstance", new[] { "InnovationLabID" });
  2890. DropIndex("dbo.SessionInstance", new[] { "SessionID" });
  2891. DropIndex("dbo.SessionInstance_Element", new[] { "ToolID" });
  2892. DropIndex("dbo.SessionInstance_Element", new[] { "ElementID" });
  2893. DropIndex("dbo.SessionInstance_Element", new[] { "SessionInstanceID" });
  2894. DropIndex("dbo.Element", new[] { "ToolID" });
  2895. DropIndex("dbo.BrainstormingSession_ToolPerspectiveElement", new[] { "ToolPerspectiveID" });
  2896. DropIndex("dbo.BrainstormingSession_ToolPerspectiveElement", new[] { "ToolID" });
  2897. DropIndex("dbo.BrainstormingSession_ToolPerspectiveElement", new[] { "ElementID" });
  2898. DropIndex("dbo.BrainstormingSession_ToolPerspectiveElement", new[] { "BrainstormingSessionID" });
  2899. DropIndex("dbo.BrainstormingSession", new[] { "UserID" });
  2900. DropIndex("dbo.BrainstormingSession", new[] { "ToolID" });
  2901. DropIndex("dbo.BrainstormingSession_Element", new[] { "ToolID" });
  2902. DropIndex("dbo.BrainstormingSession_Element", new[] { "ElementID" });
  2903. DropIndex("dbo.BrainstormingSession_Element", new[] { "BrainstormingSessionID" });
  2904. DropIndex("bbsf.Participant", new[] { "WorkflowVariableID" });
  2905. DropIndex("bbsf.Participant", new[] { "UserID" });
  2906. DropIndex("bbsf.Participant", new[] { "PermissionSetID" });
  2907. DropIndex("bbsf.Participant", new[] { "WorkflowActivityID" });
  2908. DropIndex("bbsf.Participant", new[] { "ParticipantTypeItemID" });
  2909. DropIndex("bbsf.Workflow", new[] { "SysName" });
  2910. DropIndex("bbsf.WorkflowVersion", new[] { "WorkflowID" });
  2911. DropIndex("bbsf.WorkflowVariable", new[] { "Value_Identifier" });
  2912. DropIndex("bbsf.WorkflowVariable", new[] { "VariableTypeItemID" });
  2913. DropIndex("bbsf.WorkflowVariable", new[] { "DataTypeItemID" });
  2914. DropIndex("bbsf.WorkflowVariable", new[] { "WorkflowVersionID" });
  2915. DropIndex("bbsf.WorkflowVariable", new[] { "SysName" });
  2916. DropIndex("bbsf.WorkflowVariableLookup", new[] { "VariableID" });
  2917. DropIndex("bbsf.WorkflowInstanceVariable", new[] { "VariableID" });
  2918. DropIndex("bbsf.WorkflowInstanceVariable", new[] { "ActivityID" });
  2919. DropIndex("bbsf.WorkflowInstanceVariable", new[] { "InstanceID" });
  2920. DropIndex("bbsf.TMETask", new[] { "CorrelationTypeItemID" });
  2921. DropIndex("bbsf.TMETask", new[] { "TaskStatusItemID" });
  2922. DropIndex("bbsf.TMETask", new[] { "WFInstanceTaskID" });
  2923. DropIndex("bbsf.WorkflowInstanceTask", new[] { "ActivityID" });
  2924. DropIndex("bbsf.WorkflowInstanceTask", new[] { "WorkflowInstanceID" });
  2925. DropIndex("bbsf.WorkflowInstanceComment", new[] { "UserID" });
  2926. DropIndex("bbsf.WorkflowInstanceComment", new[] { "ParentCommentID" });
  2927. DropIndex("bbsf.WorkflowInstanceComment", new[] { "WorkflowInstanceID" });
  2928. DropIndex("bbsf.WorkflowError", new[] { "ActivityID" });
  2929. DropIndex("bbsf.WorkflowError", new[] { "InstanceID" });
  2930. DropIndex("bbsf.WorkflowInstance", new[] { "InstanceStatusItemID" });
  2931. DropIndex("bbsf.WorkflowInstance", new[] { "StartedByUserID" });
  2932. DropIndex("bbsf.WorkflowInstance", new[] { "CurrentActivityID" });
  2933. DropIndex("bbsf.WorkflowInstance", new[] { "WorkflowVersionID" });
  2934. DropIndex("bbsf.WorkflowActivityOutcome", new[] { "NextActivityID" });
  2935. DropIndex("bbsf.WorkflowActivityOutcome", new[] { "ActivityID" });
  2936. DropIndex("bbsf.WorkflowActivityOutcome", new[] { "SysName" });
  2937. DropIndex("bbsf.WorkflowLog", new[] { "CompletedByUserID" });
  2938. DropIndex("bbsf.WorkflowLog", new[] { "ActivityOutcomeID" });
  2939. DropIndex("bbsf.WorkflowLog", new[] { "ActivityID" });
  2940. DropIndex("bbsf.WorkflowLog", new[] { "WorkflowVersionID" });
  2941. DropIndex("bbsf.WorkflowLog", new[] { "InstanceID" });
  2942. DropIndex("bbsf.WorkflowLogVariable", new[] { "ActivityVariableID" });
  2943. DropIndex("bbsf.WorkflowLogVariable", new[] { "LogID" });
  2944. DropIndex("bbsf.WorkflowActivityVariable", new[] { "VariableID" });
  2945. DropIndex("bbsf.WorkflowActivityVariable", new[] { "ActivityID" });
  2946. DropIndex("bbsf.WorkflowActivity", new[] { "TemplateID" });
  2947. DropIndex("bbsf.WorkflowActivity", new[] { "ActivityTypeItemID" });
  2948. DropIndex("bbsf.WorkflowActivity", new[] { "WorkflowVersionID" });
  2949. DropIndex("bbsf.WorkflowActivity", new[] { "SysName" });
  2950. DropIndex("dbo.Stage", new[] { "StageTemplateID" });
  2951. DropIndex("dbo.Stage", new[] { "MonitoringID" });
  2952. DropIndex("dbo.Stage", new[] { "PlaningID" });
  2953. DropIndex("dbo.Stage", new[] { "AnalysisID" });
  2954. DropIndex("dbo.ActivityComment", new[] { "ActivityID" });
  2955. DropIndex("dbo.Activity", new[] { "ActivityTemplateID" });
  2956. DropIndex("dbo.Activity", new[] { "StatusItemID" });
  2957. DropIndex("dbo.Activity", new[] { "StageID" });
  2958. DropIndex("dbo.Risk", new[] { "ProbabilityItemID" });
  2959. DropIndex("dbo.Risk", new[] { "ImpactItemID" });
  2960. DropIndex("dbo.Risk", new[] { "StatusItemID" });
  2961. DropIndex("dbo.Risk", new[] { "ProjectID" });
  2962. DropIndex("dbo.ProjectTask", new[] { "MileStoneID" });
  2963. DropIndex("dbo.ProjectTask", new[] { "ParentTaskID" });
  2964. DropIndex("dbo.Milestone", new[] { "ProjectID" });
  2965. DropIndex("dbo.Project_Member", new[] { "UserID" });
  2966. DropIndex("dbo.Project_Member", new[] { "ProjectID" });
  2967. DropIndex("dbo.Issue", new[] { "ProjectID" });
  2968. DropIndex("dbo.Folder", new[] { "ProjectID" });
  2969. DropIndex("dbo.Folder", new[] { "ParentFolderID" });
  2970. DropIndex("dbo.Deliverable", new[] { "FileID" });
  2971. DropIndex("dbo.Deliverable", new[] { "ProjectID" });
  2972. DropIndex("dbo.Project", new[] { "IdeaID" });
  2973. DropIndex("dbo.Project", new[] { "ManagerID" });
  2974. DropIndex("dbo.Team_User", new[] { "TeamID" });
  2975. DropIndex("dbo.Team_User", new[] { "UserID" });
  2976. DropIndex("dbo.Team", new[] { "InnovationLabID" });
  2977. DropIndex("dbo.Agenda", new[] { "InnovationLabID" });
  2978. DropIndex("dbo.InnovationLab", new[] { "OwnerID" });
  2979. DropIndex("dbo.Title", new[] { "ChallengeID" });
  2980. DropIndex("dbo.Title", new[] { "AreaOfFocusID" });
  2981. DropIndex("dbo.Title", new[] { "GoalID" });
  2982. DropIndex("dbo.Idea_RelatedIdea", new[] { "Idea_ID" });
  2983. DropIndex("dbo.Idea_RelatedIdea", new[] { "RelatedIdeaID" });
  2984. DropIndex("dbo.Idea_RelatedIdea", new[] { "IdeaID" });
  2985. DropIndex("dbo.IdeaVersion_File", new[] { "FileID" });
  2986. DropIndex("dbo.IdeaVersion_File", new[] { "IdeaVersionID" });
  2987. DropIndex("dbo.IdeaVersion_File", new[] { "IdeaID" });
  2988. DropIndex("dbo.IdeaVersion", new[] { "IdeaID" });
  2989. DropIndex("dbo.IdeaVersion_Correlation", new[] { "IdeaVersionID" });
  2990. DropIndex("dbo.IdeaVersion_Correlation", new[] { "IdeaID" });
  2991. DropIndex("dbo.IdeaField", new[] { "MultiSelectLookupID" });
  2992. DropIndex("dbo.IdeaField", new[] { "LangValidationItemID" });
  2993. DropIndex("dbo.IdeaField", new[] { "WidthTypeItemID" });
  2994. DropIndex("dbo.IdeaField", new[] { "DataTypeItemID" });
  2995. DropIndex("dbo.IdeaFieldValue", new[] { "FileOrImageID" });
  2996. DropIndex("dbo.IdeaFieldValue", new[] { "IdeaFieldID" });
  2997. DropIndex("dbo.IdeaFieldValue", new[] { "IdeaID" });
  2998. DropIndex("dbo.Idea_Contributor", new[] { "ContributorTypeItemID" });
  2999. DropIndex("dbo.Idea_Contributor", new[] { "UserID" });
  3000. DropIndex("dbo.Idea_Contributor", new[] { "IdeaID" });
  3001. DropIndex("dbo.EvaluationPanel_User", new[] { "EvaluationPanelID" });
  3002. DropIndex("dbo.EvaluationPanel_User", new[] { "UserID" });
  3003. DropIndex("dbo.EvaluationPanel", new[] { "EvaluationCriteriaID" });
  3004. DropIndex("dbo.Idea_CriterionScore", new[] { "UserID" });
  3005. DropIndex("dbo.Idea_CriterionScore", new[] { "CriterionID" });
  3006. DropIndex("dbo.Idea_CriterionScore", new[] { "IdeaID" });
  3007. DropIndex("dbo.Criterion", new[] { "EvaluationCriteriaID" });
  3008. DropIndex("dbo.IdeaInteraction", new[] { "CommentID" });
  3009. DropIndex("dbo.IdeaInteraction", new[] { "UserID" });
  3010. DropIndex("dbo.IdeaInteraction", new[] { "InteractionTypeItemID" });
  3011. DropIndex("dbo.IdeaInteraction", new[] { "IdeaID" });
  3012. DropIndex("bbsf.UserInfo", new[] { "Token" });
  3013. DropIndex("bbsf.UserInfo", new[] { "UserID" });
  3014. DropIndex("bbsf.ChatUnreadMessage", new[] { "UserID" });
  3015. DropIndex("bbsf.ChatUnreadMessage", new[] { "RoomID" });
  3016. DropIndex("bbsf.ChatRoom", new[] { "RoomTypeItemID" });
  3017. DropIndex("bbsf.ChatMessageAttachment", new[] { "ChatMessage_ID" });
  3018. DropIndex("bbsf.ChatMessageAttachment", new[] { "AttachmentTypeItemID" });
  3019. DropIndex("bbsf.ChatMessage", new[] { "OwnerID" });
  3020. DropIndex("bbsf.ChatMessage", new[] { "MessageTypeItemID" });
  3021. DropIndex("bbsf.ChatMessage", new[] { "RoomID" });
  3022. DropIndex("bbsf.ProviderAttribute", new[] { "ProviderId" });
  3023. DropIndex("bbsf.TemplateInfo", new[] { "EmailHeaderAndFooterTemplateID" });
  3024. DropIndex("bbsf.TemplateInfo", new[] { "TemplateID" });
  3025. DropIndex("bbsf.TemplateInfo", new[] { "LanguageModeItemID" });
  3026. DropIndex("bbsf.Template", new[] { "OrganizationID" });
  3027. DropIndex("bbsf.Template", new[] { "SysName" });
  3028. DropIndex("bbsf.Template", new[] { "CategoryItemID" });
  3029. DropIndex("bbsf.Lookup", new[] { "SysName" });
  3030. DropIndex("bbsf.Lookup", new[] { "LookupGroupID" });
  3031. DropIndex("bbsf.Provider", new[] { "OrganizationID" });
  3032. DropIndex("bbsf.Provider", new[] { "Name" });
  3033. DropIndex("bbsf.Provider", new[] { "ProviderTypeItemID" });
  3034. DropIndex("bbsf.PermissionSet", new[] { "OrganizationID" });
  3035. DropIndex("bbsf.PermissionSet", new[] { "SysName" });
  3036. DropIndex("bbsf.Permission", new[] { "OrganizationID" });
  3037. DropIndex("bbsf.Permission", new[] { "SysName" });
  3038. DropIndex("bbsf.File", new[] { "ID_GUID" });
  3039. DropIndex("bbsf.UserConnection", new[] { "UserID" });
  3040. DropIndex("bbsf.User", new[] { "ChatRoom_ID" });
  3041. DropIndex("bbsf.User", new[] { "SmallImageFileID" });
  3042. DropIndex("bbsf.User", new[] { "LargeImageFileID" });
  3043. DropIndex("bbsf.User", new[] { "OriginalImageFileID" });
  3044. DropIndex("bbsf.User", new[] { "Username" });
  3045. DropIndex("bbsf.User", new[] { "OrganizationID" });
  3046. DropIndex("dbo.IdeaCommentReport", new[] { "UserID" });
  3047. DropIndex("dbo.IdeaCommentReport", new[] { "IdeaCommentID" });
  3048. DropIndex("dbo.IdeaComment", new[] { "ParentCommentID" });
  3049. DropIndex("dbo.IdeaComment", new[] { "UserID" });
  3050. DropIndex("dbo.IdeaComment", new[] { "IdeaID" });
  3051. DropIndex("dbo.Idea", new[] { "EvaluationCriteriaID" });
  3052. DropIndex("dbo.Idea", new[] { "StatusItemID" });
  3053. DropIndex("dbo.Idea", new[] { "OwnerID" });
  3054. DropIndex("dbo.MindMap", new[] { "UserID" });
  3055. DropIndex("dbo.MindMap", new[] { "LabID" });
  3056. DropIndex("dbo.MindMap", new[] { "FocuseID" });
  3057. DropIndex("dbo.MindMap", new[] { "ChallengeID" });
  3058. DropIndex("dbo.MindMap", new[] { "GoalID" });
  3059. DropIndex("dbo.MindMap", new[] { "IdeaID" });
  3060. DropIndex("dbo.MindMap", new[] { "ProjectID" });
  3061. DropIndex("dbo.AreaOfFocus", new[] { "TypeID" });
  3062. DropIndex("dbo.IdeaFieldValue_Relation", new[] { "LookupItemID" });
  3063. DropIndex("dbo.IdeaFieldValue_Relation", new[] { "InnvoationLabID" });
  3064. DropIndex("dbo.IdeaFieldValue_Relation", new[] { "AreaOfFocusID" });
  3065. DropIndex("dbo.IdeaFieldValue_Relation", new[] { "GoalID" });
  3066. DropIndex("dbo.IdeaFieldValue_Relation", new[] { "ChallengeID" });
  3067. DropIndex("dbo.IdeaFieldValue_Relation", new[] { "IdeaFieldValueID" });
  3068. DropIndex("bbsf.LookupItem", new[] { "LookupID" });
  3069. DropIndex("bbsf.LookupItem", new[] { "SysName" });
  3070. DropIndex("dbo.Achievement", new[] { "RewardTypeID" });
  3071. DropIndex("dbo.Achievement", new[] { "BadgeID" });
  3072. DropTable("bbsf.WorkflowInstanceVariable_VariableLookup");
  3073. DropTable("dbo.TitleTag");
  3074. DropTable("dbo.TagIdea");
  3075. DropTable("bbsf.ChatMessage_SeenBy");
  3076. DropTable("bbsf.PermissionSet_User");
  3077. DropTable("bbsf.PermissionSet_Permission");
  3078. DropTable("dbo.UserMenu");
  3079. DropTable("dbo.Topic");
  3080. DropTable("dbo.TopicCategory");
  3081. DropTable("dbo.SignalRConnection");
  3082. DropTable("dbo.Notification");
  3083. DropTable("dbo.NotificationClientUser");
  3084. DropTable("dbo.Localization");
  3085. DropTable("dbo.LibraryResource");
  3086. DropTable("dbo.Invoice");
  3087. DropTable("dbo.IdeaWFMapping");
  3088. DropTable("bbsf.FormsHubConnection");
  3089. DropTable("dbo.DraftIdea");
  3090. DropTable("bbsf.Country");
  3091. DropTable("dbo.ModuleTopic");
  3092. DropTable("dbo.Module");
  3093. DropTable("dbo.Chapter");
  3094. DropTable("dbo.ChallengeComment");
  3095. DropTable("dbo.ChallengeCommentReport");
  3096. DropTable("dbo.CaseStudyComment");
  3097. DropTable("dbo.CaseStudyCommentReport");
  3098. DropTable("dbo.CaseStudy");
  3099. DropTable("bbsf.BTimeZone");
  3100. DropTable("dbo.SessionInstance_ToolPerspectiveElement");
  3101. DropTable("dbo.ToolPerspective");
  3102. DropTable("dbo.Tool");
  3103. DropTable("dbo.Session_Tool");
  3104. DropTable("dbo.Session");
  3105. DropTable("dbo.SessionInstance");
  3106. DropTable("dbo.SessionInstance_Element");
  3107. DropTable("dbo.Element");
  3108. DropTable("dbo.BrainstormingSession_ToolPerspectiveElement");
  3109. DropTable("dbo.BrainstormingSession");
  3110. DropTable("dbo.BrainstormingSession_Element");
  3111. DropTable("bbsf.Participant");
  3112. DropTable("bbsf.Workflow");
  3113. DropTable("bbsf.WorkflowVersion");
  3114. DropTable("bbsf.WorkflowVariable");
  3115. DropTable("bbsf.WorkflowVariableLookup");
  3116. DropTable("bbsf.WorkflowInstanceVariable");
  3117. DropTable("bbsf.TMETask");
  3118. DropTable("bbsf.WorkflowInstanceTask");
  3119. DropTable("bbsf.WorkflowInstanceComment");
  3120. DropTable("bbsf.WorkflowError");
  3121. DropTable("bbsf.WorkflowInstance");
  3122. DropTable("bbsf.WorkflowActivityOutcome");
  3123. DropTable("bbsf.WorkflowLog");
  3124. DropTable("bbsf.WorkflowLogVariable");
  3125. DropTable("bbsf.WorkflowActivityVariable");
  3126. DropTable("bbsf.WorkflowActivity");
  3127. DropTable("dbo.StageTemplate");
  3128. DropTable("dbo.IMOPlanning");
  3129. DropTable("dbo.IMOMonitoring");
  3130. DropTable("dbo.IMOAnalysis");
  3131. DropTable("dbo.Stage");
  3132. DropTable("dbo.ActivityComment");
  3133. DropTable("dbo.ActivityTemplate");
  3134. DropTable("dbo.Activity");
  3135. DropTable("dbo.Risk");
  3136. DropTable("dbo.ProjectTask");
  3137. DropTable("dbo.Milestone");
  3138. DropTable("dbo.Project_Member");
  3139. DropTable("dbo.Issue");
  3140. DropTable("dbo.Folder");
  3141. DropTable("dbo.Deliverable");
  3142. DropTable("dbo.Project");
  3143. DropTable("dbo.Team_User");
  3144. DropTable("dbo.Team");
  3145. DropTable("dbo.Agenda");
  3146. DropTable("dbo.InnovationLab");
  3147. DropTable("dbo.Title");
  3148. DropTable("dbo.Tag");
  3149. DropTable("dbo.Idea_RelatedIdea");
  3150. DropTable("dbo.IdeaVersion_File");
  3151. DropTable("dbo.IdeaVersion");
  3152. DropTable("dbo.IdeaVersion_Correlation");
  3153. DropTable("dbo.IdeaField");
  3154. DropTable("dbo.IdeaFieldValue");
  3155. DropTable("dbo.Idea_Contributor");
  3156. DropTable("dbo.EvaluationPanel_User");
  3157. DropTable("dbo.EvaluationPanel");
  3158. DropTable("dbo.Idea_CriterionScore");
  3159. DropTable("dbo.Criterion");
  3160. DropTable("dbo.EvaluationCriteria");
  3161. DropTable("dbo.IdeaInteraction");
  3162. DropTable("bbsf.UserInfo");
  3163. DropTable("bbsf.ChatUnreadMessage");
  3164. DropTable("bbsf.ChatRoom");
  3165. DropTable("bbsf.ChatMessageAttachment");
  3166. DropTable("bbsf.ChatMessage");
  3167. DropTable("bbsf.ProviderAttribute");
  3168. DropTable("bbsf.EmailHeaderAndFooterTemplate");
  3169. DropTable("bbsf.TemplateInfo");
  3170. DropTable("bbsf.Template");
  3171. DropTable("bbsf.LookupGroup");
  3172. DropTable("bbsf.Lookup");
  3173. DropTable("bbsf.Provider");
  3174. DropTable("bbsf.PermissionSet");
  3175. DropTable("bbsf.Permission");
  3176. DropTable("bbsf.Organization");
  3177. DropTable("bbsf.File");
  3178. DropTable("bbsf.UserConnection");
  3179. DropTable("bbsf.User");
  3180. DropTable("dbo.IdeaCommentReport");
  3181. DropTable("dbo.IdeaComment");
  3182. DropTable("dbo.Idea");
  3183. DropTable("dbo.Goal");
  3184. DropTable("dbo.Challenge");
  3185. DropTable("dbo.MindMap");
  3186. DropTable("dbo.AreaOfFocus");
  3187. DropTable("dbo.IdeaFieldValue_Relation");
  3188. DropTable("bbsf.LookupItem");
  3189. DropTable("dbo.Badge");
  3190. DropTable("dbo.Achievement");
  3191. DropTable("bbsf._BMigrationHistory");
  3192. }
  3193.  
  3194. public override void Up_Seed(ClientAppContext context)
  3195. {
  3196. InitialCreate_201808111143070(context);
  3197. addUserArea_201808131504466(context);
  3198. seedingHelpCategoriesAndTopics_201808150840458(context);
  3199. toolNewFields_201810301243397(context);
  3200. toolChangesNewType_201811041132173(context);
  3201. IdeaFeatures_201811221145569(context);
  3202. NewCommentInteractionType_201811261330396(context);
  3203. IdeaStatus_201812161514534(context);
  3204. StatusDescriptionFix_201812161514534(context);
  3205. AddActivityStatus_201812191329286(context);
  3206. AddActivityStatusLookupItemAndIdeaFieldIsShown_201812230911239(context);
  3207. SeedRiskLookups_201812251356131(context);
  3208. SeedInvoiceLookupsAndAddGUID_201812300957349(context);
  3209. userMenues_201901021257065(context);
  3210. SeedingEvaluationPanelTopic_201901031204521(context);
  3211. MindMap_201901031609167(context);
  3212. AddMindMapUserMenue_201901081221098(context);
  3213. EditUserMenuesSeed_201901131036499(context);
  3214. EditDatatypeLookupDataSeed_201901141517533(context);
  3215. IdeaStatusAndInstance_201901161239534(context);
  3216. BrainStormingTopicCategories_201901171210047(context);
  3217. addBrainsormingMenue_201901201328270(context);
  3218. AddInnovationLabToDataTypelookup_201901211200465(context);
  3219. }
  3220. public void InitialCreate_201808111143070(ClientAppContext context)
  3221. {
  3222.  
  3223. CreateTemplates(context);
  3224. CreateLookups(context);
  3225. CreateNewUser(context);
  3226.  
  3227.  
  3228. }
  3229. public void CreateTemplates(ClientAppContext context)
  3230. {
  3231. var baseTemplate = context.EmailHeaderAndFooterTemplates.FirstOrDefault(t => t.NameEN == "Base Template");
  3232. // new challenge Email Template
  3233. context.TemplateInfos.Add(new TemplateInfo()
  3234. {
  3235. ID = 3,
  3236. EmailSubjectEN = " New created challenge",
  3237. EmailSubjectAR = "تحدي جديد",
  3238. EmailBodyEN = "<table lang=\"en\" style=\"border: 1px solid #bfbfbf; width: 60%;font-family: Arial, Helvetica, sans-serif; font-size: 25px;\" cellspacing=\"0\" align=\"center\"> <tbody> <tr style=\"margin-left:20px;\" colspan=\"2\"> <td style=\"padding: 10px;padding-left:25px;font-family: Arial, Helvetica, sans-serif; font-size: 25px; width: 109%; height: 348px;\" colspan=\"2\"> <p>Hello #NameEN#,</p><br><p>New Created Challenge .</p><br><p>Best Regards,</p></td></tr></tbody></table>",
  3239. EmailBodyAR = "<table lang =\"ar-sa\" style = \"border: 1px solid #bfbfbf; width: 60%;font-family: Arial, Helvetica, sans-serif; font-size: 25px;\" cellspacing =\"0\" align =\"center\">< tbody ><tr><td style =\"padding: 0px; text-align: right; font-size: 25px;\"><p style=\"direction:rtl; text-align: right;\" > مرحبا #NameAR#</p><p style=\"direction: rtl; text-align: right;\"><br></p><p style=\"direction: rtl; text-align: right;\">&nbsp;تم إنشاء تحدي جديد .</p><br><p style=\"direction: rtl; text-align: right;\">مع خالص الشكر والتقدير،،،</p></td></tr></tbody></table>",
  3240.  
  3241. SmsEN = "You received an Notfication Mail in your inbox\r\n(#Email#)",
  3242. SmsAR = "لقد تلقيت رسالة إخطار في بريدك الوارد\r\n(#Email#)",
  3243. EmailHtmlBodyTagAttributesEN = "style=\"direction:ltr;text-align: left;\"",
  3244. EmailHtmlBodyTagAttributesAR = "style=\"direction:rtl;text-align: right;\"",
  3245. LanguageModeItemID = 11001,
  3246. EmailHeaderAndFooterTemplate = baseTemplate,
  3247. Template = new Template()
  3248. {
  3249. CategoryItemID = 12001,
  3250. NameEN = " New created challenge Notification Template",
  3251. NameAR = "قالب إخطار التحدي الجديد",
  3252. DescriptionEN = "New created challenge Notification Template",
  3253. DescriptionAR = "قالب إخطار التحدي الجديد",
  3254. IsEmail = true,
  3255. IsSms = false,
  3256. OrganizationID = 1,
  3257. EnableIntensiveLogging = false,
  3258. }
  3259. });
  3260.  
  3261. //update Existing Notification Template
  3262. context.TemplateInfos.Add(new TemplateInfo()
  3263. {
  3264. ID = 4,
  3265. EmailSubjectEN = " Existing Challenge changed",
  3266. EmailSubjectAR = "تعديل التحدي",
  3267. EmailBodyEN = "<table lang=\"en\" style=\"border: 1px solid #bfbfbf; width: 60%;font-family: Arial, Helvetica, sans-serif; font-size: 25px;\" cellspacing=\"0\" align=\"center\"> <tbody> <tr style=\"margin-left:20px;\" colspan=\"2\"> <td style=\"padding: 10px;padding-left:25px;font-family: Arial, Helvetica, sans-serif; font-size: 25px; width: 109%; height: 348px;\" colspan=\"2\"> <p>Hello #NameEN#,</p><br><p>Existing Challenge changed .</p><br><p>Best Regards,</p></td></tr></tbody></table>",
  3268. EmailBodyAR = "<table lang =\"ar-sa\" style = \"border: 1px solid #bfbfbf; width: 60%;font-family: Arial, Helvetica, sans-serif; font-size: 25px;\" cellspacing =\"0\" align =\"center\">< tbody ><tr><td style =\"padding: 0px; text-align: right; font-size: 25px;\"><p style=\"direction:rtl; text-align: right;\" > مرحبا #NameAR#</p><p style=\"direction: rtl; text-align: right;\"><br></p><p style=\"direction: rtl; text-align: right;\">&nbsp; تم تعديل التحدي .</p><br><p style=\"direction: rtl; text-align: right;\">مع خالص الشكر والتقدير،،،</p></td></tr></tbody></table>",
  3269.  
  3270. SmsEN = "You received an Notfication Mail in your inbox\r\n(#Email#)",
  3271. SmsAR = "لقد تلقيت رسالة إخطار في بريدك الوارد\r\n(#Email#)",
  3272. EmailHtmlBodyTagAttributesEN = "style=\"direction:ltr;text-align: left;\"",
  3273. EmailHtmlBodyTagAttributesAR = "style=\"direction:rtl;text-align: right;\"",
  3274. LanguageModeItemID = 11001,
  3275. EmailHeaderAndFooterTemplate = baseTemplate,
  3276. Template = new Template()
  3277. {
  3278. CategoryItemID = 12001,
  3279. NameEN = " Existing Challenge changed Notification Template",
  3280. NameAR = "قالب إخطار تعديل التحدي ",
  3281. DescriptionEN = " Existing Challenge changed Notification Template",
  3282. DescriptionAR = "قالب إخطار تعديل التحدي ",
  3283. IsEmail = true,
  3284. IsSms = false,
  3285. OrganizationID = 1,
  3286. EnableIntensiveLogging = false,
  3287. }
  3288. });
  3289.  
  3290. }
  3291. public void CreateLookups(ClientAppContext context)
  3292. {
  3293. //Achivement types
  3294. context.Lookups.Add(new Lookup()
  3295. {
  3296. ID = 50,
  3297. NameEN = "Reward Type",
  3298. NameAR = "نوع الجائزة",
  3299. DescriptionEN = "Reward Type",
  3300. DescriptionAR = " نوع الجائزة",
  3301. Manageable = true,
  3302. SysName = "RewardType"
  3303. });
  3304. context.LookupItems.Add(new ClientLookupItem()
  3305. {
  3306. ID = 50001,
  3307. NameEN = "Comment",
  3308. NameAR = "تعليق",
  3309. DisplayOrder = 0,
  3310. LookupID = 50,
  3311. Manageable = true,
  3312. SysName = "Comment"
  3313.  
  3314. });
  3315. context.LookupItems.Add(new ClientLookupItem()
  3316. {
  3317. ID = 50002,
  3318. NameEN = "Reaching certain Point",
  3319. NameAR = "الوصول الي نقطة معينة",
  3320. DisplayOrder = 0,
  3321. LookupID = 50,
  3322. Manageable = true,
  3323. SysName = "ReachingPoint"
  3324.  
  3325. });
  3326. context.LookupItems.Add(new ClientLookupItem()
  3327. {
  3328. ID = 50003,
  3329. NameEN = "Submitting Idea",
  3330. NameAR = "تقديم الفكرة",
  3331. DisplayOrder = 0,
  3332. LookupID = 50,
  3333. Manageable = true,
  3334. SysName = "IdeaSubmit"
  3335.  
  3336. });
  3337. context.LookupItems.Add(new ClientLookupItem()
  3338. {
  3339. ID = 50004,
  3340. NameEN = "Approved Idea",
  3341. NameAR = "الفكرة المعتمدة ",
  3342. DisplayOrder = 0,
  3343. LookupID = 50,
  3344. Manageable = true,
  3345. SysName = "ApproveIdea"
  3346.  
  3347. });
  3348. context.LookupItems.Add(new ClientLookupItem()
  3349. {
  3350. ID = 50005,
  3351. NameEN = "Projectized Idea",
  3352. NameAR = "فكرة مخططة",
  3353. DisplayOrder = 0,
  3354. LookupID = 50,
  3355. Manageable = true,
  3356. SysName = "IdeaProjectize"
  3357.  
  3358. });
  3359. context.LookupItems.Add(new ClientLookupItem()
  3360. {
  3361. ID = 50006,
  3362. NameEN = "Vote",
  3363. NameAR = "تصويت",
  3364. DisplayOrder = 0,
  3365. LookupID = 50,
  3366. Manageable = true,
  3367. SysName = "Vote"
  3368.  
  3369. });
  3370.  
  3371.  
  3372. //Areas of focus type
  3373. context.Lookups.Add(new Lookup()
  3374. {
  3375. ID = 51,
  3376. NameEN = "Areas of focus Type",
  3377. NameAR = "نوع مجالات التركيز",
  3378. DescriptionEN = "Areas of focus Type",
  3379. DescriptionAR = "نوع مجالات التركيز",
  3380. Manageable = true,
  3381. SysName = "AreaOfFocusType"
  3382.  
  3383. });
  3384. context.LookupItems.Add(new ClientLookupItem()
  3385. {
  3386. ID = 51001,
  3387. NameEN = " Internal",
  3388. NameAR = "داخلي",
  3389. DisplayOrder = 0,
  3390. LookupID = 51,
  3391. Manageable = true,
  3392. SysName = "Internal"
  3393.  
  3394. });
  3395. context.LookupItems.Add(new ClientLookupItem()
  3396. {
  3397. ID = 51002,
  3398. NameEN = "External",
  3399. NameAR = "خارجي",
  3400. DisplayOrder = 0,
  3401. LookupID = 51,
  3402. Manageable = true,
  3403. SysName = "External"
  3404.  
  3405. });
  3406. context.LookupItems.Add(new ClientLookupItem()
  3407. {
  3408. ID = 51003,
  3409. NameEN = "National",
  3410. NameAR = "دولي",
  3411. DisplayOrder = 0,
  3412. LookupID = 51,
  3413. Manageable = true,
  3414. SysName = "National"
  3415.  
  3416. });
  3417.  
  3418.  
  3419. // Add Category lookup
  3420.  
  3421. context.Lookups.Add(new Lookup()
  3422. {
  3423. ID = 52,
  3424. NameEN = "Topics Category Type",
  3425. NameAR = "الفئة",
  3426. DescriptionEN = "Topics Category Type",
  3427. DescriptionAR = "الفئة",
  3428. Manageable = true,
  3429. SysName = "CategoryType"
  3430.  
  3431. });
  3432.  
  3433. // Add Tool Category lookup
  3434.  
  3435. context.Lookups.Add(new Lookup()
  3436. {
  3437. ID = 53,
  3438. NameEN = "Tool Category Type",
  3439. NameAR = "الفئة",
  3440. DescriptionEN = "Tool Category Type",
  3441. DescriptionAR = "الفئة",
  3442. Manageable = true,
  3443. SysName = "ToolCategoryType"
  3444.  
  3445. });
  3446. context.LookupItems.Add(new ClientLookupItem()
  3447. {
  3448. ID = 53001,
  3449. NameEN = "Look Ahead",
  3450. NameAR = "انظر الى الامام",
  3451. DisplayOrder = 0,
  3452. LookupID = 53,
  3453. Manageable = true,
  3454. SysName = "LookAhead"
  3455.  
  3456. });
  3457. context.LookupItems.Add(new ClientLookupItem()
  3458. {
  3459. ID = 53002,
  3460. NameEN = "Develop a Clear Plan",
  3461. NameAR = "تطوير خطة واضحة",
  3462. DisplayOrder = 0,
  3463. LookupID = 53,
  3464. Manageable = true,
  3465. SysName = "DevelopPlan"
  3466.  
  3467. });
  3468. context.LookupItems.Add(new ClientLookupItem()
  3469. {
  3470. ID = 53003,
  3471. NameEN = "Test and Improve ",
  3472. NameAR = "اختبار وتحسين",
  3473. DisplayOrder = 0,
  3474. LookupID = 53,
  3475. Manageable = true,
  3476. SysName = "TestAndImprove"
  3477.  
  3478. });
  3479. context.LookupItems.Add(new ClientLookupItem()
  3480. {
  3481. ID = 53004,
  3482. NameEN = "Collect Inputs from Others ",
  3483. NameAR = "جمع المدخلات من الآخرين",
  3484. DisplayOrder = 0,
  3485. LookupID = 53,
  3486. Manageable = true,
  3487. SysName = "CollectInputFromOthers"
  3488.  
  3489. });
  3490. context.LookupItems.Add(new ClientLookupItem()
  3491. {
  3492. ID = 53005,
  3493. NameEN = "Generate new Ideas ",
  3494. NameAR = "توليد أفكار جديدة",
  3495. DisplayOrder = 0,
  3496. LookupID = 53,
  3497. Manageable = true,
  3498. SysName = "GenerateIdea"
  3499.  
  3500. });
  3501. context.LookupItems.Add(new ClientLookupItem()
  3502. {
  3503. ID = 53006,
  3504. NameEN = "Sustain and Implement ",
  3505. NameAR = "استدامة وتنفيذ",
  3506. DisplayOrder = 0,
  3507. LookupID = 53,
  3508. Manageable = true,
  3509. SysName = "SustainAndImplement"
  3510.  
  3511. });
  3512. context.LookupItems.Add(new ClientLookupItem()
  3513. {
  3514. ID = 53007,
  3515. NameEN = "Organizational Analysis",
  3516. NameAR = "التحليل التنظيمي",
  3517. DisplayOrder = 0,
  3518. LookupID = 53,
  3519. Manageable = true,
  3520. SysName = "OrganizationalAnalysis"
  3521.  
  3522. });
  3523. // add tool display template
  3524. context.Lookups.Add(new Lookup()
  3525. {
  3526. ID = 54,
  3527. NameEN = "Tool Display Template Type",
  3528. NameAR = "نوع النموذج المستخدم للأداة ",
  3529. DescriptionEN = "Tool Display Template Type",
  3530. DescriptionAR = "نوع النموذج المستخدم للأداة",
  3531. Manageable = true,
  3532. SysName = "ToolDisplayTemplateType"
  3533.  
  3534. });
  3535. context.LookupItems.Add(new ClientLookupItem()
  3536. {
  3537. ID = 54001,
  3538. NameEN = "2*2 Column",
  3539. NameAR = "2*2 طولي ",
  3540. DisplayOrder = 0,
  3541. LookupID = 54,
  3542. Manageable = true,
  3543. SysName = "2x2 Colum Type"
  3544.  
  3545. });
  3546. context.LookupItems.Add(new ClientLookupItem()
  3547. {
  3548. ID = 54002,
  3549. NameEN = "3*3 column",
  3550. NameAR = "3*3 طولي",
  3551. DisplayOrder = 0,
  3552. LookupID = 54,
  3553. Manageable = true,
  3554. SysName = "3x3 Colum Type"
  3555. });
  3556.  
  3557. // add Rescource category
  3558. context.Lookups.Add(new Lookup()
  3559. {
  3560. ID = 55,
  3561. NameEN = "Library Resource Category",
  3562. NameAR = "نوع الموارد",
  3563. DescriptionEN = "Library Resource Category",
  3564. DescriptionAR = "نوع الموارد",
  3565. Manageable = true,
  3566. SysName = "LibraryResourceCategory"
  3567. });
  3568. context.LookupItems.Add(new ClientLookupItem()
  3569. {
  3570. ID = 55001,
  3571. NameEN = "Reports",
  3572. NameAR = "تقارير ",
  3573. DisplayOrder = 0,
  3574. LookupID = 55,
  3575. Manageable = true,
  3576. SysName = "Reports"
  3577.  
  3578. });
  3579. context.LookupItems.Add(new ClientLookupItem()
  3580. {
  3581. ID = 55002,
  3582. NameEN = "Templates",
  3583. NameAR = "نماذج",
  3584. DisplayOrder = 0,
  3585. LookupID = 55,
  3586. Manageable = true,
  3587. SysName = "Templates"
  3588. });
  3589. context.LookupItems.Add(new ClientLookupItem()
  3590. {
  3591. ID = 55003,
  3592. NameEN = "Process",
  3593. NameAR = "معالجة",
  3594. DisplayOrder = 0,
  3595. LookupID = 55,
  3596. Manageable = true,
  3597. SysName = "Process"
  3598.  
  3599. });
  3600. context.LookupItems.Add(new ClientLookupItem()
  3601. {
  3602. ID = 55004,
  3603. NameEN = "References",
  3604. NameAR = "مراجع",
  3605. DisplayOrder = 0,
  3606. LookupID = 55,
  3607. Manageable = true,
  3608. SysName = "References"
  3609. });
  3610.  
  3611. // add CaseStudy Categories
  3612. context.Lookups.Add(new Lookup()
  3613. {
  3614. ID = 56,
  3615. NameEN = "Case Study Category",
  3616. NameAR = "نوع دراسة الحالة",
  3617. DescriptionEN = "Case Study Category",
  3618. DescriptionAR = "نوع دراسة الحالة",
  3619. Manageable = true,
  3620. SysName = "CaseStudyCategory"
  3621. });
  3622. context.LookupItems.Add(new ClientLookupItem()
  3623. {
  3624. ID = 56001,
  3625. NameEN = "Product",
  3626. NameAR = "منتج",
  3627. DisplayOrder = 0,
  3628. LookupID = 56,
  3629. Manageable = true,
  3630. SysName = "Product"
  3631. });
  3632. context.LookupItems.Add(new ClientLookupItem()
  3633. {
  3634. ID = 56002,
  3635. NameEN = "Services",
  3636. NameAR = "خدمات",
  3637. DisplayOrder = 0,
  3638. LookupID = 56,
  3639. Manageable = true,
  3640. SysName = "Services"
  3641. });
  3642. context.LookupItems.Add(new ClientLookupItem()
  3643. {
  3644. ID = 56003,
  3645. NameEN = "Business Model",
  3646. NameAR = "نموذج عمل",
  3647. DisplayOrder = 0,
  3648. LookupID = 56,
  3649. Manageable = true,
  3650. SysName = "BusinessModel"
  3651. });
  3652. // add LangValidation Categories
  3653. context.Lookups.Add(new Bnsights.CoreLib.Model.Lookup()
  3654. {
  3655. ID = 57,
  3656. NameEN = "Validation Language",
  3657. NameAR = "لغة التحقق",
  3658. DescriptionEN = "Validation Language",
  3659. DescriptionAR = "لغة التحقق",
  3660. Manageable = true,
  3661. SysName = "ValidationLanguage"
  3662. });
  3663. context.LookupItems.Add(new ClientLookupItem()
  3664. {
  3665. ID = 57001,
  3666. NameEN = "English",
  3667. NameAR = "اللغة الإنجليزية",
  3668. DisplayOrder = 1,
  3669. LookupID = 57,
  3670. Manageable = false,
  3671. SysName = "EnglishLkupItem"
  3672. });
  3673. context.LookupItems.Add(new ClientLookupItem()
  3674. {
  3675. ID = 57002,
  3676. NameEN = "Arabic",
  3677. NameAR = "اللغة العربية",
  3678. DisplayOrder = 1,
  3679. LookupID = 57,
  3680. Manageable = false,
  3681. SysName = "ArabicLkupItem"
  3682. });
  3683. context.LookupItems.Add(new ClientLookupItem()
  3684. {
  3685. ID = 57003,
  3686. NameEN = "Any",
  3687. NameAR = "أيهما",
  3688. DisplayOrder = 1,
  3689. LookupID = 57,
  3690. Manageable = false,
  3691. SysName = "AnyLkupItem"
  3692. });
  3693. // add DataTypes Categories
  3694. context.Lookups.Add(new Bnsights.CoreLib.Model.Lookup()
  3695. {
  3696. ID = 58,
  3697. NameEN = "Data Types",
  3698. NameAR = "انواع البيانات",
  3699. DescriptionEN = "Data Types",
  3700. DescriptionAR = "انواع البيانات",
  3701. Manageable = true,
  3702. SysName = "DataTypes58"
  3703. });
  3704. context.LookupItems.Add(new ClientLookupItem()
  3705. {
  3706. ID = 58001,
  3707. NameEN = "Text",
  3708. NameAR = "نص كتابي",
  3709. DisplayOrder = 1,
  3710. LookupID = 58,
  3711. Manageable = false,
  3712. SysName = "Text58"
  3713. });
  3714. context.LookupItems.Add(new ClientLookupItem()
  3715. {
  3716. ID = 58002,
  3717. NameEN = "MultiLine Text",
  3718. NameAR = "نص متعدد الخطوط",
  3719. DisplayOrder = 2,
  3720. LookupID = 58,
  3721. Manageable = false,
  3722. SysName = "MultiLineText58"
  3723. });
  3724. context.LookupItems.Add(new ClientLookupItem()
  3725. {
  3726. ID = 58003,
  3727. NameEN = "HTML",
  3728. NameAR = "نص رمزي",
  3729. DisplayOrder = 3,
  3730. LookupID = 58,
  3731. Manageable = false,
  3732. SysName = "Html58"
  3733. });
  3734. context.LookupItems.Add(new ClientLookupItem()
  3735. {
  3736. ID = 58004,
  3737. NameEN = "Number",
  3738. NameAR = "رقم",
  3739. DisplayOrder = 4,
  3740. LookupID = 58,
  3741. Manageable = false,
  3742. SysName = "Nunmber58"
  3743. });
  3744. context.LookupItems.Add(new ClientLookupItem()
  3745. {
  3746. ID = 58005,
  3747. NameEN = "Multiple Select",
  3748. NameAR = "متعدد الأختيارات",
  3749. DisplayOrder = 5,
  3750. LookupID = 58,
  3751. Manageable = false,
  3752. });
  3753. context.LookupItems.Add(new ClientLookupItem()
  3754. {
  3755. ID = 58006,
  3756. NameEN = "Image",
  3757. NameAR = "صورة",
  3758. DisplayOrder = 6,
  3759. LookupID = 58,
  3760. Manageable = false,
  3761. SysName = "Image58"
  3762. });
  3763. context.LookupItems.Add(new ClientLookupItem()
  3764. {
  3765. ID = 58007,
  3766. NameEN = "File",
  3767. NameAR = "ملف",
  3768. DisplayOrder = 7,
  3769. LookupID = 58,
  3770. Manageable = false,
  3771. SysName = "File58"
  3772. });
  3773. context.LookupItems.Add(new ClientLookupItem()
  3774. {
  3775. ID = 58008,
  3776. NameEN = "MultiFile",
  3777. NameAR = "ملفات متعددة",
  3778. DisplayOrder = 8,
  3779. LookupID = 58,
  3780. Manageable = false,
  3781. SysName = "MultiFile58"
  3782. });
  3783. context.LookupItems.Add(new ClientLookupItem()
  3784. {
  3785. ID = 58009,
  3786. NameEN = "True/False",
  3787. NameAR = "صح/خطا",
  3788. DisplayOrder = 9,
  3789. LookupID = 58,
  3790. Manageable = false,
  3791. SysName = "TrueFalse"
  3792. });
  3793. context.LookupItems.Add(new ClientLookupItem()
  3794. {
  3795. ID = 58010,
  3796. NameEN = "Single Select",
  3797. NameAR = "ذاتي الأختيار",
  3798. DisplayOrder = 10,
  3799. LookupID = 58,
  3800. Manageable = false,
  3801. SysName = "SingleSelect58"
  3802. });
  3803. context.LookupItems.Add(new ClientLookupItem()
  3804. {
  3805. ID = 58011,
  3806. NameEN = "Date",
  3807. NameAR = "التاريخ",
  3808. DisplayOrder = 11,
  3809. LookupID = 58,
  3810. Manageable = false,
  3811. SysName = "Date58"
  3812. });
  3813. context.LookupItems.Add(new ClientLookupItem()
  3814. {
  3815. ID = 58012,
  3816. NameEN = "DateTime",
  3817. NameAR = "تاريخ الوقت",
  3818. DisplayOrder = 12,
  3819. LookupID = 58,
  3820. Manageable = false,
  3821. SysName = "DateTime58"
  3822. });
  3823. context.LookupItems.Add(new ClientLookupItem()
  3824. {
  3825. ID = 58013,
  3826. NameEN = "Time",
  3827. NameAR = "توقيت",
  3828. DisplayOrder = 13,
  3829. LookupID = 58,
  3830. Manageable = false,
  3831. SysName = "Time58"
  3832. });
  3833. context.LookupItems.Add(new ClientLookupItem()
  3834. {
  3835. ID = 58014,
  3836. NameEN = "Location",
  3837. NameAR = "موقع",
  3838. DisplayOrder = 14,
  3839. LookupID = 58,
  3840. Manageable = false,
  3841. SysName = "Location58"
  3842. });
  3843. context.LookupItems.Add(new ClientLookupItem()
  3844. {
  3845. ID = 58015,
  3846. NameEN = "Tags",
  3847. NameAR = "مواضيع",
  3848. DisplayOrder = 15,
  3849. LookupID = 58,
  3850. Manageable = false,
  3851. SysName = "Tags58"
  3852. });
  3853. context.LookupItems.Add(new ClientLookupItem()
  3854. {
  3855. ID = 58016,
  3856. NameEN = "Goal",
  3857. NameAR = "هدف",
  3858. DisplayOrder = 16,
  3859. LookupID = 58,
  3860. Manageable = false,
  3861. SysName = "Goal58"
  3862. });
  3863. context.LookupItems.Add(new ClientLookupItem()
  3864. {
  3865. ID = 58017,
  3866. NameEN = "Challenge",
  3867. NameAR = "تحدي",
  3868. DisplayOrder = 17,
  3869. LookupID = 58,
  3870. Manageable = false,
  3871. SysName = "Challenge58"
  3872. });
  3873. context.LookupItems.Add(new ClientLookupItem()
  3874. {
  3875. ID = 58018,
  3876. NameEN = "Areas of Focus",
  3877. NameAR = "مجالات التركيز",
  3878. DisplayOrder = 18,
  3879. LookupID = 58,
  3880. Manageable = false,
  3881. SysName = "AreasOfFocus58"
  3882. });
  3883. context.Lookups.Add(new Bnsights.CoreLib.Model.Lookup()
  3884. {
  3885. ID = 59,
  3886. NameEN = "Display Style",
  3887. NameAR = "نوع العرض",
  3888. DescriptionEN = "Display Style",
  3889. DescriptionAR = "نوع العرض",
  3890. Manageable = true,
  3891. SysName = "DisplayStyle59"
  3892. });
  3893. context.LookupItems.Add(new ClientLookupItem()
  3894. {
  3895. ID = 59001,
  3896. NameEN = "Full Width",
  3897. NameAR = "عرض كامل",
  3898. DisplayOrder = 1,
  3899. LookupID = 59,
  3900. Manageable = false,
  3901. SysName = "FullWidth59"
  3902. });
  3903. context.LookupItems.Add(new ClientLookupItem()
  3904. {
  3905. ID = 59002,
  3906. NameEN = "Half Width",
  3907. NameAR = "نصف عرض",
  3908. DisplayOrder = 2,
  3909. LookupID = 59,
  3910. Manageable = false,
  3911. SysName = "HalfWidth59"
  3912. });
  3913. }
  3914. public void CreateNewUser(ClientAppContext context)
  3915. {
  3916. Organization org = context.Organizations.First();
  3917. context.InsertPermissionSet(new Bnsights.CoreLib.Model.PermissionSet()
  3918. {
  3919. ID = (int)PermissionSets.User,
  3920. NameEN = "User",
  3921. NameAR = "مستخدم",
  3922. Organization = org,
  3923. SysName = "User"
  3924. });
  3925. Bnsights.CoreLib.Model.PermissionSet memberPscid = context.PermissionSets.Find((int)PermissionSets.User);
  3926. Bnsights.CoreLib.Common.StringHelper.RandomStringGenerator gen = new Bnsights.CoreLib.Common.StringHelper.RandomStringGenerator(UseSpecialCharacters: false);
  3927.  
  3928.  
  3929. context.Users.Add(new User
  3930. {
  3931. Username = "allusers@bnsights.com",
  3932. LanguageKey = "en",
  3933. NameAR = "عضو جديد",
  3934. NameEN = "New Member",
  3935. PermissionSets = new List<Bnsights.CoreLib.Model.PermissionSet>() { memberPscid },
  3936. PermissionSetSID = memberPscid.ID.ToString(),
  3937. UserInfos = new List<UserInfo>()
  3938. {
  3939. new UserInfo()
  3940. {
  3941. ID = 2,
  3942. ActivationDate = DateTime.UtcNow,
  3943. CanLogin = true,
  3944. Email ="allusers@bnsights.com",
  3945. IsActive = true,
  3946. IsLicensed = true,
  3947. LastPasswordChangeDate = DateTime.UtcNow,
  3948. Password = "1000:jEv6ncBiS3w/8n2E6HdkwyssR0a/tAew:42sosC/iHbZ1hU6OaZf2t9MkTWMELzXz",
  3949. Token = gen.Generate(25),
  3950. Token_CanExpire = true,
  3951. Token_IsCompleted = true,
  3952. }
  3953. },
  3954. Organization = org,
  3955. });
  3956.  
  3957. }
  3958.  
  3959. public void addUserArea_201808131504466(ClientAppContext context)
  3960. {
  3961. Bnsights.CoreLib.Common.StringHelper.RandomStringGenerator gen = new Bnsights.CoreLib.Common.StringHelper.RandomStringGenerator(UseSpecialCharacters: false);
  3962. Organization org = context.Organizations.First();
  3963.  
  3964. var user = context.PermissionSets.Find((int)PermissionSets.User);
  3965.  
  3966. context.Users.Add(new User()
  3967. {
  3968. Username = "user@bnsights.com",
  3969. LanguageKey = "en",
  3970. NameAR = "مستخدم",
  3971. NameEN = "USer",
  3972. PermissionSets = new List<PermissionSet>() { user
  3973. },
  3974. PermissionSetSID = user.ID.ToString(),
  3975. UserInfos = new List<UserInfo>()
  3976. {
  3977. new UserInfo()
  3978. {
  3979. ID =3 ,
  3980. ActivationDate = DateTime.UtcNow,
  3981. CanLogin = true,
  3982. Email = "user@bnsights.com",
  3983. IsActive = true,
  3984. IsLicensed = true,
  3985. LastPasswordChangeDate = DateTime.UtcNow,
  3986. Password = "1000:jEv6ncBiS3w/8n2E6HdkwyssR0a/tAew:42sosC/iHbZ1hU6OaZf2t9MkTWMELzXz",
  3987. Token = gen.Generate(25),
  3988. Token_CanExpire = true,
  3989. Token_IsCompleted = true,
  3990. }
  3991. },
  3992. Organization = org,
  3993. });
  3994. }
  3995. public void seedingHelpCategoriesAndTopics_201808150840458(ClientAppContext context)
  3996. {
  3997. seedingTopics1(context);
  3998. }
  3999. public void seedingTopics1(ClientAppContext context)
  4000. {
  4001. context.Topics.Add(new Topic { ID = 1, TopicEN = "Achievement", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 1, NameEN = "Achievement", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4002. context.Topics.Add(new Topic { ID = 2, TopicEN = "Add Achievement ", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4003. context.Topics.Add(new Topic { ID = 3, TopicEN = "Edit Achievement", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4004.  
  4005. context.Topics.Add(new Topic { ID = 4, TopicEN = "Agenda", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 2, NameEN = "Agenda", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4006. context.Topics.Add(new Topic { ID = 5, TopicEN = "Add Agenda ", TopicAR = "No Data", CategoryID = 2, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4007. context.Topics.Add(new Topic { ID = 6, TopicEN = "Edit Agenda", TopicAR = "No Data", CategoryID = 2, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4008.  
  4009. context.Topics.Add(new Topic { ID = 7, TopicEN = "Badge", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 3, NameEN = "Badge", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4010. context.Topics.Add(new Topic { ID = 8, TopicEN = "Add Badge", TopicAR = "No Data", CategoryID = 3, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4011. context.Topics.Add(new Topic { ID = 9, TopicEN = "Edit Badge ", TopicAR = "No Data", CategoryID = 3, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4012.  
  4013. context.Topics.Add(new Topic { ID = 10, TopicEN = "CaseStudy", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 4, NameEN = "CaseStudy", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4014. context.Topics.Add(new Topic { ID = 11, TopicEN = "Add CaseStudy ", TopicAR = "No Data", CategoryID = 4, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4015. context.Topics.Add(new Topic { ID = 12, TopicEN = "Edit CaseStudy ", TopicAR = "No Data", CategoryID = 4, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4016.  
  4017. context.Topics.Add(new Topic { ID = 13, TopicEN = "Challenge", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 5, NameEN = "Challenge", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4018. context.Topics.Add(new Topic { ID = 14, TopicEN = "Add Challenge ", TopicAR = "No Data", CategoryID = 5, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4019. context.Topics.Add(new Topic { ID = 15, TopicEN = "Edit Challenge ", TopicAR = "No Data", CategoryID = 5, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4020.  
  4021. context.Topics.Add(new Topic { ID = 16, TopicEN = "Chapter", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 6, NameEN = "Chapter", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4022. context.Topics.Add(new Topic { ID = 17, TopicEN = "Add Chapter ", TopicAR = "No Data", Visible = true, CategoryID = 6, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4023. context.Topics.Add(new Topic { ID = 18, TopicEN = "Edit Chapter ", TopicAR = "No Data", Visible = true, CategoryID = 6, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4024.  
  4025. context.Topics.Add(new Topic { ID = 19, TopicEN = "Criterion", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 7, NameEN = "Criterion", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4026. context.Topics.Add(new Topic { ID = 20, TopicEN = "Add Criterion ", TopicAR = "No Data", Visible = true, CategoryID = 7, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4027. context.Topics.Add(new Topic { ID = 21, TopicEN = "Edit Criterion ", TopicAR = "No Data", Visible = true, CategoryID = 7, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4028.  
  4029. context.Topics.Add(new Topic { ID = 22, TopicEN = "Element", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 8, NameEN = "Element", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4030. context.Topics.Add(new Topic { ID = 23, TopicEN = "Add Element ", TopicAR = "No Data", Visible = true, CategoryID = 8, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4031. context.Topics.Add(new Topic { ID = 24, TopicEN = "EditElement ", TopicAR = "No Data", Visible = true, CategoryID = 8, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4032.  
  4033. context.Topics.Add(new Topic { ID = 25, TopicEN = "Evaluation Criteria", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 9, NameEN = "Evaluation Criteria", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4034. context.Topics.Add(new Topic { ID = 26, TopicEN = "Add Evaluation Criteria ", TopicAR = "No Data", Visible = true, CategoryID = 9, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4035. context.Topics.Add(new Topic { ID = 27, TopicEN = "Edit Evaluation Criteria ", TopicAR = "No Data", Visible = true, CategoryID = 9, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4036.  
  4037. context.Topics.Add(new Topic { ID = 28, TopicEN = "Focus ", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 10, NameEN = "Focus", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4038. context.Topics.Add(new Topic { ID = 29, TopicEN = "Add Focus ", TopicAR = "No Data", Visible = true, CategoryID = 10, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4039. context.Topics.Add(new Topic { ID = 30, TopicEN = "Edit Focus ", TopicAR = "No Data", Visible = true, CategoryID = 10, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4040.  
  4041. context.Topics.Add(new Topic { ID = 31, TopicEN = "Goal ", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 11, NameEN = "Goal", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4042. context.Topics.Add(new Topic { ID = 32, TopicEN = "Add Goal ", TopicAR = "No Data", Visible = true, CategoryID = 11, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4043. context.Topics.Add(new Topic { ID = 33, TopicEN = "Edit Goal ", TopicAR = "No Data", Visible = true, CategoryID = 11, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4044.  
  4045.  
  4046. context.Topics.Add(new Topic { ID = 34, TopicEN = "Help ", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 12, NameEN = "Help", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4047. context.Topics.Add(new Topic { ID = 35, TopicEN = "Add Help ", TopicAR = "No Data", Visible = true, CategoryID = 12, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4048. context.Topics.Add(new Topic { ID = 36, TopicEN = "Edit Help ", TopicAR = "No Data", Visible = true, CategoryID = 12, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4049.  
  4050. context.Topics.Add(new Topic { ID = 37, TopicEN = "Idea ", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 13, NameEN = "Idea", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4051. context.Topics.Add(new Topic { ID = 38, TopicEN = "Add Idea ", TopicAR = "No Data", Visible = true, CategoryID = 13, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4052. context.Topics.Add(new Topic { ID = 39, TopicEN = "Edit Idea ", TopicAR = "No Data", Visible = true, CategoryID = 13, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4053.  
  4054. context.Topics.Add(new Topic { ID = 40, TopicEN = "Idea Field ", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 14, NameEN = "Idea Field", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4055. context.Topics.Add(new Topic { ID = 41, TopicEN = "Add Idea Field ", TopicAR = "No Data", Visible = true, CategoryID = 14, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4056. context.Topics.Add(new Topic { ID = 42, TopicEN = "Edit Idea Field ", TopicAR = "No Data", Visible = true, CategoryID = 14, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4057.  
  4058. context.Topics.Add(new Topic { ID = 43, TopicEN = "Innovation lab", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 15, NameEN = "Innovation lab", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4059. context.Topics.Add(new Topic { ID = 44, TopicEN = "Add Innovation lab ", TopicAR = "No Data", Visible = true, CategoryID = 15, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4060. context.Topics.Add(new Topic { ID = 45, TopicEN = "Edit Innovation lab ", TopicAR = "No Data", Visible = true, CategoryID = 15, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4061.  
  4062. context.Topics.Add(new Topic { ID = 46, TopicEN = "Library Resource", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 16, NameEN = "Library Resource", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4063. context.Topics.Add(new Topic { ID = 47, TopicEN = "Add Library Resource ", TopicAR = "No Data", Visible = true, CategoryID = 16, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4064. context.Topics.Add(new Topic { ID = 48, TopicEN = "Edit Library Resource ", TopicAR = "No Data", Visible = true, CategoryID = 16, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4065.  
  4066. context.Topics.Add(new Topic { ID = 49, TopicEN = "Innovation HandBook", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 17, NameEN = "Module", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4067. context.Topics.Add(new Topic { ID = 50, TopicEN = "Add Innovation HandBook ", TopicAR = "No Data", Visible = true, CategoryID = 17, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4068. context.Topics.Add(new Topic { ID = 51, TopicEN = "Edit Innovation HandBook", TopicAR = "No Data", Visible = true, CategoryID = 17, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4069.  
  4070. context.Topics.Add(new Topic { ID = 52, TopicEN = "Module Topic", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 18, NameEN = "Module Topic", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4071. context.Topics.Add(new Topic { ID = 53, TopicEN = "Add Module Topic ", TopicAR = "No Data", Visible = true, CategoryID = 18, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4072. context.Topics.Add(new Topic { ID = 54, TopicEN = "Edit Module Topic ", TopicAR = "No Data", Visible = true, CategoryID = 18, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4073.  
  4074. context.Topics.Add(new Topic { ID = 55, TopicEN = "Session", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 19, NameEN = "Session", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4075. context.Topics.Add(new Topic { ID = 56, TopicEN = "Add Session ", TopicAR = "No Data", Visible = true, CategoryID = 19, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4076. context.Topics.Add(new Topic { ID = 57, TopicEN = "Edit Session ", TopicAR = "No Data", Visible = true, CategoryID = 19, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4077.  
  4078. context.Topics.Add(new Topic { ID = 58, TopicEN = "Team", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 20, NameEN = "Team", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4079. context.Topics.Add(new Topic { ID = 59, TopicEN = "Add Team ", TopicAR = "No Data", Visible = true, CategoryID = 20, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4080. context.Topics.Add(new Topic { ID = 60, TopicEN = "Edit Team ", TopicAR = "No Data", Visible = true, CategoryID = 20, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4081.  
  4082. context.Topics.Add(new Topic { ID = 61, TopicEN = "Tool", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 21, NameEN = "Tool", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4083. context.Topics.Add(new Topic { ID = 62, TopicEN = "Add Tool ", TopicAR = "No Data", Visible = true, CategoryID = 21, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4084. context.Topics.Add(new Topic { ID = 63, TopicEN = "Edit Tool ", TopicAR = "No Data", Visible = true, CategoryID = 21, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4085.  
  4086. context.Topics.Add(new Topic { ID = 64, TopicEN = "Topic Category", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 22, NameEN = "Topic Category", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4087. context.Topics.Add(new Topic { ID = 65, TopicEN = "Add Topic Category ", TopicAR = "No Data", Visible = true, CategoryID = 22, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4088. context.Topics.Add(new Topic { ID = 66, TopicEN = "Edit Topic Category ", TopicAR = "No Data", Visible = true, CategoryID = 22, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4089.  
  4090. }
  4091.  
  4092. public void toolNewFields_201810301243397(ClientAppContext context)
  4093. {
  4094. var lvlOfDif = new Bnsights.CoreLib.Model.Lookup()
  4095. {
  4096. ID = 60,
  4097. NameEN = "Level Of Difficulty",
  4098. NameAR = "مستوى الصعوبة",
  4099. Manageable = true,
  4100. SysName = "LevelOfDifficulty"
  4101.  
  4102. };
  4103. lvlOfDif.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4104. {
  4105. LookupID = 60,
  4106. ID = 60001,
  4107. NameEN = "Moderate",
  4108. NameAR = "معتدل",
  4109. SysName = "Moderate"
  4110.  
  4111. });
  4112. lvlOfDif.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4113. {
  4114. LookupID = 60,
  4115. ID = 60002,
  4116. NameEN = "Easy",
  4117. NameAR = "سهل",
  4118. SysName = "Easy",
  4119. Manageable = true,
  4120.  
  4121. });
  4122.  
  4123. var suggestedTime = new Bnsights.CoreLib.Model.Lookup()
  4124. {
  4125. ID = 61,
  4126. NameEN = "Suggested Time",
  4127. NameAR = "الوقت المقترح",
  4128. SysName = "SuggestedTime",
  4129. Manageable = true,
  4130.  
  4131.  
  4132. };
  4133. suggestedTime.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4134. {
  4135. LookupID = 61,
  4136. ID = 61001,
  4137. NameEN = "30 Minutes",
  4138. NameAR = "30 دقيقة",
  4139. SysName = "Minutes30",
  4140.  
  4141. });
  4142. suggestedTime.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4143. {
  4144. LookupID = 61,
  4145. ID = 61002,
  4146. NameEN = "60 Minutes",
  4147. NameAR = "60 دقيقة",
  4148. Manageable = true,
  4149. SysName = "Minutes60",
  4150.  
  4151. });
  4152.  
  4153. context.Lookups.Add(lvlOfDif);
  4154. context.Lookups.Add(suggestedTime);
  4155. context.SaveChanges();
  4156.  
  4157. }
  4158. public void toolChangesNewType_201811041132173(ClientAppContext context)
  4159. {
  4160. var toolType = new Bnsights.CoreLib.Model.Lookup()
  4161. {
  4162. ID = 62,
  4163. NameEN = "Tool Type",
  4164. NameAR = "نوع الأداة",
  4165. SysName = "ToolType",
  4166. Manageable = true,
  4167. };
  4168. toolType.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4169. {
  4170. LookupID = 62,
  4171. ID = 62001,
  4172. NameEN = "Normal Grid",
  4173. NameAR = "الشبكة العادية",
  4174. Manageable = true,
  4175. SysName = "NormalGrid",
  4176.  
  4177. });
  4178. toolType.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4179. {
  4180. LookupID = 62,
  4181. ID = 62002,
  4182. NameEN = "Matrices Grid",
  4183. NameAR = "شبكة المصفوفات",
  4184. Manageable = true,
  4185. SysName = "MatricesGrid",
  4186.  
  4187. });
  4188.  
  4189.  
  4190. }
  4191. public void IdeaFeatures_201811221145569(ClientAppContext context)
  4192. {
  4193. var interactionType = new Bnsights.CoreLib.Model.Lookup()
  4194. {
  4195. ID = (int)ClientLookups.InteractionType,
  4196. NameEN = "Interaction Type",
  4197. NameAR = "نوع التفاعل",
  4198. Manageable = false,
  4199. SysName = "InteractionType",
  4200.  
  4201.  
  4202. };
  4203. interactionType.LookupItems.Add(new ClientLookupItem()
  4204. {
  4205. LookupID = (int)ClientLookups.InteractionType,
  4206. ID = (int)InteractionType.Like,
  4207. NameEN = "Like",
  4208. NameAR = "اعجاب",
  4209. Manageable = false,
  4210. SysName = "Like"
  4211. });
  4212.  
  4213. interactionType.LookupItems.Add(new ClientLookupItem()
  4214. {
  4215. LookupID = (int)ClientLookups.InteractionType,
  4216. ID = (int)InteractionType.Dislike,
  4217. NameEN = "Dislike",
  4218. NameAR = "لم يعجبنى",
  4219. Manageable = false,
  4220. SysName = "Dislike"
  4221.  
  4222. });
  4223.  
  4224. interactionType.LookupItems.Add(new ClientLookupItem()
  4225. {
  4226. LookupID = (int)ClientLookups.InteractionType,
  4227. ID = (int)InteractionType.Follow,
  4228. NameEN = "Follow Idea",
  4229. NameAR = "اتبع الفكرة",
  4230. Manageable = false,
  4231. SysName = "FollowIdea"
  4232.  
  4233. });
  4234.  
  4235. interactionType.LookupItems.Add(new ClientLookupItem()
  4236. {
  4237. LookupID = (int)ClientLookups.InteractionType,
  4238. ID = (int)InteractionType.Favorite,
  4239. NameEN = "Favorite Idea",
  4240. NameAR = "الفكرة المفضلة",
  4241. Manageable = false,
  4242. SysName = "FavIdea"
  4243. });
  4244.  
  4245. context.Lookups.Add(interactionType);
  4246.  
  4247. var contributorType = new Bnsights.CoreLib.Model.Lookup()
  4248. {
  4249. ID = (int)ClientLookups.ContributorType,
  4250. NameEN = "Contributor Type",
  4251. NameAR = "نوع المساهم",
  4252. Manageable = false,
  4253. SysName = "ContributorType"
  4254.  
  4255. };
  4256. contributorType.LookupItems.Add(new ClientLookupItem()
  4257. {
  4258. LookupID = (int)ClientLookups.ContributorType,
  4259. ID = (int)ContributorType.OwnerLike,
  4260. NameEN = "Owner",
  4261. NameAR = "مالك",
  4262. Manageable = false,
  4263. SysName = "Owner"
  4264. });
  4265.  
  4266. contributorType.LookupItems.Add(new ClientLookupItem()
  4267. {
  4268. LookupID = (int)ClientLookups.ContributorType,
  4269. ID = (int)ContributorType.Secondary,
  4270. NameEN = "Secondary Contributor",
  4271. NameAR = "مساهم ثانوي",
  4272. Manageable = false,
  4273. SysName = "SecondryContributor"
  4274. });
  4275. context.Lookups.Add(contributorType);
  4276.  
  4277. context.SaveChanges();
  4278.  
  4279.  
  4280.  
  4281. }
  4282. public void NewCommentInteractionType_201811261330396(ClientAppContext context)
  4283. {
  4284. context.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4285. {
  4286. ID = (int)InteractionType.Comment,
  4287. LookupID = (int)ClientLookups.InteractionType,
  4288. NameAR = "علق",
  4289. NameEN = "Commented",
  4290. Manageable = false,
  4291. SysName = "Commented"
  4292. });
  4293.  
  4294. context.SaveChanges();
  4295. }
  4296. public void IdeaStatus_201812161514534(ClientAppContext context)
  4297. {
  4298. var ideaStatus = new Bnsights.CoreLib.Model.Lookup()
  4299. {
  4300. ID = 65,
  4301. NameEN = "Idea Status",
  4302. NameAR = "حالة الفكرة",
  4303. Manageable = false,
  4304. SysName = "IdeaStatus"
  4305. };
  4306.  
  4307. ideaStatus.LookupItems.Add(new ClientLookupItem()
  4308. {
  4309. LookupID = 65,
  4310. ID = 65001,
  4311. NameEN = "Draft",
  4312. NameAR = "مسودة",
  4313. Manageable = false,
  4314. SysName = "Draft"
  4315.  
  4316. });
  4317.  
  4318. ideaStatus.LookupItems.Add(new ClientLookupItem()
  4319. {
  4320. LookupID = 65,
  4321. ID = 65002,
  4322. NameEN = "Published",
  4323. NameAR = "نشرت",
  4324. Manageable = false,
  4325. SysName = "Published"
  4326. });
  4327. context.Lookups.Add(ideaStatus);
  4328. context.SaveChanges();
  4329. }
  4330. public void StatusDescriptionFix_201812161514534(ClientAppContext context)
  4331. {
  4332.  
  4333.  
  4334. }
  4335. public void AddActivityStatus_201812191329286(ClientAppContext context)
  4336. {
  4337. var activityStatus = new Bnsights.CoreLib.Model.Lookup()
  4338. {
  4339. ID = (int)ClientLookups.ActivityStatus,
  4340. NameEN = "Activity Status",
  4341. NameAR = "حالة النشاط",
  4342. Manageable = false,
  4343. SysName = "ActivityStatus"
  4344. };
  4345.  
  4346. activityStatus.LookupItems.Add(new ClientLookupItem()
  4347. {
  4348. ID = (int)Activitystatus.Started,
  4349. NameEN = "Started",
  4350. NameAR = "بدأت",
  4351. DisplayOrder = 0,
  4352. LookupID = (int)ClientLookups.ActivityStatus,
  4353. Manageable = true,
  4354. SysName = "Started"
  4355. });
  4356.  
  4357.  
  4358. activityStatus.LookupItems.Add(new ClientLookupItem()
  4359. {
  4360. ID = (int)Activitystatus.NotCompleted,
  4361. NameEN = "Not Completed",
  4362. NameAR = "غير مكتمل",
  4363. DisplayOrder = 0,
  4364. LookupID = (int)ClientLookups.ActivityStatus,
  4365. Manageable = true,
  4366. SysName = "NotCompleted"
  4367.  
  4368. });
  4369.  
  4370. activityStatus.LookupItems.Add(new ClientLookupItem()
  4371. {
  4372. ID = (int)Activitystatus.NotStarted,
  4373. NameEN = "Not Started",
  4374. NameAR = "لم يبدأ",
  4375. DisplayOrder = 0,
  4376. LookupID = (int)ClientLookups.ActivityStatus,
  4377. Manageable = true,
  4378. SysName = "NotStarted"
  4379.  
  4380. });
  4381.  
  4382. activityStatus.LookupItems.Add(new ClientLookupItem()
  4383. {
  4384. ID = (int)Activitystatus.Completed,
  4385. NameEN = "Completed",
  4386. NameAR = "اكتمل",
  4387. DisplayOrder = 0,
  4388. LookupID = (int)ClientLookups.ActivityStatus,
  4389. Manageable = true,
  4390. SysName = "Completed"
  4391.  
  4392. });
  4393.  
  4394.  
  4395. context.Lookups.Add(activityStatus);
  4396. context.SaveChanges();
  4397. }
  4398. public void AddActivityStatusLookupItemAndIdeaFieldIsShown_201812230911239(ClientAppContext context)
  4399. {
  4400.  
  4401. }
  4402. public void SeedRiskLookups_201812251356131(ClientAppContext context)
  4403. {
  4404. var riskStatus = new Bnsights.CoreLib.Model.Lookup()
  4405. {
  4406. ID = (int)ClientLookups.RiskStatus,
  4407. NameEN = "Risk Status",
  4408. NameAR = "Risk Status AR",
  4409. Manageable = false,
  4410. };
  4411.  
  4412. riskStatus.LookupItems.Add(new ClientLookupItem()
  4413. {
  4414. ID = (int)Riskstatus.Open,
  4415. NameEN = "Open",
  4416. NameAR = "مفتوح",
  4417. DisplayOrder = 0,
  4418. LookupID = (int)ClientLookups.RiskStatus,
  4419. Manageable = true,
  4420. });
  4421.  
  4422.  
  4423. riskStatus.LookupItems.Add(new ClientLookupItem()
  4424. {
  4425. ID = (int)Riskstatus.Closed,
  4426. NameEN = "Closed",
  4427. NameAR = "مغلق",
  4428. DisplayOrder = 0,
  4429. LookupID = (int)ClientLookups.RiskStatus,
  4430. Manageable = true,
  4431. });
  4432.  
  4433. var impact = new Bnsights.CoreLib.Model.Lookup()
  4434. {
  4435. ID = (int)ClientLookups.Impact,
  4436. NameEN = "Impact",
  4437. NameAR = "Impact AR",
  4438. Manageable = false,
  4439. };
  4440.  
  4441. riskStatus.LookupItems.Add(new ClientLookupItem()
  4442. {
  4443. ID = (int)Impact.High,
  4444. NameEN = "High",
  4445. NameAR = "عالي",
  4446. DisplayOrder = 0,
  4447. LookupID = (int)ClientLookups.Impact,
  4448. Manageable = true,
  4449. });
  4450.  
  4451.  
  4452. riskStatus.LookupItems.Add(new ClientLookupItem()
  4453. {
  4454. ID = (int)Impact.Low,
  4455. NameEN = "Low",
  4456. NameAR = "منخفض",
  4457. DisplayOrder = 0,
  4458. LookupID = (int)ClientLookups.Impact,
  4459. Manageable = true,
  4460. });
  4461.  
  4462. riskStatus.LookupItems.Add(new ClientLookupItem()
  4463. {
  4464. ID = (int)Impact.Medium,
  4465. NameEN = "Medium",
  4466. NameAR = "متوسط",
  4467. DisplayOrder = 0,
  4468. LookupID = (int)ClientLookups.Impact,
  4469. Manageable = true,
  4470. });
  4471. riskStatus.LookupItems.Add(new ClientLookupItem()
  4472. {
  4473. ID = (int)Impact.AskForLeadership,
  4474. NameEN = "Ask for leadership",
  4475. NameAR = "اسال القيادة",
  4476. DisplayOrder = 0,
  4477. LookupID = (int)ClientLookups.Impact,
  4478. Manageable = true,
  4479. });
  4480.  
  4481. var probability = new Bnsights.CoreLib.Model.Lookup()
  4482. {
  4483. ID = (int)ClientLookups.Probability,
  4484. NameEN = "probability",
  4485. NameAR = "probability AR",
  4486. Manageable = false,
  4487. };
  4488.  
  4489. riskStatus.LookupItems.Add(new ClientLookupItem()
  4490. {
  4491. ID = (int)Probability.Certain,
  4492. NameEN = "Certain",
  4493. NameAR = "مؤكد",
  4494. DisplayOrder = 0,
  4495. LookupID = (int)ClientLookups.Probability,
  4496. Manageable = true,
  4497. });
  4498.  
  4499.  
  4500. riskStatus.LookupItems.Add(new ClientLookupItem()
  4501. {
  4502. ID = (int)Probability.Likely,
  4503. NameEN = "Likely",
  4504. NameAR = "محتمل أن",
  4505. DisplayOrder = 0,
  4506. LookupID = (int)ClientLookups.Probability,
  4507. Manageable = true,
  4508. });
  4509.  
  4510. riskStatus.LookupItems.Add(new ClientLookupItem()
  4511. {
  4512. ID = (int)Probability.Possible,
  4513. NameEN = "Possible",
  4514. NameAR = "ممكن",
  4515. DisplayOrder = 0,
  4516. LookupID = (int)ClientLookups.Probability,
  4517. Manageable = true,
  4518. });
  4519. riskStatus.LookupItems.Add(new ClientLookupItem()
  4520. {
  4521. ID = (int)Probability.UnLikely,
  4522. NameEN = "Unlikely",
  4523. NameAR = "من غير المرجح",
  4524. DisplayOrder = 0,
  4525. LookupID = (int)ClientLookups.Probability,
  4526. Manageable = true,
  4527. });
  4528.  
  4529. context.Lookups.Add(riskStatus);
  4530. context.Lookups.Add(impact);
  4531. context.Lookups.Add(probability);
  4532.  
  4533.  
  4534. context.SaveChanges();
  4535. }
  4536. public void SeedInvoiceLookupsAndAddGUID_201812300957349(ClientAppContext context)
  4537. {
  4538. var invoiceStatus = new Bnsights.CoreLib.Model.Lookup()
  4539. {
  4540. ID = (int)ClientLookups.InvoiceStatus,
  4541. NameEN = "Invoice Status",
  4542. NameAR = "حالة الفاتورة",
  4543. Manageable = false,
  4544. };
  4545.  
  4546. invoiceStatus.LookupItems.Add(new ClientLookupItem()
  4547. {
  4548. ID = (int)InvoiceStatus.Pending,
  4549. NameEN = "Pending",
  4550. NameAR = "تحت الانتظار",
  4551. DisplayOrder = 0,
  4552. LookupID = (int)ClientLookups.InvoiceStatus,
  4553. Manageable = true,
  4554. });
  4555.  
  4556.  
  4557. invoiceStatus.LookupItems.Add(new ClientLookupItem()
  4558. {
  4559. ID = (int)InvoiceStatus.Paid,
  4560. NameEN = "Paid",
  4561. NameAR = "مدفوع",
  4562. DisplayOrder = 1,
  4563. LookupID = (int)ClientLookups.InvoiceStatus,
  4564. Manageable = true,
  4565. });
  4566.  
  4567. invoiceStatus.LookupItems.Add(new ClientLookupItem()
  4568. {
  4569. ID = (int)InvoiceStatus.Rejected,
  4570. NameEN = "Rejected",
  4571. NameAR = "مرفوض",
  4572. DisplayOrder = 2,
  4573. LookupID = (int)ClientLookups.InvoiceStatus,
  4574. Manageable = true,
  4575. });
  4576.  
  4577. invoiceStatus.LookupItems.Add(new ClientLookupItem()
  4578. {
  4579. ID = (int)InvoiceStatus.Cancel,
  4580. NameEN = "Cancel",
  4581. NameAR = "ملغي",
  4582. DisplayOrder = 3,
  4583. LookupID = (int)ClientLookups.InvoiceStatus,
  4584. Manageable = true,
  4585. });
  4586. var invoiceCurrency = new Bnsights.CoreLib.Model.Lookup()
  4587. {
  4588. ID = (int)ClientLookups.InvoiceCurrency,
  4589. NameEN = "Invoice Currency",
  4590. NameAR = "عملة الفاتورة",
  4591. Manageable = false,
  4592. };
  4593.  
  4594. invoiceCurrency.LookupItems.Add(new ClientLookupItem()
  4595. {
  4596. ID = (int)InvoiceCurrency.AED,
  4597. NameEN = "AED",
  4598. NameAR = "درهم اماراتي",
  4599. DisplayOrder = 0,
  4600. LookupID = (int)ClientLookups.InvoiceCurrency,
  4601. Manageable = true,
  4602. });
  4603.  
  4604.  
  4605. invoiceCurrency.LookupItems.Add(new ClientLookupItem()
  4606. {
  4607. ID = (int)InvoiceCurrency.EGP,
  4608. NameEN = "EGP",
  4609. NameAR = "جنيه مصري",
  4610. DisplayOrder = 1,
  4611. LookupID = (int)ClientLookups.InvoiceCurrency,
  4612. Manageable = true,
  4613. });
  4614.  
  4615. invoiceCurrency.LookupItems.Add(new ClientLookupItem()
  4616. {
  4617. ID = (int)InvoiceCurrency.GBP,
  4618. NameEN = "GBP",
  4619. NameAR = "جنيه استرليني",
  4620. DisplayOrder = 2,
  4621. LookupID = (int)ClientLookups.InvoiceCurrency,
  4622. Manageable = true,
  4623. });
  4624. invoiceCurrency.LookupItems.Add(new ClientLookupItem()
  4625. {
  4626. ID = (int)InvoiceCurrency.USD,
  4627. NameEN = "USD",
  4628. NameAR = "دولار أمريكي",
  4629. DisplayOrder = 0,
  4630. LookupID = (int)ClientLookups.InvoiceCurrency,
  4631. Manageable = true,
  4632. });
  4633.  
  4634. invoiceCurrency.LookupItems.Add(new ClientLookupItem()
  4635. {
  4636. ID = (int)InvoiceCurrency.EUR,
  4637. NameEN = "EUR",
  4638. NameAR = "يورو",
  4639. DisplayOrder = 0,
  4640. LookupID = (int)ClientLookups.InvoiceCurrency,
  4641. Manageable = true,
  4642. });
  4643.  
  4644.  
  4645.  
  4646. context.Lookups.Add(invoiceStatus);
  4647. context.Lookups.Add(invoiceCurrency);
  4648.  
  4649.  
  4650. context.SaveChanges();
  4651. }
  4652. public void userMenues_201901021257065(ClientAppContext context)
  4653. {
  4654.  
  4655. context.UserMenues.Add(new UserMenu()
  4656. {
  4657. ID = 1,
  4658. NameEN = "Dashboard",
  4659. NameAR = "الصفحه الرئيسيه",
  4660. Order = 1,
  4661. Url = "~/User/Dashboard/Index",
  4662. IconUrl = "/assets/images/icons/speedometer.svg",
  4663. Visible = true
  4664. });
  4665. context.UserMenues.Add(new UserMenu()
  4666. {
  4667. ID = 2,
  4668. NameEN = "Ideas",
  4669. NameAR = "الافكار",
  4670. Order = 2,
  4671. Url = "~/User/Idea/Index",
  4672. IconUrl = "/assets/images/icons/light-bulb.svg",
  4673. Visible = true
  4674. });
  4675. context.UserMenues.Add(new UserMenu()
  4676. {
  4677. ID = 3,
  4678. NameEN = "Goals",
  4679. NameAR = "الاهداف الاستراتيجيه",
  4680. Order = 3,
  4681. Url = "~/User/Goal/Index",
  4682. IconUrl = "/assets/images/icons/Goals.svg",
  4683. Visible = true
  4684. });
  4685. context.UserMenues.Add(new UserMenu()
  4686. {
  4687. ID = 4,
  4688. NameEN = "Areas",
  4689. NameAR = "مجال التركيز",
  4690. Order = 4,
  4691. Url = "~/User/Focus/Index",
  4692. IconUrl = "/assets/images/icons/focus.svg",
  4693. Visible = true
  4694. });
  4695. context.UserMenues.Add(new UserMenu()
  4696. {
  4697. ID = 5,
  4698. NameEN = "Challenges",
  4699. NameAR = "التحديات",
  4700. Order = 5,
  4701. Url = "~/User/Challenge/Index",
  4702. IconUrl = "/assets/images/icons/barrier.svg",
  4703. Visible = true
  4704. });
  4705. context.UserMenues.Add(new UserMenu()
  4706. {
  4707. ID = 6,
  4708. NameEN = "Labs",
  4709. NameAR = "المعامل",
  4710. Order = 6,
  4711. Url = "~/User/InnovationLab/Index",
  4712. IconUrl = "/assets/images/icons/flask.svg",
  4713. Visible = true
  4714. });
  4715. context.UserMenues.Add(new UserMenu()
  4716. {
  4717. ID = 7,
  4718. NameEN = "Brainstorming",
  4719. NameAR = "عصف ذهنى",
  4720. Order = 7,
  4721. Url = "~/User/Brainstorm/Index",
  4722. IconUrl = "/assets/images/icons/barrier.svg",
  4723. Visible = true
  4724. });
  4725. context.UserMenues.Add(new UserMenu()
  4726. {
  4727. ID = 8,
  4728. NameEN = "Handbook",
  4729. NameAR = "كتيب",
  4730. Order = 8,
  4731. Url = "~/User/Handbook/Index",
  4732. IconUrl = "/assets/images/icons/Handbook.svg",
  4733. Visible = true
  4734. });
  4735. context.UserMenues.Add(new UserMenu()
  4736. {
  4737. ID = 9,
  4738. NameEN = "Videos",
  4739. NameAR = "فديو",
  4740. Order = 9,
  4741. Url = "~/User/Videos/Index",
  4742. IconUrl = "/assets/images/icons/play.svg",
  4743. Visible = true
  4744. });
  4745. context.UserMenues.Add(new UserMenu()
  4746. {
  4747. ID = 10,
  4748. NameEN = "Resources",
  4749. NameAR = "المصادر و الملفات",
  4750. Order = 10,
  4751. Url = "~/User/Resources/Index",
  4752. IconUrl = "/assets/images/icons/book.svg",
  4753. Visible = true
  4754. });
  4755. context.UserMenues.Add(new UserMenu()
  4756. {
  4757. ID = 11,
  4758. NameEN = "Case Studies",
  4759. NameAR = "دراسات الحالة",
  4760. Order = 11,
  4761. Url = "~/User/Casestudy/Index",
  4762. IconUrl = "/assets/images/icons/case.svg",
  4763. Visible = true
  4764. });
  4765. context.UserMenues.Add(new UserMenu()
  4766. {
  4767. ID = 12,
  4768. NameEN = "Project",
  4769. NameAR = "المشاريع",
  4770. Order = 12,
  4771. Url = "~/User/Project/Index",
  4772. IconUrl = "/assets/images/icons/strategy.svg",
  4773. Visible = true
  4774. });
  4775.  
  4776.  
  4777.  
  4778. context.SaveChanges();
  4779. }
  4780. public void SeedingEvaluationPanelTopic_201901031204521(ClientAppContext context)
  4781. {
  4782. seedingTopics2(context);
  4783. }
  4784. public void seedingTopics2(ClientAppContext context)
  4785. {
  4786. context.Topics.Add(new Topic { ID = 67, TopicEN = "Evaluation Panel", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 1, NameEN = "Achievement", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4787. context.Topics.Add(new Topic { ID = 68, TopicEN = "Add Evaluation Panel ", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4788. context.Topics.Add(new Topic { ID = 69, TopicEN = "Edit Evaluation Panel", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4789. }
  4790.  
  4791. public void MindMap_201901031609167(ClientAppContext context)
  4792. {
  4793. seedingTopics3(context);
  4794. }
  4795. public void seedingTopics3(ClientAppContext context)
  4796. {
  4797. context.Topics.Add(new Topic { ID = 67, TopicEN = "Mind Map", TopicAR = "No Data", Visible = true, TopicCategory = new TopicCategory { ID = 1, NameEN = "Achievement", NameAR = "No Data", DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now }, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4798. context.Topics.Add(new Topic { ID = 68, TopicEN = "Add Mind Map ", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4799. context.Topics.Add(new Topic { ID = 69, TopicEN = "EditMind Map", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4800. }
  4801.  
  4802. public void AddMindMapUserMenue_201901081221098(ClientAppContext context)
  4803. {
  4804. context.UserMenues.Add(new UserMenu()
  4805. {
  4806. ID = 13,
  4807. NameEN = "Mind Maps",
  4808. NameAR = "خرائط ذهنية",
  4809. Order = 13,
  4810. Url = "~/User/MindMap/Index",
  4811. IconUrl = "/assets/images/icons/speedometer.svg",
  4812. Visible = true
  4813. });
  4814. }
  4815. public void EditUserMenuesSeed_201901131036499(ClientAppContext context)
  4816. {
  4817. context.UserMenues.Find(1).NameEN = "Home";
  4818. context.UserMenues.Find(4).NameEN = "Focus";
  4819. context.UserMenues.Find(13).Order = 7;
  4820. context.UserMenues.Find(7).Order = 8;
  4821. context.UserMenues.Find(7).NameEN = "Storms";
  4822. context.UserMenues.Find(8).Order = 9;
  4823. context.UserMenues.Find(9).Order = 11;
  4824. context.UserMenues.Find(11).NameEN = "Stories";
  4825. context.UserMenues.Find(11).Order = 12;
  4826. context.UserMenues.Find(12).Order = 13;
  4827.  
  4828. context.SaveChanges();
  4829. }
  4830. public void EditDatatypeLookupDataSeed_201901141517533(ClientAppContext context)
  4831. {
  4832. context.LookupItems.Find(58017).NameEN = "Challenge";
  4833. context.LookupItems.Find(58018).NameEN = "Area of Focus";
  4834. context.SaveChanges();
  4835. }
  4836. public void IdeaStatusAndInstance_201901161239534(ClientAppContext context)
  4837. {
  4838. var oldLookup = context.LookupItems.Find((int)IdeaStatusType.AwaitingApproval);
  4839. oldLookup.NameAR = "قيد إنتظار الموافقة";
  4840. oldLookup.NameEN = "Awaiting Approval";
  4841.  
  4842.  
  4843. context.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4844. {
  4845. ID = (int)IdeaStatusType.AwaitingEvaluation,
  4846. LookupID = (int)ClientLookups.IdeaStatus,
  4847. NameEN = "Awaiting Evaluation",
  4848. NameAR = "قيد إنتظار التقييم"
  4849. });
  4850.  
  4851. context.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4852. {
  4853. ID = (int)IdeaStatusType.RejectedOnApproval,
  4854. LookupID = (int)ClientLookups.IdeaStatus,
  4855. NameEN = "Rejected On Approval",
  4856. NameAR = "رفضت"
  4857. });
  4858. context.LookupItems.Add(new Bnsights.CoreLib.Model.LookupItem()
  4859. {
  4860. ID = (int)IdeaStatusType.Evaluated,
  4861. LookupID = (int)ClientLookups.IdeaStatus,
  4862. NameEN = "Evaluated",
  4863. NameAR = "قيمت"
  4864. });
  4865. context.SaveChanges();
  4866. }
  4867. public void BrainStormingTopicCategories_201901171210047(ClientAppContext context)
  4868. {
  4869. seedingTopics(context);
  4870. }
  4871. public void seedingTopics(ClientAppContext context)
  4872. {
  4873. context.Topics.Add(new Topic { ID = 73, TopicEN = "BrainStorming Session", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4874. context.Topics.Add(new Topic { ID = 74, TopicEN = "Add BrainStorming Session ", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4875. context.Topics.Add(new Topic { ID = 75, TopicEN = "Edit BrainStormingSession", TopicAR = "No Data", CategoryID = 1, Visible = true, DescriptionAR = "No Data", DescriptionEN = "No Data", CreatedBy = "admin@bnsights.com", ModifiedBy = "admin@bnsights.com", Created = DateTime.Now, Modified = DateTime.Now });
  4876. }
  4877.  
  4878. public void addBrainsormingMenue_201901201328270(ClientAppContext context)
  4879. {
  4880.  
  4881. context.UserMenues.Add(new UserMenu()
  4882. {
  4883. ID = 14,
  4884. NameEN = "Brainsstorming",
  4885. NameAR = "عصف ذهنى",
  4886. Order = 14,
  4887. Url = "~/User/BrainstormingSession/Index",
  4888. IconUrl = "/assets/images/icons/brainstorming.svg",
  4889. Visible = true
  4890. });
  4891. context.SaveChanges();
  4892. }
  4893. public void AddInnovationLabToDataTypelookup_201901211200465(ClientAppContext context)
  4894. {
  4895. context.LookupItems.Add(new ClientLookupItem()
  4896. {
  4897. ID = 58020,
  4898. NameEN = "Innovation Lab",
  4899. NameAR = "معامل الابتكار",
  4900. DisplayOrder = 20,
  4901. LookupID = 58,
  4902. Manageable = false,
  4903. });
  4904. }
  4905. }
  4906. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement