Syncing and linking |
Hi everyone,
I've started my second project with CI4 and notice which things I made wrong or missed in my first project ![]() So I've been digging a bit deeper by now, so two more questions came to my mind what the best practice is. - How do you keep databases in sync between live and dev site? Currently I keep exporting and importing databases via phpmyadmin. But is there a more clever way? - I've installed some tools (e.g. Bootstrap or TinyMCE) via Composer. E.g. TinyMCE documentation reads like "use build tools to copy files to your project". So my current way is copy the js/css files from the vendor to my public folder, but updatewise this can't be the best practice? I am looking forward to hear the best practices and learn something from you.
I don't have constant data updates in the DB, so I do import/export.
To update public packages, there is a command: https://codeigniter4.github.io/userguide...es-example
@kenjis I think the conversation is about data - how to update rows.
I also use migrations for tables
For example, if you add new master data, you can use Database Migrations.
I do use Migrations already, it's a pleasant feature. But my data change on the live site. In particular I add more files and entries to the website and my dev site is behind, the data just gets older and older. Who want to add all data twice on live and dev...
![]()
Outside of the scope you’re trying to achieve but I use Navicat (not free, unfortunately) to sync.
I'm already using Migrations, which is a fantastic feature. However, my live site's data is constantly changing. I frequently add more files and entries to the website, while my development site lags behind. It's not practical to add data manually to both sites. So, I've been looking for a more efficient solution, similar to something like 'rake db:restore' in Rails. I want a way to easily sync and update the data between my development and live sites.
|
Welcome Guest, Not a member yet? Register Sign In |