Log message #4181417

# At Username Text
# Mar 29th 2019, 12:33 admad @val are you referring to postgres schema?
# Mar 29th 2019, 12:33 spriz Hmm, and it’s the same app environment for all customers?
# Mar 29th 2019, 12:28 val I wonder how would it be possible to set the schema name before the model is created. Logically, model factory seems to be a good place for that.
# Mar 29th 2019, 12:24 val > Hi, is there a quick way in cake 3.x to switch to a different database schema without creating a new database connection? The use case is when each customer has its own database, the schemas are identical for each customer and cake app needs to retrieve data from multiple databases (from identical table of the customer database). Or simply to switch from one customer database to another. Creating new connections is too expensive.
# Mar 29th 2019, 12:22 spriz What are you trying to accomplish @val?
# Mar 29th 2019, 12:22 slackebot2 !xy problem
# Mar 29th 2019, 12:22 slackebot2 Command sent from Slack by spriz:
# Mar 29th 2019, 12:22 spriz I believe so, not completely sure though. This could sound like a XY problem though
# Mar 29th 2019, 12:21 val IndexRegistry is a factory?
# Mar 29th 2019, 12:20 spriz that’s a cakephp elasticsearch integration using these model factories
# Mar 29th 2019, 12:20 spriz specifically https://github.com/cakephp/elastic-search/blob/b9d434c0fce6250a8acb616f7be00d599e276803/src/IndexRegistry.php AFAIK :slightly_smiling_face:
# Mar 29th 2019, 12:20 val @spriz what's that?
# Mar 29th 2019, 12:19 spriz @val I’d imagine it could be https://github.com/cakephp/elastic-search/tree/master/src ?
# Mar 29th 2019, 12:18 val The cookbook briefly mentions the model factory - https://book.cakephp.org/3.0/en/controllers.html#loading-additional-models. Could anyone provide an example or a better explanation how to build my own model factory?
# Mar 29th 2019, 12:15 spriz People tend to forget that developing software is not really about the initial cost but also the year-to-year maintenance, which often is the same or higher than the cost of initially building it
# Mar 29th 2019, 12:14 spriz @acosonic as an outsider it really seems like you’re working with someone that do not truly understand the maintenance cost of software :cold_sweat:
# Mar 29th 2019, 10:19 acosonic Well, now they have decided to make order in backend system, it might be good idea to work on migration later
# Mar 29th 2019, 09:57 neon1024 I can’t find that one on YouTube, sorry
# Mar 29th 2019, 09:54 neon1024 There was a good talk about that at Symfony meetup by Cieran McNulty
# Mar 29th 2019, 09:54 neon1024 Parallel upgrades are a good solution here
# Mar 29th 2019, 09:54 neon1024 The list isn’t endless. It might be big, but you’re not going to upgrade all those parts at the same time
# Mar 29th 2019, 09:53 neon1024 https://www.youtube.com/watch?v=DtH__Iz9Mjs
# Mar 29th 2019, 09:52 acosonic The codebase is massive, and it's mostly financial stuff, products, customers, account plans, coupons, promotions, landing page systems, invoices, re-occuring payments, blah-blah, the list is endless...
# Mar 29th 2019, 09:52 neon1024 Let me find Mark’s talk where he outlines it all
# Mar 29th 2019, 09:52 neon1024 Currently yes, but not once 4 is out
# Mar 29th 2019, 09:51 acosonic So they say, they will be fixing Cake 2 stuff, when something like php upgrades broke it
# Mar 29th 2019, 09:50 neon1024 So maybe not now, but soon you’ll want to think about leveraging newer code and php 7
# Mar 29th 2019, 09:49 neon1024 I would expect Cake 4 to be released before the end of the year
# Mar 29th 2019, 09:49 neon1024 Do bear in mind that once Cake 4 is released Cake 2 will no longer be supported
# Mar 29th 2019, 09:48 acosonic @neon1024 nope, just different backend admin theme, and fixing layout
# Mar 29th 2019, 09:48 neon1024 Starting over?
# Mar 29th 2019, 09:48 acosonic @val I was explaining earlier :slightly_smiling_face: couple of days ago
# Mar 29th 2019, 09:47 val @acosonic Intriguing. Why?
# Mar 29th 2019, 09:43 acosonic Good, my team had meeting to start upgrading old cake 2 based crm with new backend theme, once we started talking about features, we definitely decided never to go to another framework or even upgrade :)
# Mar 29th 2019, 08:39 neon1024 How’s things?
# Mar 29th 2019, 08:39 neon1024 Oh! Hello!
# Mar 29th 2019, 08:37 birdy247 morning @neon1024
# Mar 29th 2019, 08:36 neon1024 Morning all
# Mar 29th 2019, 08:12 val @bmudda nice article although it does not answer the question how to switch schemas without creating a new database connection
# Mar 29th 2019, 00:37 rightscoreanalysis I have to do something in the befprePaginate event when using the CRUD plugin
# Mar 29th 2019, 00:33 bmudda you can change the `limit` to the number you need