cakephp / phinx

PHP Database Migrations for Everyone
https://phinx.org
MIT License
4.47k stars 890 forks source link

Issue about "data size" #2163

Open HumanG33k opened 1 year ago

HumanG33k commented 1 year ago

Our file contain 483236 lines.

Should not Phinx be able to split/batch data ?

Exception: SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535
In [/home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php, line 335]

2023-01-06 00:06:23 error: [PDOException] SQLSTATE[HY000]: General error: 7 number of parameters must be between 0 and 65535 in /home/eventmaster_testing/sources/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php on line 335
Stack Trace:
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php:335
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php:180
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/TimedOutputAdapter.php:102
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/AdapterWrapper.php:180
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Table.php:652
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Table.php:624
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Db/Table.php:682
- /home/project/sources/config/Seeds/CitiesSeed.php:483236
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Migration/Manager/Environment.php:146
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php:416
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php:557
- /home/project/sources/vendor/robmorgan/phinx/src/Phinx/Console/Command/SeedRun.php:102
- /home/project/sources/vendor/cakephp/migrations/src/Command/Phinx/CommandTrait.php:37
- /home/project/sources/vendor/cakephp/migrations/src/Command/Phinx/Seed.php:76
- /home/project/sources/vendor/symfony/console/Command/Command.php:298
- /home/project/sources/vendor/symfony/console/Application.php:1024
- /home/project/sources/vendor/symfony/console/Application.php:299
- /home/project/sources/vendor/symfony/console/Application.php:171
- /home/project/sources/vendor/cakephp/migrations/src/Command/MigrationsCommand.php:126
- /home/project/sources/vendor/cakephp/cakephp/src/Console/BaseCommand.php:179
- /home/project/sources/vendor/cakephp/migrations/src/Command/MigrationsCommand.php:198
- /home/project/sources/vendor/cakephp/cakephp/src/Console/CommandRunner.php:334
- /home/project/sources/vendor/cakephp/cakephp/src/Console/CommandRunner.php:172
- /home/project/sources/bin/cake.php:12
MasterOdin commented 1 year ago

To confirm, you're using the ->insert method to try to add 483,236 data rows at once?

dereuromark commented 1 year ago

You might want to split this up your self in different seed files or alike?