public
Description: Ruby on Rails plugin to provide notification when you need to run migrations
Homepage: http://blog.hasmanythrough.com/2008/3/2/migration-concordance
Clone URL: git://github.com/joshsusser/migration_concordance.git
Search Repo:
changed to using MD5 hash algorithm
joshsusser (author)
Sun Mar 02 14:31:58 -0800 2008
commit  23f4933a41187cea5319a6f3f08e638c006804b6
tree    d0114c4da3d318f89b850e24eee04d8de3a4cf80
parent  4879fff861beb43490fb43ba918fde3ef7f9a7ff
0
...
33
34
35
36
 
37
38
39
...
33
34
35
 
36
37
38
39
0
@@ -33,7 +33,7 @@
0
 
0
 MigrationConcordance works by taking a snapshot of the state of an appliation's migrations every
0
 time you run "rake db:migrate". It creates a file in db/migration_snapshot.yml that holds a list
0
-of all current migrations and their SHA-1 hashes. Therefore, if you migrate to a migration that is
0
+of all current migrations and their MD5 hashes. Therefore, if you migrate to a migration that is
0
 not the latest (using rake db:migrate VERSION=<version>), you won't get any more notifications
0
 even if you aren't on the latest version. It assumes you know what you are doing and won't keep
0
 nagging you to migrate after you've migrated somewhere already.
...
 
1
2
3
...
43
44
45
46
 
47
48
49
...
1
2
3
4
...
44
45
46
 
47
48
49
50
0
@@ -1,3 +1,4 @@
0
+require 'digest/md5'
0
 module ActiveRecord
0
   class Migrator
0
     class << self
0
@@ -43,7 +44,7 @@
0
         files = Dir[File.join(migrations_path, "[0-9]*_*.rb")].collect { |n| File.basename(n) }
0
         snapshot = {}
0
         files.each do |file|
0
- snapshot[File.basename(file, ".rb")] = Digest::SHA1.hexdigest(File.read(File.join(migrations_path, file)))
0
+ snapshot[File.basename(file, ".rb")] = Digest::MD5.hexdigest(File.read(File.join(migrations_path, file)))
0
         end
0
         snapshot
0
       end

Comments

    No one has commented yet.