Advertisement
Guest User

Untitled

a guest
Dec 14th, 2019
528
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.73 KB | None | 0 0
  1. CREATE TABLE repositories(
  2. id INT auto_increment PRIMARY KEY,
  3. name varchar(50) NOT NULL
  4. );
  5.  
  6. CREATE TABLE users (
  7. id INT auto_increment PRIMARY KEY,
  8. username varchar(30) NOT NULL UNIQUE,
  9. password varchar(30) NOT NULL,
  10. email varchar(50) NOT NULL
  11. );
  12.  
  13. CREATE TABLE repositories_contributors(
  14. repository_id int,
  15. contributor_id int,
  16. CONSTRAINT fk_repositories_contributors_repositories foreign key(repository_id)
  17. references repositories(id),
  18. CONSTRAINT fk_repositories_contributors_repositoriese foreign key(contributor_id)
  19. references users(id)
  20. );
  21.  
  22. CREATE TABLE issues(
  23. id int auto_increment primary KEY,
  24. title varchar(255) NOT NULL,
  25. issue_status varchar(6) NOT NULL,
  26. repository_id int NOT NULL,
  27. assignee_id INT NOT NULL,
  28. CONSTRAINT fk_issues_repositories foreign key(repository_id)
  29. references repositories(id),
  30. CONSTRAINT fk_issues_users foreign key(assignee_id)
  31. references users(id)
  32. );
  33.  
  34. CREATE TABLE commits (
  35. id INT auto_increment primary KEY,
  36. message varchar(255) NOT NULL,
  37. issue_id INT,
  38. repository_id INT NOT NULL,
  39. contributor_id INT NOT NULL,
  40. CONSTRAINT fk_commits_issues foreign key(issue_id)
  41. references issues(id),
  42. CONSTRAINT fk_commits_repositories foreign key(repository_id)
  43. references repositories(id),
  44. CONSTRAINT fk_commists_users foreign key(contributor_id)
  45. references users(id)
  46. );
  47.  
  48. create TABLE files (
  49. id INT auto_increment primary key,
  50. name varchar(100) NOT NULL,
  51. size DECIMAL(10,2) NOT NULL,
  52. parent_id int,
  53. commit_id INT NOT NULL,
  54. CONSTRAINT fk_files_files foreign key(parent_id)
  55. references files(id),
  56. CONSTRAINT fk_files_commits foreign key(commit_id)
  57. references commits(id)
  58. );
  59.  
  60. INSERT INTO users (id, username, password, email) VALUES
  61. (1, 'UnderSinduxrein', '4l8nYGTKMW', 'azfex@gmail.com'),
  62. (2, 'BlaAntigadsa', ':Q5wjT4[e', 'kuf@abv.bg'),
  63. (3, 'ANinedsa', 'El[MwhxY)J', 'indie@yahoo.com'),
  64. (4, 'ScoreImmagidefon', '`NGU>oS', 'daffy@yandex.bg'),
  65. (5, 'BlaSinduxrein', 'wJyfcwg*', 'toni@donald.eu'),
  66. (6, 'WhoDenoteBel', 'ajmISQi*', 'tinny@pd.cd'),
  67. (7, 'WhatTerrorBel', 'R+-<+..Pl3j^', 'joseph@lon.co.uk'),
  68. (8, 'AryaDenotehow', 'NNY5<e=', 'corect@asd.asd'),
  69. (9, 'UnveiledDenoteIana', 'no0*[ijt', 'default@ooo.com'),
  70. (10, 'ScoreSinduxIana', '8xI:@-j2_.T', 'rog@asus.co'),
  71. (11, 'RoundAntigaBel', '4S>7EUNeUC@kv', 'diplomat@po.bo'),
  72. (12, 'DarkImmagidsa', 'R.fh[f1Zh>2', 'sys@admin.bg'),
  73. (13, 'RoundInspecindi', 'AdKs>q]u7P`C', 'katr@kiper.eu'),
  74. (14, 'AryaNinehow', 'X6j>`Huf2F(I', 'wrec@soft.wrap'),
  75. (15, 'ScoreAntigarein', 'UUD3H))<', 'dec@int.float'),
  76. (16, 'TheDivineBel', '-gCi:_Ub?ypT', 'rindiy@abv.bg'),
  77. (17, 'RoundArmydsa', 'SZ?F-:hW', 'com@gmail.user'),
  78. (18, 'HighAsmahow', 'lyqF\vUG', 'svik@kiwi.mandarin'),
  79. (19, 'ZendArmyhow', 'DbW>9,', 'rip@pob.cid'),
  80. (20, 'BlaImmagiIana', 'upE;fg6+)n', 'stun@asd.cdd');
  81.  
  82. INSERT INTO repositories (id, name) VALUES
  83. (1, 'WorkWork'),
  84. (2, 'Tumbalore'),
  85. (3, 'Softuni-Teamwork'),
  86. (4, 'IncreaseRepo'),
  87. (5, 'ContinuousIntegration'),
  88. (6, 'IndigoDB'),
  89. (7, 'DundaApp'),
  90. (8, 'Citros'),
  91. (9, 'BogoApp'),
  92. (10, 'SortedTupleJS'),
  93. (11, 'KartinaJS'),
  94. (12, 'SpiralSort'),
  95. (13, 'Vendigo-RPG'),
  96. (14, 'Kartica'),
  97. (15, 'SignalR'),
  98. (16, 'ASP.NET'),
  99. (17, 'MySQL'),
  100. (18, 'InnoDB'),
  101. (19, 'Catalina'),
  102. (20, 'JosephineDB'),
  103. (21, 'Intrigued-RPG'),
  104. (22, 'Maxima'),
  105. (23, 'Calculus'),
  106. (24, 'Assembly-Force'),
  107. (25, 'Mesmerize-Frameowork'),
  108. (26, 'maxOut'),
  109. (27, 'inspiration'),
  110. (28, 'Bau'),
  111. (29, 'Practiq'),
  112. (30, 'Daun'),
  113. (31, 'Kimmers'),
  114. (32, 'Defalte_pf'),
  115. (33, 'Kras_par_ti'),
  116. (34, 'Antiq'),
  117. (35, 'Dantelle'),
  118. (36, 'DELET THIS');
  119.  
  120. INSERT INTO repositories_contributors(repository_id, contributor_id) VALUES
  121. (2, 15),
  122. (26, 16),
  123. (30, 2),
  124. (16, 11),
  125. (10, 15),
  126. (28, 17),
  127. (7, 19),
  128. (22, 3),
  129. (16, 4),
  130. (25, 15),
  131. (18, 5),
  132. (30, 17),
  133. (1, 14),
  134. (1, 1),
  135. (27, 1),
  136. (12, 2),
  137. (2, 16),
  138. (16, 18),
  139. (33, 12),
  140. (30, 1),
  141. (15, 17),
  142. (3, 1),
  143. (14, 4),
  144. (28, 16),
  145. (24, 15),
  146. (29, 3),
  147. (32, 19),
  148. (3, 14),
  149. (10, 2),
  150. (13, 15),
  151. (7, 1),
  152. (15, 9),
  153. (22, 5),
  154. (5, 9),
  155. (32, 16),
  156. (25, 6),
  157. (9, 13),
  158. (29, 15),
  159. (33, 14),
  160. (9, 9),
  161. (3, 3),
  162. (22, 4),
  163. (8, 5),
  164. (21, 13),
  165. (29, 5),
  166. (5, 2),
  167. (22, 10),
  168. (2, 1),
  169. (10, 19),
  170. (17, 4),
  171. (7, 7),
  172. (20, 6),
  173. (11, 1),
  174. (18, 16),
  175. (23, 18),
  176. (32, 14),
  177. (28, 13),
  178. (29, 6),
  179. (14, 7),
  180. (1, 18),
  181. (1, 10),
  182. (26, 1),
  183. (5, 12),
  184. (34, 17),
  185. (21, 3),
  186. (8, 16),
  187. (31, 13),
  188. (13, 1),
  189. (14, 8),
  190. (13, 9),
  191. (1, 6),
  192. (32, 8),
  193. (25, 12),
  194. (19, 15),
  195. (30, 12),
  196. (30, 11),
  197. (2, 3),
  198. (24, 1),
  199. (22, 9),
  200. (34, 14),
  201. (31, 16),
  202. (11, 7),
  203. (27, 10),
  204. (6, 1),
  205. (31, 1),
  206. (4, 14),
  207. (30, 19),
  208. (6, 15),
  209. (16, 2),
  210. (10, 3),
  211. (3, 17),
  212. (9, 5),
  213. (13, 7),
  214. (7, 6),
  215. (22, 8),
  216. (23, 19),
  217. (26, 11),
  218. (3, 7),
  219. (33, 1),
  220. (27, 2);
  221.  
  222. INSERT INTO issues(id, title, issue_status, repository_id, assignee_id) VALUES
  223. (1, 'Invalid welcoming message in Controller.json', 'closed', 25, 5),
  224. (2, 'Invalid welcoming message in READ.html', 'opened', 34, 13),
  225. (3, 'Unreachable code in Find.java stops compilation flow', 'closed', 11, 11),
  226. (4, 'Implement documentation for Jason.exe module', 'closed', 16, 5),
  227. (5, 'Unreachable code in Model.MD stops compilation flow', 'closed', 6, 17),
  228. (6, 'Security Flaw in Accelerate.dd inner code', 'opened', 5, 14),
  229. (7, 'Compilation failed while trying to execute Bean.php', 'closed', 14, 14),
  230. (8, 'Critical bug in sound.sick ruins application when executed', 'opened', 24, 11),
  231. (9, 'Invalid welcoming message in Find.java', 'clear', 25, 12),
  232. (10, 'Unreachable code in Index.class stops compilation flow', 'clear', 24, 4),
  233. (11, 'Loose Cohesion and Strong Coupling in Beat.bat', 'clear', 34, 7),
  234. (12, 'Compilation failed while trying to execute READ.img', 'closed', 16, 1),
  235. (13, 'Critical bug in pipeline.dd ruins application when executed', 'clear', 3, 16),
  236. (14, 'Implement documentation for Register.py module', 'clear', 1, 17),
  237. (15, 'Compilation failed while trying to execute Search.py', 'clear', 19, 1),
  238. (16, 'Inappropriate prompt from READ.html', 'fixed', 8, 1),
  239. (17, 'Unreachable code in index.intro stops compilation flow', 'opened', 22, 9),
  240. (18, 'Critical bug in Jason.exe ruins application when executed', 'opened', 29, 14),
  241. (19, 'Compilation failed while trying to execute Beat.bat', 'closed', 10, 18),
  242. (20, 'init.txt breaks down after startup', 'fixed', 4, 10),
  243. (21, 'compile.png breaks down after startup', 'clear', 7, 9),
  244. (22, 'Unreachable code in index.net stops compilation flow', 'fixed', 16, 9),
  245. (23, 'Inappropriate prompt from index.net', 'closed', 18, 1),
  246. (24, 'Implement documentation for index.intro module', 'closed', 9, 11),
  247. (25, 'Invalid welcoming message in file.sick', 'clear', 20, 5),
  248. (26, 'Unreachable code in Login.html stops compilation flow', 'fixed', 27, 1),
  249. (27, 'Hotfix for security issue in View.dd introduces new security issue', 'clear', 30, 6),
  250. (28, 'Hotfix for security issue in Jason.exe introduces new security issue', 'closed', 15, 2),
  251. (29, 'Loose Cohesion and Strong Coupling in READ.img', 'fixed', 13, 8),
  252. (30, 'Inappropriate prompt from config.dd', 'fixed', 29, 12),
  253. (31, 'Invalid welcoming message in Administrate.soshy', 'closed', 12, 10),
  254. (32, 'Hotfix for security issue in Index.class introduces new security issue', 'clear', 5, 16),
  255. (33, 'Loose Cohesion and Strong Coupling in Bean.php', 'clear', 19, 8),
  256. (34, 'Loose Cohesion and Strong Coupling in file.png', 'closed', 14, 16),
  257. (35, 'Invalid welcoming message in Accelerate.sick', 'clear', 17, 14),
  258. (36, 'Compilation failed while trying to execute index.intro', 'clear', 11, 19),
  259. (37, 'Security Flaw in Music.jpg inner code', 'closed', 11, 11),
  260. (38, 'index.db breaks down after startup', 'closed', 23, 8),
  261. (39, 'Unreachable code in Music.jpg stops compilation flow', 'clear', 5, 19),
  262. (40, 'Unimplemented exception thrown in Accelerate.sick', 'clear', 20, 1),
  263. (41, 'Invalid welcoming message in Search.py', 'clear', 32, 14),
  264. (42, 'Invalid welcoming message in index.cpp', 'clear', 26, 15),
  265. (43, 'Compilation failed while trying to execute index.db', 'clear', 15, 1),
  266. (44, 'Root.net breaks down after startup', 'fixed', 31, 5),
  267. (45, 'Unimplemented exception thrown in init.txt', 'clear', 30, 2),
  268. (46, 'Critical bug in compile.html ruins application when executed', 'opened', 3, 11),
  269. (47, 'Inappropriate prompt from index.db', 'clear', 30, 14),
  270. (48, 'Implement documentation for file.cpp module', 'opened', 12, 14),
  271. (49, 'Inappropriate prompt from Register.py', 'fixed', 9, 2),
  272. (50, 'Implement documentation for index.db module', 'fixed', 17, 7),
  273. (51, 'Critical bug in Trade.idk ruins application when executed', 'clear', 27, 13),
  274. (52, 'Unimplemented exception thrown in Beat.xix', 'fixed', 16, 6),
  275. (53, 'Unimplemented exception thrown in Administrate.go', 'clear', 1, 17),
  276. (54, 'Unimplemented exception thrown in Login.html', 'clear', 32, 1),
  277. (55, 'Unreachable code in Register.py stops compilation flow', 'opened', 21, 18),
  278. (56, 'Hotfix for security issue in pipeline.dd introduces new security issue', 'fixed', 27, 17),
  279. (57, 'Invalid welcoming message in init.txt', 'fixed', 14, 15),
  280. (58, 'Implement documentation for Administrate.soshy module', 'opened', 28, 1),
  281. (59, 'Hotfix for security issue in index.soshy introduces new security issue', 'closed', 11, 3),
  282. (60, 'Implement documentation for file.sick module', 'closed', 31, 10),
  283. (61, 'Loose Cohesion and Strong Coupling in Root.net', 'closed', 13, 7),
  284. (62, 'Compilation failed while trying to execute index.net', 'opened', 8, 19),
  285. (63, 'Unimplemented exception thrown in Register.py', 'clear', 21, 19),
  286. (64, 'file.sick breaks down after startup', 'closed', 35, 19),
  287. (65, 'Security Flaw in pipeline.dd inner code', 'opened', 3, 19),
  288. (66, 'Invalid welcoming message in index.intro', 'closed', 8, 6),
  289. (67, 'Security Flaw in Beat.xix inner code', 'opened', 33, 7),
  290. (68, 'Inappropriate prompt from compile.ivory', 'clear', 11, 4),
  291. (69, 'Inappropriate prompt from Search.py', 'clear', 12, 17),
  292. (70, 'Hotfix for sec urity issue in Login.db introduces new security issue', 'clear', 2, 19),
  293. (71, 'Implement documentation for Index.class module', 'closed', 32, 3),
  294. (72, 'Loose Cohesion and Strong Coupling in index.soshy', 'opened', 29, 12),
  295. (73, 'Loose Cohesion and Strong Coupling in Beat.html', 'opened', 2, 15),
  296. (74, 'Compilation failed while trying to execute init.xml', 'opened', 24, 12),
  297. (75, 'Critical bug in Controller.php ruins application when executed', 'fixed', 8, 16);
  298.  
  299. INSERT INTO commits(id, message, issue_id, repository_id, contributor_id) VALUES
  300. (1, 'Deleted deprecated functionality from index.cpp', 58, 17, 8),
  301. (2, 'Created README.MD', 15, 14, 8),
  302. (3, 'Initial Commit', 52, 24, 1),
  303. (4, 'Implemented config.json functionality', 15, 10, 12),
  304. (5, 'Deleted deprecated functionality from index.dd', 32, 13, 18),
  305. (6, 'Hotfix for bug in Index.class', 71, 19, 1),
  306. (7, 'Patch Index.javav.', 38, 8, 11),
  307. (8, 'Deleted deprecated functionality from Operate.xix', NULL, 28, 9),
  308. (9, 'Fixed security issue in file.png', NULL, 6, 2),
  309. (10, 'Deleted deprecated functionality from index.net', NULL, 27, 1),
  310. (11, 'Patch Model.MDv.', 52, 7, 16),
  311. (12, 'Deleted deprecated functionality from Music.jpg', 41, 6, 11),
  312. (13, 'Implemented index.net functionality', NULL, 15, 11),
  313. (14, 'Fixed index.dd', 40, 1, 7),
  314. (15, 'Fixed index.soshy', NULL, 19, 1),
  315. (16, 'Patch Operate.xixv.', NULL, 21, 4),
  316. (17, 'Hotfix for bug in Database.dd', 73, 14, 11),
  317. (18, 'Hotfix for bug in init.xml', 3, 10, 11),
  318. (19, 'Hotfix for bug in compile.png', 2, 7, 3),
  319. (20, 'Fixed init.xml', 15, 30, 15),
  320. (21, 'Hotfix for bug in Administrate.soshy', 8, 26, 19),
  321. (22, 'Implemented Index.class functionality', NULL, 14, 13),
  322. (23, 'Fixed security issue in Beat.bat', NULL, 7, 4),
  323. (24, 'Patch index.netv.', 36, 16, 14),
  324. (25, 'Implemented compile.png functionality', 21, 10, 2),
  325. (26, 'Fixed security issue in compile.html', 72, 22, 4),
  326. (27, 'Patch index.ddv.', 62, 6, 3),
  327. (28, 'Fixed Controller.php', 4, 9, 7),
  328. (29, 'Patch Find.javav.', 29, 28, 4),
  329. (30, 'Hotfix for bug in compile.ivory', 43, 25, 14),
  330. (31, 'Fixed security issue in compile.png', 64, 16, 10),
  331. (32, 'Implemented Beat.bat functionality', NULL, 5, 18),
  332. (33, 'Patch Database.ddv.', 17, 4, 15),
  333. (34, 'Deleted deprecated functionality from Model.MD', 48, 17, 7),
  334. (35, 'Patch init.txtv.', 51, 11, 2),
  335. (36, 'Fixed menu.net', 48, 3, 18),
  336. (37, 'Implemented Find.java functionality', NULL, 1, 1),
  337. (38, 'Deleted deprecated functionality from index.intro', 70, 18, 16),
  338. (39, 'Implemented Beat.html functionality', 51, 1, 5),
  339. (40, 'Deleted deprecated functionality from Database.dd', NULL, 2, 13),
  340. (41, 'Implemented Trade.idk functionality', NULL, 15, 19),
  341. (42, 'Hotfix for bug in compile.html', 15, 6, 19),
  342. (43, 'Fixed security issue in Search.py', 17, 21, 15),
  343. (44, 'Fixed security issue in Accelerate.sick', 20, 2, 17),
  344. (45, 'Fixed security issue in Administrate.soshy', 58, 25, 1),
  345. (46, 'Fixed security issue in file.txt', NULL, 1, 14),
  346. (47, 'Fixed Operate.xix', 29, 27, 15),
  347. (48, 'Implemented init.xml functionality', 39, 7, 17),
  348. (49, 'Fixed config.json', 1, 28, 5),
  349. (50, 'Implemented Database.dd functionality', NULL, 29, 8);
  350.  
  351. INSERT INTO files(id, name, size, parent_id, commit_id) VALUES
  352. (1, 'Trade.idk', 2598.0, 1, 1),
  353. (2, 'menu.net', 9238.31, 2, 2),
  354. (3, 'Administrate.soshy', 1246.93, 3, 3),
  355. (4, 'Controller.php', 7353.15, 4, 4),
  356. (5, 'Find.java', 9957.86, 5, 5),
  357. (6, 'Controller.json', 14034.87, 3, 6),
  358. (7, 'Operate.xix', 7662.92, 7, 7),
  359. (8, 'file.sick', 10548.35, 8, 8),
  360. (9, 'config.dd', 8745.77, 9, 9),
  361. (10, 'Index.java', 6121.35, 10, 10),
  362. (11, 'compile.ivory', 1185.04, 11, 1),
  363. (12, 'Model.MD', 4753.67, 3, 12),
  364. (13, 'Beat.html', 907.3, 13, 13),
  365. (14, 'READ.img', 2627.6, 14, 7),
  366. (15, 'Search.py', 8831.43, 15, 15),
  367. (16, 'Controller.intro', 27302.85, 11, 1),
  368. (17, 'Login.html', 2863.23, 16, 17),
  369. (18, 'Administrate.go', 24612.57, 9, 18),
  370. (19, 'READ.html', 2396.47, 8, 1),
  371. (20, 'index.net', 9261.71, 20, 20),
  372. (21, 'Index.class', 4001.15, 21, 21),
  373. (22, 'config.json', 6049.09, 22, 22),
  374. (23, 'pipeline.dd', 18407.72, NULL, 19),
  375. (24, 'Accelerate.dd', 23042.88, 24, 19),
  376. (25, 'Database.dd', 14905.56, NULL, 25),
  377. (26, 'Login.db', 8015.83, NULL, 21),
  378. (27, 'Beat.bat', 21431.98, 25, 12),
  379. (28, 'Jason.txt', 10317.54, NULL, 28),
  380. (29, 'Jason.exe', 28209.18, 8, 25),
  381. (30, 'Accelerate.idk', 5520.3, 30, 1),
  382. (31, 'file.txt', 5514.02, 27, 1),
  383. (32, 'Music.jpg', 917.75, 1, 3),
  384. (33, 'Root.net', 6784.97, 8, 28),
  385. (34, 'sound.sick', 8749.82, 20, 16),
  386. (35, 'index.dd', 35942.21, NULL, 35),
  387. (36, 'index.intro', 14325.29, 26, 36),
  388. (37, 'init.xml', 40028.01, NULL, 22),
  389. (38, 'file.cpp', 3038.23, NULL, 22),
  390. (39, 'Beat.xix', 5877.21, 22, 31),
  391. (40, 'index.cpp', 28912.18, 2, 40),
  392. (41, 'compile.png', 20510.09, 22, 24),
  393. (42, 'Register.py', 2037.26, 5, 27),
  394. (43, 'init.txt', 16089.79, 28, 4),
  395. (44, 'View.dd', 2470.36, NULL, 44),
  396. (45, 'file.png', 7755.49, NULL, 23),
  397. (46, 'index.db', 3821.36, 11, 46),
  398. (47, 'Accelerate.sick', 5774.32, 47, 47),
  399. (48, 'index.soshy', 30522.96, 30, 26),
  400. (49, 'compile.html', 27402.59, 28, 24),
  401. (50, 'Bean.php', 4184.45, 20, 35);
  402.  
  403. UPDATE files
  404. SET parent_id = 42
  405. WHERE id = 5;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement