Welcome Guest, Not a member yet? Register   Sign In
Syncing and linking
#1

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.
Reply
#2

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
Reply
#3

Database Migrations
https://codeigniter4.github.io/userguide...ation.html
Reply
#4

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

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

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)
Reply
#7

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

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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB