Skip to content

Instantly share code, notes, and snippets.

@koic
Last active August 26, 2016 09:38
Show Gist options
  • Select an option

  • Save koic/51d449957253330dee05d07f19a5d69c to your computer and use it in GitHub Desktop.

Select an option

Save koic/51d449957253330dee05d07f19a5d69c to your computer and use it in GitHub Desktop.
Difference between schema and migrate files
bundle exec rake db:migrate:status | sed 's/\s\{1,\}/ /g' | cut -f3 -d ' ' > tmp/schema.txt
# Remove the header of above file
ls db/migrate | sed 's/db\/migrate//g' | cut -f1 -d '_' > tmp/file.txt
diff tmp/schema.txt tmp/file.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment