CodeIgniter Forums
Syncing and linking - Printable Version

+- CodeIgniter Forums (
+-- Forum: Using CodeIgniter (
+--- Forum: Best Practices (
+--- Thread: Syncing and linking (/showthread.php?tid=88399)

Syncing and linking - trunky - 09-04-2023

Hi everyone,
I've started my second project with CI4 and notice which things I made wrong or missed in my first project Smile Thanksfully just personal things.
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.

RE: Syncing and linking - ozornick - 09-04-2023

I don't have constant data updates in the DB, so I do import/export.

To update public packages, there is a command:

RE: Syncing and linking - kenjis - 09-04-2023

Database Migrations

RE: Syncing and linking - ozornick - 09-04-2023

@kenjis I think the conversation is about data - how to update rows.
I also use migrations for tables

RE: Syncing and linking - kenjis - 09-04-2023

For example, if you add new master data, you can use Database Migrations.

RE: Syncing and linking - trunky - 09-05-2023

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... Smile So I thought there would be some smarter way (like 'rake db:restore' for example on Rails)

RE: Syncing and linking - JustJohnQ - 09-05-2023

Outside of the scope you’re trying to achieve but I use Navicat (not free, unfortunately) to sync.

RE: Syncing and linking - Sebastian - 10-30-2023

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.