Monday, 31 December 2018

Export and Import options for Mysql & Postgresql Databases

DataBase Dump & Restore for MYSQL
 
Take dump from database or Export from database

   Terminal : mysqldump -h localhost --user test --password testing > testingdb.sql

Import dump files to Database or Import

  Terminal : mysql -u root -p testing_new < testingdb.sql


DataBase Dump & Restore for POSTGRESQL
 
Take dump from database or Export 

  Terminal : pg_dump -h localhost -U postgres -d testing > testdb.sql

Import dump files to Database or Import
 
  Terminal : psql -h localhost -U postgres -d testing_new < testdb.sql

Interactor in Rails

What is interactor? Interactor provides a common interface for performing complex user interactions An interactor is a simple, sin...