Experiment using 2 database on rails. The databases are MSSQL Server & PostgreSQL.
Client has legacy apps with data stored in old MSSQL Server database. Client need some additional feature to support his bussiness. But the legacy apps was built with old technology & hard to maintain.
So the solution is rewrite the legacy apps with mature & good community support technology. And gradually migrate data from old MSSQL Server to common good database (PostgreSQL).
Requirements: Docker, Docker Compose, Internet
- Clone repo &
cdinto it - Open
Dockerfile.dev. Modify_UID_,_GID_,_USERNAME_,_GROUPNAME_with your own value from host machine - In project root directory run
docker-compose up - Create database & run migrations:
- Run
docker-compose exec app bin/rails db:create:primary - Run
docker-compose exec app bin/rails db:migrate:primary - Run
docker-compose exec app bin/rails db:create:legacy - Run
docker-compose exec app bin/rails db:migrate:legacy
- Run
- For legacy data (MSSQL), open http://localhost:3000/legacy/todos on your browser
- For primary data (PostgreSQL), open http://localhost:3000/todos on your browser