Log message #4122674

# At Username Text
# Mar 7th 2018, 10:31 richellyitalo Can someone help with REST?
# Mar 7th 2018, 10:31 richellyitalo Hello.
# Mar 7th 2018, 10:30 dereuromark or even worse continue deploying and crashing then on production after the fact
# Mar 7th 2018, 10:30 dereuromark one field missing can be the difference that will bring the deployment to a crash
# Mar 7th 2018, 10:30 dereuromark One of my most important console shells these days: bin/cake fixture_check => sync fixtures to DB schema
# Mar 7th 2018, 10:29 dereuromark And also important: The fixtures need to 100% reflect that and contain good default data. This will prevent it by design, as the tests will then fail early on before you even start to deploy anything.
# Mar 7th 2018, 10:27 neon1024 But I think you need pretty solid validation and rules in your application
# Mar 7th 2018, 10:27 neon1024 I haven’t had too many issues when I have used foreign key constraints though
# Mar 7th 2018, 10:27 neon1024 I don’t actually know what the official line is with Cakephp and foreignkey constraints, and those ON UPDATE DELETE etc
# Mar 7th 2018, 10:26 dereuromark I am careful with those too
# Mar 7th 2018, 10:25 neon1024 Well I don’t use foreign key constraints, so I’ve never had this issue, sorry
# Mar 7th 2018, 10:18 willem thought it would be plugandplay but i have to check the order of statements manually?
# Mar 7th 2018, 10:18 willem problem is when it fails midway i cannot rollback
# Mar 7th 2018, 10:17 willem which uses the up() method
# Mar 7th 2018, 10:15 willem no wait, sorry, I create a diff which creates a migration file with all changes
# Mar 7th 2018, 10:15 neon1024 If you’re executing empty migrations, they should work! :P
# Mar 7th 2018, 10:15 neon1024 What you write in there is up to you
# Mar 7th 2018, 10:14 neon1024 Yes, bake makes an empty class.
# Mar 7th 2018, 10:14 willem baking a migration
# Mar 7th 2018, 10:14 neon1024 Could be that you need to organise your migrations code so that the foreign keys are written first, so the next queries pass the constraints
# Mar 7th 2018, 10:14 neon1024 Do you use `change()` or `up()` and `down()` ?
# Mar 7th 2018, 10:13 willem have a staging env. thats where it fails
# Mar 7th 2018, 10:13 willem Cake 3.5.1 / “cakephp/migrations”: “~1.0" (not sure wher to find the exact verion number)
# Mar 7th 2018, 10:11 dereuromark willem: you dont have a staging env?
# Mar 7th 2018, 10:10 neon1024 Are you baking a snapshot or a migration?
# Mar 7th 2018, 10:10 neon1024 @willem Which version of CakePHP are you using and which migrations plugin?
# Mar 7th 2018, 10:04 willem What is the best way to use migrations? Ive had a lot of times when i had a large database and modified it then baked a new migrations file, on the other server running migrate would fail midway because of for example foreign key checks. How can i prevent this so the migrations run successfully?
# Mar 7th 2018, 09:52 dereuromark it will easily all be resolved if we started to implement my sort improvements for paginator
# Mar 7th 2018, 09:52 dereuromark ;) that has been this way for a while, also when you switch sorting back to default it doesnt remove but keeps that one. only a small thing IMO, not worth fixing
# Mar 7th 2018, 09:43 neon1024 Actually, I’ll go look it up, and stop being lazy.
# Mar 7th 2018, 09:42 neon1024 Nor do I want to expose my data structure to the url
# Mar 7th 2018, 09:42 neon1024 I don’t have any sorting, so I don’t see any point in adding this pollution to my url
# Mar 7th 2018, 09:42 neon1024 `/guides?page=2andsort=Contents.publishedanddirection=desc`
# Mar 7th 2018, 09:42 neon1024 Why is `$this->Paginator->numbers()` appending query strings?
# Mar 7th 2018, 09:40 neon1024 Just feels like more code to me, and visually obfuscates what’s actually happening
# Mar 7th 2018, 09:40 neon1024 Then again I’ve never found a use for the exp() methods
# Mar 7th 2018, 09:39 neon1024 Sure
# Mar 7th 2018, 09:34 birdy247 with an 'OR' key?
# Mar 7th 2018, 09:33 neon1024 I’d have just used `$query->where()` inside the foreach personally
# Mar 7th 2018, 09:33 neon1024 Blimey how complex!
# Mar 7th 2018, 09:31 birdy247 Seems to work