dbmigrate

How to transfer my MySQL database to another computer?

风流意气都作罢 提交于 2019-11-30 12:09:27
问题 I am using XAMPP package in my own desktop with Window 7 as OS. That means I'm using MySQL DB and Apache server. Now I would like to copy/migrate my whole MySQL DB to my friend's desktop, which is also with Window as OS, and also using XAMPP package. Is there any way for me to do that? 回答1: Copy database files from MySQL folder (under old xampp folder) except share , bin , and script folder see attached image to see which files need copy (only files with in green box) and replace all these

Rails: I update migration file then run db:migrate, but my schema isn't updating

☆樱花仙子☆ 提交于 2019-11-30 11:25:55
问题 I'm trying to add an extra field to one of my tables. I've added the field in the migration file (under db\migrate), then ran 'rake db:migrate' which ran without troubles. My text editor even told me my schema.db file has been updated and needs to refresh. The schema file does not contain my new field and any attempts to reference the field from my views fail miserably. How do I do this? It is possible to update a table with an extra field via rails without having to totally drop and recreate

PRIMARY KEY issue with creating tables in Rails using rake db:migrate command with mysql

有些话、适合烂在心里 提交于 2019-11-30 08:05:17
My version of rails is 4.0.0, my version of mysql is Ver 14.14 Distrib 5.7.9, for Win64 (x86_64). I am operating of an older version of rails as I was getting some clashes with the mysql as per my previous question Here . (check Kalelc 's approved answer for my recourse) upon running rake db:migrate I get the following error == CreateUsers: migrating ==================================================== -- create_table(:users) rake aborted! StandardError: An error has occurred, all later migrations canceled: Mysql2::Error: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key,

Heroku rake db:migrate results in Error R13 (Attach error) -> Failed to attach to process

旧时模样 提交于 2019-11-30 03:08:51
问题 I have a rails app on heroku that i am unable to run my latest database changes with. Running heroku run rake db:migrate gives me Running `rake db:migrate` attached to terminal... up, run.3167 ! Heroku client internal error. ! Search for help at: https://help.heroku.com ! Or report a bug at: https://github.com/heroku/heroku/issues/new Error: Operation timed out - connect(2) (Errno::ETIMEDOUT) Backtrace: /Users/gregg/.heroku/client/lib/heroku/client/rendezvous.rb:40:in `initialize' /Users

How to transfer my MySQL database to another computer?

一曲冷凌霜 提交于 2019-11-30 02:03:42
I am using XAMPP package in my own desktop with Window 7 as OS. That means I'm using MySQL DB and Apache server. Now I would like to copy/migrate my whole MySQL DB to my friend's desktop, which is also with Window as OS, and also using XAMPP package. Is there any way for me to do that? A.Aleem11 Copy database files from MySQL folder (under old xampp folder) except share , bin , and script folder see attached image to see which files need copy (only files with in green box) and replace all these database files in new installed xampp directory in MySQL folder. Restart xampp start MySQL and open

Rails: I update migration file then run db:migrate, but my schema isn't updating

拥有回忆 提交于 2019-11-30 00:11:19
I'm trying to add an extra field to one of my tables. I've added the field in the migration file (under db\migrate), then ran 'rake db:migrate' which ran without troubles. My text editor even told me my schema.db file has been updated and needs to refresh. The schema file does not contain my new field and any attempts to reference the field from my views fail miserably. How do I do this? It is possible to update a table with an extra field via rails without having to totally drop and recreate the database again? utapyngo http://guides.rubyonrails.org/migrations.html#changing-existing

Getting: “Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.” after cloning and migrating the project

倾然丶 夕夏残阳落幕 提交于 2019-11-29 20:00:03
I cloned my project. Bundled with "bundle install", then run "rake db:migrate". I am getting this error: (when I run the rails server and open my browser to localhost:3000) "Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue." I checked all migrations one by one and all were executed without errors. Also no errors were shown after the execution of "rake db:migrate". This is what I see when I execute " rake db:migrate:status " I am on development environment. Please let me know if you need any other information. I also tried "bundle exec rake db

How to rollback just one step using rake db:migrate

元气小坏坏 提交于 2019-11-29 19:23:09
After adding migration files in the db/migrate folder and running rake db:migrate , I want get back to the previous step, I think using VERSION=n is the right way to do that, but I don't know the correct value of n to use. Is there any command to check the current n value? It would be great if anyone could provide full instructions on how to use rake db:migrate . For starters rake db:rollback will get you back one step then rake db:rollback STEP=n Will roll you back n migrations where n is the number of recent migrations you want to rollback. More references here . Roll back the most recent

Getting: “Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue.” after cloning and migrating the project

守給你的承諾、 提交于 2019-11-28 15:51:35
问题 I cloned my project. Bundled with "bundle install", then run "rake db:migrate". I am getting this error: (when I run the rails server and open my browser to localhost:3000) "Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue." I checked all migrations one by one and all were executed without errors. Also no errors were shown after the execution of "rake db:migrate". This is what I see when I execute "rake db:migrate:status" I am on development

How to rollback just one step using rake db:migrate

跟風遠走 提交于 2019-11-28 13:45:19
问题 After adding migration files in the db/migrate folder and running rake db:migrate , I want get back to the previous step, I think using VERSION=n is the right way to do that, but I don't know the correct value of n to use. Is there any command to check the current n value? It would be great if anyone could provide full instructions on how to use rake db:migrate . 回答1: For starters rake db:rollback will get you back one step then rake db:rollback STEP=n Will roll you back n migrations where n