# |
Aug 29th 2019, 17:45 |
sdevore |
@noel make sure that the user connecting to mysql has database access @localhost and/or @% and that you have granted access to the tables. If you are using mamp you should be able to use the tools in that to check your user permissions and granting (used to ship with phpMyAdmin/ Sequel Pro I think. |
# |
Aug 29th 2019, 17:28 |
graziel |
ah sorry i have no idea how to debug mac net issues |
# |
Aug 29th 2019, 17:25 |
noel |
@graziel thanks, I tried that but MAMP is hosting the app on `my-app:8888`, phinx seems happy with that – I don't get the 2002 error but it just hangs; doesn't actually run the migration. |
# |
Aug 29th 2019, 17:18 |
graziel |
try to use 127.0.0.1 instead of localhost |
# |
Aug 29th 2019, 17:18 |
noel |
phinxlog table is also empty |
# |
Aug 29th 2019, 17:16 |
noel |
Seems like if I change the host from `localhost` to the actual application web path (e.g. host: my-app:8888) then it doesn't cause errors and it is able to write the phinxlog table to the database... but it doesn't do any more than that – none of my migrations run and it just hangs. |
# |
Aug 29th 2019, 17:10 |
noel |
I can't seem to get Phinx to connect to my database however. CakePHP is connected to the database and I've used the same credentials in the phinx.yaml file. Here's the error: ``` InvalidArgumentException: There was a problem connecting to the database: SQLSTATE[HY000] [2002] No such file or directory in /Users/me/myproject/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/MysqlAdapter.php:127 ``` Any ideas? |
# |
Aug 29th 2019, 16:39 |
noel |
Got it... composer require --dev robmorgan/phinx@0.10.8 |
# |
Aug 29th 2019, 16:36 |
noel |
Any idea how I can resolve this? |
# |
Aug 29th 2019, 16:36 |
slackebot2 |
cakephp/migrations[2.1.1]. ``` |
# |
Aug 29th 2019, 16:36 |
slackebot2 |
satisfiable by robmorgan/phinx[0.10.3, 0.10.5, 0.10.6, 0.10.7, 0.10.8] but these conflict with your requirements or minimum-stability. - cakephp/migrations 2.1.1 requires robmorgan/phinx ~0.10.3 -> satisfiable by robmorgan/phinx[0.10.3, 0.10.5, 0.10.6, 0.10.7, 0.10.8] but these conflict with your requirements or minimum-stability. - Installation request for cakephp/migrations (locked at 2.1.1, required as ^2.0.0) -> satisfiable by |
# |
Aug 29th 2019, 16:36 |
noel |
Hullo all. I'm trying to get going with phinx and migrations. It's giving me errors: ``` Your requirements could not be resolved to an installable set of packages. Problem 1 - cakephp/migrations 2.1.1 requires robmorgan/phinx ~0.10.3 -> satisfiable by robmorgan/phinx[0.10.3, 0.10.5, 0.10.6, 0.10.7, 0.10.8] but these conflict with your requirements or minimum-stability. - cakephp/migrations 2.1.1 requires robmorgan/phinx ~0.10.3 -> |
# |
Aug 29th 2019, 15:47 |
neon1024 |
I knew it! :weary: |
# |
Aug 29th 2019, 15:46 |
steinkel |
it's PHP so it's your thing :P |
# |
Aug 29th 2019, 15:44 |
neon1024 |
Perhaps I could ask my DevOps colleague :P |
# |
Aug 29th 2019, 15:44 |
neon1024 |
Wouldn’t Deployer be a bit more in the DevOps part of the Venn diagram? |
# |
Aug 29th 2019, 15:43 |
neon1024 |
Still my current project is interesting, complex and huge. So lots to get stuck into |
# |
Aug 29th 2019, 15:42 |
neon1024 |
Or someone else in my team to help with these bits |
# |
Aug 29th 2019, 15:42 |
neon1024 |
Some days I wish I had just one application to work on so I could setup all these bits |
# |
Aug 29th 2019, 15:42 |
neon1024 |
It’s a good point, I still don’t have a deployment pipeline yet :face_with_finger_covering_closed_lips: |
# |
Aug 29th 2019, 15:42 |
dereuromark |
or simple sh file :slightly_smiling_face: |
# |
Aug 29th 2019, 15:41 |
steinkel |
https://github.com/deployphp/deployer/blob/master/recipe/cakephp.php#L37 |
# |
Aug 29th 2019, 15:38 |
neon1024 |
Yeah perhaps :) |
# |
Aug 29th 2019, 15:38 |
slackebot2 |
<neon1024> |
# |
Aug 29th 2019, 15:38 |
neon1024 |
Really? |
# |
Aug 29th 2019, 15:37 |
graziel |
@neon1024 just add custom script to composer.json |
# |
Aug 29th 2019, 15:34 |
ricksaccous |
but maybe too much magic is bad sometimes |
# |
Aug 29th 2019, 15:33 |
ricksaccous |
bin/cake schema_cache clear |
# |
Aug 29th 2019, 15:33 |
ricksaccous |
i've just made it habit to do |
# |
Aug 29th 2019, 15:33 |
ricksaccous |
yeah that would be cool |
# |
Aug 29th 2019, 15:27 |
neon1024 |
Feels like it would be handy addition |
# |
Aug 29th 2019, 15:26 |
neon1024 |
Should migrations clear orm cache after it’s run? |
# |
Aug 29th 2019, 13:58 |
neon1024 |
José’s plugin ;P |
# |
Aug 29th 2019, 13:57 |
alexdd55976 |
perfect |
# |
Aug 29th 2019, 13:57 |
alexdd55976 |
oh.. :) |
# |
Aug 29th 2019, 13:56 |
neon1024 |
Which is what the plugin does |
# |
Aug 29th 2019, 13:54 |
alexdd55976 |
@neon1024 you could do a afterSave in AppModel and save the originalData and newData in a versioning table, adding user_id and timestamp. versioning done |
# |
Aug 29th 2019, 13:47 |
admad |
i bet a single A4 won't cut it :slightly_smiling_face: |
# |
Aug 29th 2019, 13:45 |
neon1024 |
Time for pencil and paper! |
# |
Aug 29th 2019, 13:45 |
neon1024 |
...but I’d have to update foreignkeys or duplicate associations |
# |
Aug 29th 2019, 13:45 |
neon1024 |
I’m just thinking about hooking beforeSave to duplicate the record, then allow the save. Then swapping the duplicate to live and setting the saved to pending |