Skip to content

Instantly share code, notes, and snippets.

@Ikera
Last active August 30, 2016 20:57
Show Gist options
  • Save Ikera/624d0049ada8882c016fc1ab60767375 to your computer and use it in GitHub Desktop.
Save Ikera/624d0049ada8882c016fc1ab60767375 to your computer and use it in GitHub Desktop.

put annoonces_yoga_in.sql and annoonces_ayurveda.sql in yoga_service_api folder

Create database:

Go to mysql console, from command line mysql -u root or mysql -u root -p run command for creating mysql database create database database_name

Import db:

leave mysql console mysql -u root -proot ayurveda_in_legacy < annonces_ayurveda.sql mysql -u root -proot yoga_in_dev_legacy < annonces_yoga.sql mysql -u root -proot yoga_dev_legacy < Od slobe od yogainfo i ayfinder.sql

Change column name in yoga_in_dev_legacy

mysql -u root -proot use yoga_in_dev_legacy; alter table topical_pages change type offer varchar (10); leave mysql console

Move images to yoga_service_api

Move images from yoga_info and ayurveda_finder to public/system Move images(pic and premium folder) from ayurveda_in and yoga_in to yoga_service_api/tmp folder you can see names of image folder in rake task: https://github.com/Lucas71/yoga_service_api/blob/new-master/lib/tasks/ayurveda_in_legacy/migrate.rake#L139 remove from pics image: yoga-rishikesh-uttarakhand-north-india-918-1.jpg and yoga-trivandrum-kerala-south-india-198-4.jpg after all data are i production you will add these two photos Clean and create db:

rake db:drop rake db:create rake db:schema:load in console 4 times do YogaInLegacy::Entry.where(contact_email: “”).first.update(contact_email: “neki email”)

Import yoga.info and ayurvedafinder data:

vagrant@ysa:/vagrant$ rake legacy:run_all_tasks vagrant@ysa:/vagrant$ rake yoga_in_legacy:run_all_tasks vagrant@ysa:/vagrant$ rake ayurveda_in_legacy:run_all_tasks Pravljenje dump-a

mysqldump -u root -proot yoga_service_api_development > dump_name.sql

podizanje baze na server

vagrant@ysa:/vagrant$ scp all_four_sites_data.sql yoga-api@api.yoga.buldozerteam.com:/home

after this you need to ssh yoga-api@api.yoga.buldozerteam.com

yoga-api@stage2:~$ mysql -h 10.135.155.90 -u yoga-api -p -D yoga_staging < all_four_sites_data.sql

then you need to write password for production or staging:

production: yoga-app/akaj44100Ii1 and staging: yoga-api/Iff410101Jka43

Upload photo to staging

vagrant@ysa:/vagrant/public/system$ rsync --partial --progress --recursive . yoga-api@api.yoga.buldozerteam.com:projects/yoga-api/staging/web/shared/public/system this is for staging

vagrant@ysa:/vagrant/public/system$ rsync --partial --progress --recursive . yoga-api@api.production.yoga.buldozerteam.com:projects/yoga-api/production/web/shared/public/system this is for production

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment