Search
 
SCRIPT & CODE EXAMPLE
 

RUBY

List and delete migration from rails console

rails db:migrate:status
rails dbconsole
delete from schema_migrations where version='<version>';
Comment

how to destroy a migration in rails

$ rails d migration SameMigrationNameAsUsedToGenerate
Comment

rails migration remove colum

remove_column :table_name, :column_name
Comment

how to reset migrations rails

To rollback all migrations the best solution is:

rake db:migrate VERSION=0
This will rollback any migrations without losing data. Then, run all migrations again with

rake db:migrate
Comment

PREVIOUS NEXT
Code Example
Ruby :: ruby unshift method 
Ruby :: ruby substring remove 
Ruby :: ruby hash merge 
Ruby :: ruby how to loop through an array 
Ruby :: ruby match word in string 
Ruby :: concatenate arrays in ruby 
Ruby :: ruby rails activerecord to array hash 
Ruby :: ruby default method parameters 
Ruby :: ruby prepend array 
Ruby :: date class to unix timestamp ruby 
Ruby :: rails run rspec 
Ruby :: preview mailers rails 
Ruby :: how to get fields of a table in rails 
Ruby :: rails cors allow all 
Ruby :: ruby append to array 
Ruby :: ruby conditionals 
Ruby :: rails server not updating 
Ruby :: ruby begin rescue ensure 
Ruby :: ruby get ascii value of character 
Ruby :: rails destroy something from db 
Ruby :: ruby merge arrays unique 
Ruby :: In Jekyll - get the parent url path of a collection with concatenation 
Ruby :: ruby null 
Ruby :: ruby ** 
Ruby :: dependent destroy, only the foreign key 
Ruby :: ruby basic arithmetic 
Ruby :: hoow to match a complete word in ruby? 
R :: r - remove scientific notations 
R :: reduce list in parallel r 
R :: view table/dataframe in r 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =