forked from SymfonyCasts/symfony-ux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre-turbo-empty-migrations.diff
571 lines (571 loc) · 23.6 KB
/
pre-turbo-empty-migrations.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
diff --git a/composer.json b/composer.json
index 6029acc..deeaba5 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,6 @@
"composer/package-versions-deprecated": "1.11.99.1",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "^2.2",
- "doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.8",
"phpdocumentor/reflection-docblock": "^5.2",
"sensio/framework-extra-bundle": "^6.1",
diff --git a/composer.lock b/composer.lock
index cbfe9de..891bb04 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "249b2d1b0f44234410f57e6107046121",
+ "content-hash": "853a1afcbb1d5dd53ba7458f50abc24c",
"packages": [
{
"name": "composer/package-versions-deprecated",
@@ -669,90 +669,6 @@
],
"time": "2021-05-06T19:21:22+00:00"
},
- {
- "name": "doctrine/doctrine-migrations-bundle",
- "version": "3.1.1",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git",
- "reference": "91f0a5e2356029575f3038432cc188b12f9d5da5"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/91f0a5e2356029575f3038432cc188b12f9d5da5",
- "reference": "91f0a5e2356029575f3038432cc188b12f9d5da5",
- "shasum": ""
- },
- "require": {
- "doctrine/doctrine-bundle": "~1.0|~2.0",
- "doctrine/migrations": "^3.1",
- "php": "^7.2|^8.0",
- "symfony/framework-bundle": "~3.4|~4.0|~5.0"
- },
- "require-dev": {
- "doctrine/coding-standard": "^8.0",
- "doctrine/orm": "^2.6",
- "doctrine/persistence": "^1.3||^2.0",
- "phpstan/phpstan": "^0.12",
- "phpstan/phpstan-deprecation-rules": "^0.12",
- "phpstan/phpstan-phpunit": "^0.12",
- "phpstan/phpstan-strict-rules": "^0.12",
- "phpunit/phpunit": "^7.0|^8.0|^9.0"
- },
- "type": "symfony-bundle",
- "autoload": {
- "psr-4": {
- "Doctrine\\Bundle\\MigrationsBundle\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "[email protected]"
- },
- {
- "name": "Doctrine Project",
- "homepage": "http://www.doctrine-project.org"
- },
- {
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- }
- ],
- "description": "Symfony DoctrineMigrationsBundle",
- "homepage": "https://www.doctrine-project.org",
- "keywords": [
- "dbal",
- "migrations",
- "schema"
- ],
- "support": {
- "issues": "https://github.com/doctrine/DoctrineMigrationsBundle/issues",
- "source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/3.1.1"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-migrations-bundle",
- "type": "tidelift"
- }
- ],
- "time": "2021-04-10T16:48:53+00:00"
- },
{
"name": "doctrine/event-manager",
"version": "1.1.1",
@@ -1091,110 +1007,6 @@
],
"time": "2020-05-25T17:44:05+00:00"
},
- {
- "name": "doctrine/migrations",
- "version": "3.1.2",
- "source": {
- "type": "git",
- "url": "https://github.com/doctrine/migrations.git",
- "reference": "1c2780df6b58998f411e64973cfa464ba0a06e00"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/doctrine/migrations/zipball/1c2780df6b58998f411e64973cfa464ba0a06e00",
- "reference": "1c2780df6b58998f411e64973cfa464ba0a06e00",
- "shasum": ""
- },
- "require": {
- "composer/package-versions-deprecated": "^1.8",
- "doctrine/dbal": "^2.11",
- "doctrine/event-manager": "^1.0",
- "friendsofphp/proxy-manager-lts": "^1.0",
- "php": "^7.2 || ^8.0",
- "psr/log": "^1.1.3",
- "symfony/console": "^3.4 || ^4.4.16 || ^5.0",
- "symfony/stopwatch": "^3.4 || ^4.0 || ^5.0"
- },
- "require-dev": {
- "doctrine/coding-standard": "^8.0",
- "doctrine/orm": "^2.6",
- "doctrine/persistence": "^1.3 || ^2.0",
- "doctrine/sql-formatter": "^1.0",
- "ergebnis/composer-normalize": "^2.9",
- "ext-pdo_sqlite": "*",
- "phpstan/phpstan": "^0.12",
- "phpstan/phpstan-deprecation-rules": "^0.12",
- "phpstan/phpstan-phpunit": "^0.12",
- "phpstan/phpstan-strict-rules": "^0.12",
- "phpstan/phpstan-symfony": "^0.12",
- "phpunit/phpunit": "^8.5 || ^9.4",
- "symfony/process": "^3.4 || ^4.0 || ^5.0",
- "symfony/yaml": "^3.4 || ^4.0 || ^5.0"
- },
- "suggest": {
- "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.",
- "symfony/yaml": "Allows the use of yaml for migration configuration files."
- },
- "bin": [
- "bin/doctrine-migrations"
- ],
- "type": "library",
- "extra": {
- "composer-normalize": {
- "indent-size": 4,
- "indent-style": "space"
- }
- },
- "autoload": {
- "psr-4": {
- "Doctrine\\Migrations\\": "lib/Doctrine/Migrations"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Benjamin Eberlei",
- "email": "[email protected]"
- },
- {
- "name": "Jonathan Wage",
- "email": "[email protected]"
- },
- {
- "name": "Michael Simonson",
- "email": "[email protected]"
- }
- ],
- "description": "PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.",
- "homepage": "https://www.doctrine-project.org/projects/migrations.html",
- "keywords": [
- "database",
- "dbal",
- "migrations"
- ],
- "support": {
- "issues": "https://github.com/doctrine/migrations/issues",
- "source": "https://github.com/doctrine/migrations/tree/3.1.2"
- },
- "funding": [
- {
- "url": "https://www.doctrine-project.org/sponsorship.html",
- "type": "custom"
- },
- {
- "url": "https://www.patreon.com/phpdoctrine",
- "type": "patreon"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fmigrations",
- "type": "tidelift"
- }
- ],
- "time": "2021-04-24T12:54:34+00:00"
- },
{
"name": "doctrine/orm",
"version": "2.9.1",
@@ -5471,68 +5283,6 @@
],
"time": "2021-04-01T10:43:52+00:00"
},
- {
- "name": "symfony/stopwatch",
- "version": "v5.3.0-RC1",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/stopwatch.git",
- "reference": "8b99a525d24c264990d07f8db3e709d11b2651e9"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8b99a525d24c264990d07f8db3e709d11b2651e9",
- "reference": "8b99a525d24c264990d07f8db3e709d11b2651e9",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.5",
- "symfony/service-contracts": "^1.0|^2"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "Symfony\\Component\\Stopwatch\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Fabien Potencier",
- "email": "[email protected]"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Provides a way to profile code",
- "homepage": "https://symfony.com",
- "support": {
- "source": "https://github.com/symfony/stopwatch/tree/v5.3.0-RC1"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2021-05-09T16:18:06+00:00"
- },
{
"name": "symfony/string",
"version": "v5.3.0-RC1",
@@ -7391,6 +7141,68 @@
],
"time": "2021-03-31T07:20:47+00:00"
},
+ {
+ "name": "symfony/stopwatch",
+ "version": "v5.3.0-RC1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/stopwatch.git",
+ "reference": "8b99a525d24c264990d07f8db3e709d11b2651e9"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/stopwatch/zipball/8b99a525d24c264990d07f8db3e709d11b2651e9",
+ "reference": "8b99a525d24c264990d07f8db3e709d11b2651e9",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/service-contracts": "^1.0|^2"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Stopwatch\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "[email protected]"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides a way to profile code",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/stopwatch/tree/v5.3.0-RC1"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2021-05-09T16:18:06+00:00"
+ },
{
"name": "symfony/web-profiler-bundle",
"version": "v5.3.0-RC1",
diff --git a/config/bundles.php b/config/bundles.php
index b0bfb47..12d8b37 100644
--- a/config/bundles.php
+++ b/config/bundles.php
@@ -3,7 +3,6 @@
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
- Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml
deleted file mode 100644
index a0a17a0..0000000
--- a/config/packages/doctrine_migrations.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
-doctrine_migrations:
- migrations_paths:
- # namespace is arbitrary but should be different from App\Migrations
- # as migrations classes should NOT be autoloaded
- 'DoctrineMigrations': '%kernel.project_dir%/migrations'
- enable_profiler: '%kernel.debug%'
diff --git a/migrations/.gitignore b/migrations/.gitignore
deleted file mode 100644
index e69de29..0000000
diff --git a/migrations/Version20191206161148.php b/migrations/Version20191206161148.php
deleted file mode 100644
index 2770ca7..0000000
--- a/migrations/Version20191206161148.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace DoctrineMigrations;
-
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\Migrations\AbstractMigration;
-
-/**
- * Auto-generated Migration: Please modify to your needs!
- */
-final class Version20191206161148 extends AbstractMigration
-{
- public function getDescription() : string
- {
- return '';
- }
-
- public function up(Schema $schema) : void
- {
- // this up() migration is auto-generated, please modify it to your needs
- $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
-
- $this->addSql('CREATE TABLE category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(100) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('CREATE TABLE purchase_item (id INT AUTO_INCREMENT NOT NULL, purchase_id INT NOT NULL, product_id INT NOT NULL, color_id INT DEFAULT NULL, quantity INT NOT NULL, INDEX IDX_6FA8ED7D558FBEB9 (purchase_id), INDEX IDX_6FA8ED7D4584665A (product_id), INDEX IDX_6FA8ED7D7ADA1FB5 (color_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, category_id INT NOT NULL, name VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, brand VARCHAR(20) NOT NULL, weight DOUBLE PRECISION DEFAULT NULL, price INT NOT NULL, stock_quantity INT NOT NULL, INDEX IDX_D34A04AD12469DE2 (category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('CREATE TABLE product_color (product_id INT NOT NULL, color_id INT NOT NULL, INDEX IDX_C70A33B54584665A (product_id), INDEX IDX_C70A33B57ADA1FB5 (color_id), PRIMARY KEY(product_id, color_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('CREATE TABLE purchase (id INT AUTO_INCREMENT NOT NULL, customer_name VARCHAR(255) NOT NULL, customer_email VARCHAR(255) NOT NULL, customer_address VARCHAR(255) NOT NULL, customer_zip VARCHAR(20) DEFAULT NULL, customer_city VARCHAR(255) NOT NULL, customer_phone VARCHAR(20) DEFAULT NULL, is_shipped TINYINT(1) NOT NULL, created_at DATETIME NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('CREATE TABLE color (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(100) NOT NULL, hex_color VARCHAR(6) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('ALTER TABLE purchase_item ADD CONSTRAINT FK_6FA8ED7D558FBEB9 FOREIGN KEY (purchase_id) REFERENCES purchase (id)');
- $this->addSql('ALTER TABLE purchase_item ADD CONSTRAINT FK_6FA8ED7D4584665A FOREIGN KEY (product_id) REFERENCES product (id)');
- $this->addSql('ALTER TABLE purchase_item ADD CONSTRAINT FK_6FA8ED7D7ADA1FB5 FOREIGN KEY (color_id) REFERENCES color (id)');
- $this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD12469DE2 FOREIGN KEY (category_id) REFERENCES category (id)');
- $this->addSql('ALTER TABLE product_color ADD CONSTRAINT FK_C70A33B54584665A FOREIGN KEY (product_id) REFERENCES product (id) ON DELETE CASCADE');
- $this->addSql('ALTER TABLE product_color ADD CONSTRAINT FK_C70A33B57ADA1FB5 FOREIGN KEY (color_id) REFERENCES color (id) ON DELETE CASCADE');
- }
-
- public function down(Schema $schema) : void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
-
- $this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD12469DE2');
- $this->addSql('ALTER TABLE purchase_item DROP FOREIGN KEY FK_6FA8ED7D4584665A');
- $this->addSql('ALTER TABLE product_color DROP FOREIGN KEY FK_C70A33B54584665A');
- $this->addSql('ALTER TABLE purchase_item DROP FOREIGN KEY FK_6FA8ED7D558FBEB9');
- $this->addSql('ALTER TABLE purchase_item DROP FOREIGN KEY FK_6FA8ED7D7ADA1FB5');
- $this->addSql('ALTER TABLE product_color DROP FOREIGN KEY FK_C70A33B57ADA1FB5');
- $this->addSql('DROP TABLE category');
- $this->addSql('DROP TABLE purchase_item');
- $this->addSql('DROP TABLE product');
- $this->addSql('DROP TABLE product_color');
- $this->addSql('DROP TABLE purchase');
- $this->addSql('DROP TABLE user');
- $this->addSql('DROP TABLE color');
- }
-}
diff --git a/migrations/Version20200127144611.php b/migrations/Version20200127144611.php
deleted file mode 100644
index fe4f0b0..0000000
--- a/migrations/Version20200127144611.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace DoctrineMigrations;
-
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\Migrations\AbstractMigration;
-
-/**
- * Auto-generated Migration: Please modify to your needs!
- */
-final class Version20200127144611 extends AbstractMigration
-{
- public function getDescription() : string
- {
- return '';
- }
-
- public function up(Schema $schema) : void
- {
- // this up() migration is auto-generated, please modify it to your needs
- $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
-
- $this->addSql('ALTER TABLE product ADD image_filename VARCHAR(255) NOT NULL');
- }
-
- public function down(Schema $schema) : void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
-
- $this->addSql('ALTER TABLE product DROP image_filename');
- }
-}
diff --git a/migrations/Version20210512155409.php b/migrations/Version20210512155409.php
deleted file mode 100644
index 2c17c9c..0000000
--- a/migrations/Version20210512155409.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-
-declare(strict_types=1);
-
-namespace DoctrineMigrations;
-
-use Doctrine\DBAL\Schema\Schema;
-use Doctrine\Migrations\AbstractMigration;
-
-/**
- * Auto-generated Migration: Please modify to your needs!
- */
-final class Version20210512155409 extends AbstractMigration
-{
- public function getDescription() : string
- {
- return '';
- }
-
- public function up(Schema $schema) : void
- {
- // this up() migration is auto-generated, please modify it to your needs
- $this->addSql('CREATE TABLE review (id INT AUTO_INCREMENT NOT NULL, owner_id INT NOT NULL, product_id INT NOT NULL, content LONGTEXT NOT NULL, stars INT NOT NULL, INDEX IDX_794381C67E3C61F9 (owner_id), INDEX IDX_794381C64584665A (product_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
- $this->addSql('ALTER TABLE review ADD CONSTRAINT FK_794381C67E3C61F9 FOREIGN KEY (owner_id) REFERENCES user (id)');
- $this->addSql('ALTER TABLE review ADD CONSTRAINT FK_794381C64584665A FOREIGN KEY (product_id) REFERENCES product (id)');
- }
-
- public function down(Schema $schema) : void
- {
- // this down() migration is auto-generated, please modify it to your needs
- $this->addSql('DROP TABLE review');
- }
-}
diff --git a/symfony.lock b/symfony.lock
index fe6e575..5b7cdfb 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -60,19 +60,6 @@
"src/DataFixtures/AppFixtures.php"
]
},
- "doctrine/doctrine-migrations-bundle": {
- "version": "3.1",
- "recipe": {
- "repo": "github.com/symfony/recipes",
- "branch": "master",
- "version": "3.1",
- "ref": "ee609429c9ee23e22d6fa5728211768f51ed2818"
- },
- "files": [
- "config/packages/doctrine_migrations.yaml",
- "migrations/.gitignore"
- ]
- },
"doctrine/event-manager": {
"version": "1.1.1"
},
@@ -85,9 +72,6 @@
"doctrine/lexer": {
"version": "1.2.1"
},
- "doctrine/migrations": {
- "version": "3.0.2"
- },
"doctrine/orm": {
"version": "2.8.1"
},