Can't execute sql script to migrate database ()
Willy NGANG
Hello,
I have successfully deployed a Symfony (5.4) app on Platform.sh.
However, everytime i try to migrate my database with symfony < sql ./script.sql
I get a [RuntimeException] Aborted.
Please can somebody help with this? ![]()
0
Comments
Hi @wmn
Nice to know that you try Platform.sh with Symfony 5.4.
Could you please give us more details:
newwith option--cloudorsymfony project:init)?platform ssh "php bin/console d:s:u --dump-sql"(add--forceoption if there is a list of SQL commands)let me know
ps: One thing that could help is comparing your sources with the one from the official Symfony 5.4 template
Hello @flovntp
). It solves my issue for now. Thanks again!
Thank you for your reply.
Indeed I have done everything exactly as you ask, but I still can’t execute custom SQL script.
However I have found a way around by migrating my data through Doctrine Migration (which is automatically executed by Platform.sh deployment - what a great PaaS
Hi @wmn
ok, glad that you manage to solve your issue.
But i’m curious to understand why you can’t import sql script.
did you try it like described in the Symfony CLI Tips (last command) ?
as far as i see in your first comment, you didn’t write well the command :
sqlis not after the<but beforeHello @flovntp
You’re right, the < is after sql, but the error is only on my post.
I confirm that my command was symfony sql < script.sql
Just tried with symfony cloud:sql < script.sql like described in the Symfony CLI Tips and I still get the [RuntimeException] Aborted error…
and if you add
-vvvwith your command ?symfony sql -vvv < script.sqlPlease sign in to leave a comment.