Server 'a' has a postgres database 'sourcedb' with a table 'products'. I am creating a delivery system in laravel on a different server 'b' with its own database 'destinationdb' using mysql (MariaDb).
Once a day I need to update the products table on server 'b' with the latest product table from server 'a'. My idea is to just replace the products table on server 'b' with the products table on server 'a'.
I have researched many stackoverflow and other contributions to this question but not found a workable solution. I have tried
DB::statement("create table destinationdb.products like sourcedb.products")
DB::statement("insert destinationdb.products select * from sourcedb.products")
Since I am new to laravel I am struggling with the syntax especially with 'sourcedb' and 'destinationdb'.