migrations/Version20220822070538.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20220822070538 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('ALTER TABLE price_map ADD is_visible_in_web_constructor TINYINT(1) NOT NULL');
  18. //        /**
  19. //         * white-matte-plastic
  20. //         */
  21. //        $this->addSql("
  22. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  23. //                            SELECT
  24. //                                   'price_map.pop-white-matte-plastic',
  25. //                                   price_map.pouch_options,
  26. //                                   price_map.sustainable,
  27. //                                   UUID(),
  28. //                                   technology.id,
  29. //                                   varnish.id,
  30. //                                   material.id,
  31. //                                   price_map.structure_thickness,
  32. //                                   1
  33. //                            FROM price_map
  34. //                            INNER JOIN technology
  35. //                                ON technology.code = 'technologies.screen_printing'
  36. //                            INNER JOIN varnish
  37. //                                ON varnish.code = 'finishing.holography'
  38. //                            INNER JOIN material
  39. //                                ON material.code = 'material.white_matte_plastic'
  40. //                            WHERE price_map.code = 'price_map.white-matte-plastic'
  41. //                                    ");
  42. //        $this->addSql("
  43. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  44. //                            SELECT
  45. //                                   'unit.pcs',
  46. //                                   pop_web.id,
  47. //                                   price_list.grams,
  48. //                                   price_list.height,
  49. //                                   price_list.width,
  50. //                                   price_list.depth,
  51. //                                   price_list.min_quantity,
  52. //                                   price_list.max_quantity,
  53. //                                   price_list.price_per_unit,
  54. //                                   package_size.id,
  55. //                                   UUID()
  56. //                            FROM price_list
  57. //                            INNER JOIN price_map AS printella
  58. //                                  ON printella.code = 'price_map.white-matte-plastic'
  59. //                            INNER JOIN price_map AS pop_web
  60. //                                  ON pop_web.code = 'price_map.pop-white-matte-plastic'
  61. //                            INNER JOIN package_size
  62. //                                  ON package_size.grams = price_list.grams
  63. //                            WHERE price_list.price_map_id = printella.id
  64. //                                    ");
  65. //
  66. //        /**
  67. //         * white-kraft-paper
  68. //         */
  69. //        $this->addSql("
  70. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  71. //                            SELECT
  72. //                                   'price_map.pop-white-kraft-paper',
  73. //                                   price_map.pouch_options,
  74. //                                   price_map.sustainable,
  75. //                                   UUID(),
  76. //                                   technology.id,
  77. //                                   varnish.id,
  78. //                                   material.id,
  79. //                                   price_map.structure_thickness,
  80. //                                   1
  81. //                            FROM price_map
  82. //                            INNER JOIN technology
  83. //                                ON technology.code = 'technologies.screen_printing'
  84. //                            INNER JOIN varnish
  85. //                                ON varnish.code = 'finishing.holography'
  86. //                            INNER JOIN material
  87. //                                ON material.code = 'material.white_kraft_paper'
  88. //                            WHERE price_map.code = 'price_map.white-kraft-paper'
  89. //                                    ");
  90. //        $this->addSql("
  91. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  92. //                            SELECT
  93. //                                   'unit.pcs',
  94. //                                   pop_web.id,
  95. //                                   price_list.grams,
  96. //                                   price_list.height,
  97. //                                   price_list.width,
  98. //                                   price_list.depth,
  99. //                                   price_list.min_quantity,
  100. //                                   price_list.max_quantity,
  101. //                                   price_list.price_per_unit,
  102. //                                   package_size.id,
  103. //                                   UUID()
  104. //                            FROM price_list
  105. //                            INNER JOIN price_map AS printela
  106. //                                  ON printela.code = 'price_map.white-kraft-paper'
  107. //                            INNER JOIN price_map AS pop_web
  108. //                                  ON pop_web.code = 'price_map.pop-white-kraft-paper'
  109. //                            INNER JOIN package_size
  110. //                                  ON package_size.grams = price_list.grams
  111. //                            WHERE price_list.price_map_id = printela.id
  112. //                                    ");
  113. //
  114. //        /**
  115. //         * transparent-plastic
  116. //         */
  117. //        $this->addSql("
  118. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  119. //                            SELECT
  120. //                                   'price_map.pop-transparent-plastic',
  121. //                                   price_map.pouch_options,
  122. //                                   price_map.sustainable,
  123. //                                   UUID(),
  124. //                                   technology.id,
  125. //                                   varnish.id,
  126. //                                   material.id,
  127. //                                   price_map.structure_thickness,
  128. //                                   1
  129. //                            FROM price_map
  130. //                            INNER JOIN technology
  131. //                                ON technology.code = 'technologies.screen_printing'
  132. //                            INNER JOIN varnish
  133. //                                ON varnish.code = 'finishing.holography'
  134. //                            INNER JOIN material
  135. //                                ON material.code = 'material.transparent_plastic'
  136. //                            WHERE price_map.code = 'price_map.transparent-plastic'
  137. //                                    ");
  138. //        $this->addSql("
  139. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  140. //                            SELECT
  141. //                                   'unit.pcs',
  142. //                                   pop_web.id,
  143. //                                   price_list.grams,
  144. //                                   price_list.height,
  145. //                                   price_list.width,
  146. //                                   price_list.depth,
  147. //                                   price_list.min_quantity,
  148. //                                   price_list.max_quantity,
  149. //                                   price_list.price_per_unit,
  150. //                                   package_size.id,
  151. //                                   UUID()
  152. //                            FROM price_list
  153. //                            INNER JOIN price_map AS printela
  154. //                                  ON printela.code = 'price_map.transparent-plastic'
  155. //                            INNER JOIN price_map AS pop_web
  156. //                                  ON pop_web.code = 'price_map.pop-transparent-plastic'
  157. //                            INNER JOIN package_size
  158. //                                  ON package_size.grams = price_list.grams
  159. //                            WHERE price_list.price_map_id = printela.id
  160. //                                    ");
  161. //
  162. //        /**
  163. //         * Recyclable PE pouch
  164. //         */
  165. //        $this->addSql("
  166. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  167. //                            SELECT
  168. //                                   'price_map.pop-recyclable-pe-pouch',
  169. //                                   price_map.pouch_options,
  170. //                                   price_map.sustainable,
  171. //                                   UUID(),
  172. //                                   technology.id,
  173. //                                   varnish.id,
  174. //                                   material.id,
  175. //                                   price_map.structure_thickness,
  176. //                                   1
  177. //                            FROM price_map
  178. //                            INNER JOIN technology
  179. //                                ON technology.code = 'technologies.screen_printing'
  180. //                            INNER JOIN varnish
  181. //                                ON varnish.code = 'finishing.holography'
  182. //                            INNER JOIN material
  183. //                                ON material.code = 'material.recyclable_pe_pouch'
  184. //                            WHERE price_map.code = 'price_map.recyclable-pe-pouch'
  185. //                                    ");
  186. //        $this->addSql("
  187. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  188. //                            SELECT
  189. //                                   'unit.pcs',
  190. //                                   pop_web.id,
  191. //                                   price_list.grams,
  192. //                                   price_list.height,
  193. //                                   price_list.width,
  194. //                                   price_list.depth,
  195. //                                   price_list.min_quantity,
  196. //                                   price_list.max_quantity,
  197. //                                   price_list.price_per_unit,
  198. //                                   package_size.id,
  199. //                                   UUID()
  200. //                            FROM price_list
  201. //                            INNER JOIN price_map AS printela
  202. //                                  ON printela.code = 'price_map.recyclable-pe-pouch'
  203. //                            INNER JOIN price_map AS pop_web
  204. //                                  ON pop_web.code = 'price_map.pop-recyclable-pe-pouch'
  205. //                            INNER JOIN package_size
  206. //                                  ON package_size.grams = price_list.grams
  207. //                            WHERE price_list.price_map_id = printela.id
  208. //                                    ");
  209. //
  210. //        /**
  211. //         * metallic-gloss-plastic
  212. //         */
  213. //        $this->addSql("
  214. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  215. //                            SELECT
  216. //                                   'price_map.pop-metallic-gloss-plastic',
  217. //                                   price_map.pouch_options,
  218. //                                   price_map.sustainable,
  219. //                                   UUID(),
  220. //                                   technology.id,
  221. //                                   varnish.id,
  222. //                                   material.id,
  223. //                                   price_map.structure_thickness,
  224. //                                   1
  225. //                            FROM price_map
  226. //                            INNER JOIN technology
  227. //                                ON technology.code = 'technologies.screen_printing'
  228. //                            INNER JOIN varnish
  229. //                                ON varnish.code = 'finishing.holography'
  230. //                            INNER JOIN material
  231. //                                ON material.code = 'material.metallic_gloss_plastic'
  232. //                            WHERE price_map.code = 'price_map.metallic-gloss-plastic'
  233. //                                    ");
  234. //        $this->addSql("
  235. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  236. //                            SELECT
  237. //                                   'unit.pcs',
  238. //                                   pop_web.id,
  239. //                                   price_list.grams,
  240. //                                   price_list.height,
  241. //                                   price_list.width,
  242. //                                   price_list.depth,
  243. //                                   price_list.min_quantity,
  244. //                                   price_list.max_quantity,
  245. //                                   price_list.price_per_unit,
  246. //                                   package_size.id,
  247. //                                   UUID()
  248. //                            FROM price_list
  249. //                            INNER JOIN price_map AS printela
  250. //                                  ON printela.code = 'price_map.metallic-gloss-plastic'
  251. //                            INNER JOIN price_map AS pop_web
  252. //                                  ON pop_web.code = 'price_map.pop-metallic-gloss-plastic'
  253. //                            INNER JOIN package_size
  254. //                                  ON package_size.grams = price_list.grams
  255. //                            WHERE price_list.price_map_id = printela.id
  256. //                                    ");
  257. //
  258. //        /**
  259. //         * metallic-matte-plastic
  260. //         */
  261. //        $this->addSql("
  262. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  263. //                            SELECT
  264. //                                   'price_map.pop-metallic-matte-plastic',
  265. //                                   price_map.pouch_options,
  266. //                                   price_map.sustainable,
  267. //                                   UUID(),
  268. //                                   technology.id,
  269. //                                   varnish.id,
  270. //                                   material.id,
  271. //                                   price_map.structure_thickness,
  272. //                                   1
  273. //                            FROM price_map
  274. //                            INNER JOIN technology
  275. //                                ON technology.code = 'technologies.screen_printing'
  276. //                            INNER JOIN varnish
  277. //                                ON varnish.code = 'finishing.holography'
  278. //                            INNER JOIN material
  279. //                                ON material.code = 'material.metallic_matte_plastic'
  280. //                            WHERE price_map.code = 'price_map.metallic-matte-plastic'
  281. //                                    ");
  282. //        $this->addSql("
  283. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  284. //                            SELECT
  285. //                                   'unit.pcs',
  286. //                                   pop_web.id,
  287. //                                   price_list.grams,
  288. //                                   price_list.height,
  289. //                                   price_list.width,
  290. //                                   price_list.depth,
  291. //                                   price_list.min_quantity,
  292. //                                   price_list.max_quantity,
  293. //                                   price_list.price_per_unit,
  294. //                                   package_size.id,
  295. //                                   UUID()
  296. //                            FROM price_list
  297. //                            INNER JOIN price_map AS printela
  298. //                                  ON printela.code = 'price_map.metallic-matte-plastic'
  299. //                            INNER JOIN price_map AS pop_web
  300. //                                  ON pop_web.code = 'price_map.pop-metallic-matte-plastic'
  301. //                            INNER JOIN package_size
  302. //                                  ON package_size.grams = price_list.grams
  303. //                            WHERE price_list.price_map_id = printela.id
  304. //                                    ");
  305. //
  306. //        /**
  307. //         * white-gloss-plastic
  308. //         */
  309. //        $this->addSql("
  310. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  311. //                            SELECT
  312. //                                   'price_map.pop-white-gloss-plastic',
  313. //                                   price_map.pouch_options,
  314. //                                   price_map.sustainable,
  315. //                                   UUID(),
  316. //                                   technology.id,
  317. //                                   varnish.id,
  318. //                                   material.id,
  319. //                                   price_map.structure_thickness,
  320. //                                   1
  321. //                            FROM price_map
  322. //                            INNER JOIN technology
  323. //                                ON technology.code = 'technologies.screen_printing'
  324. //                            INNER JOIN varnish
  325. //                                ON varnish.code = 'finishing.holography'
  326. //                            INNER JOIN material
  327. //                                ON material.code = 'material.white_gloss_plastic'
  328. //                            WHERE price_map.code = 'price_map.white-gloss-plastic'
  329. //                                    ");
  330. //        $this->addSql("
  331. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  332. //                            SELECT
  333. //                                   'unit.pcs',
  334. //                                   pop_web.id,
  335. //                                   price_list.grams,
  336. //                                   price_list.height,
  337. //                                   price_list.width,
  338. //                                   price_list.depth,
  339. //                                   price_list.min_quantity,
  340. //                                   price_list.max_quantity,
  341. //                                   price_list.price_per_unit,
  342. //                                   package_size.id,
  343. //                                   UUID()
  344. //                            FROM price_list
  345. //                            INNER JOIN price_map AS printela
  346. //                                  ON printela.code = 'price_map.white-gloss-plastic'
  347. //                            INNER JOIN price_map AS pop_web
  348. //                                  ON pop_web.code = 'price_map.pop-white-gloss-plastic'
  349. //                            INNER JOIN package_size
  350. //                                  ON package_size.grams = price_list.grams
  351. //                            WHERE price_list.price_map_id = printela.id
  352. //                                    ");
  353. //
  354. //        /**
  355. //         * brown-kraft-paper
  356. //         */
  357. //        $this->addSql("
  358. //                        INSERT INTO price_map(code, pouch_options, sustainable, uuid, technology_id, varnish_id, material_id, structure_thickness, is_visible_in_web_constructor)
  359. //                            SELECT
  360. //                                   'price_map.pop-brown-kraft-paper',
  361. //                                   price_map.pouch_options,
  362. //                                   price_map.sustainable,
  363. //                                   UUID(),
  364. //                                   technology.id,
  365. //                                   varnish.id,
  366. //                                   material.id,
  367. //                                   price_map.structure_thickness,
  368. //                                   1
  369. //                            FROM price_map
  370. //                            INNER JOIN technology
  371. //                                ON technology.code = 'technologies.screen_printing'
  372. //                            INNER JOIN varnish
  373. //                                ON varnish.code = 'finishing.holography'
  374. //                            INNER JOIN material
  375. //                                ON material.code = 'material.brown_kraft_paper'
  376. //                            WHERE price_map.code = 'price_map.brown-kraft-paper'
  377. //                                    ");
  378. //        $this->addSql("
  379. //                        INSERT INTO price_list(units, price_map_id, grams, height, width, depth, min_quantity, max_quantity, price_per_unit, package_size_id, uuid)
  380. //                            SELECT
  381. //                                   'unit.pcs',
  382. //                                   pop_web.id,
  383. //                                   price_list.grams,
  384. //                                   price_list.height,
  385. //                                   price_list.width,
  386. //                                   price_list.depth,
  387. //                                   price_list.min_quantity,
  388. //                                   price_list.max_quantity,
  389. //                                   price_list.price_per_unit,
  390. //                                   package_size.id,
  391. //                                   UUID()
  392. //                            FROM price_list
  393. //                            INNER JOIN price_map AS printela
  394. //                                  ON printela.code = 'price_map.brown-kraft-paper'
  395. //                            INNER JOIN price_map AS pop_web
  396. //                                  ON pop_web.code = 'price_map.pop-brown-kraft-paper'
  397. //                            INNER JOIN package_size
  398. //                                  ON package_size.grams = price_list.grams
  399. //                            WHERE price_list.price_map_id = printela.id
  400. //                                    ");
  401.     }
  402.     public function down(Schema $schema): void
  403.     {
  404.         $this->addSql('ALTER TABLE price_map DROP is_visible_in_web_constructor');
  405.     }
  406. }