rake_migrations 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98a51052b64ba4d945b862d44e21b89c130e54e8
|
4
|
+
data.tar.gz: a6d9393c1dfb0a4d63677bf05f93476ba710ed08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7016a63a2a2ec21087b486e35c0f3d7ed70c5c4c50543400baa72a6807f0f6eb392ce3e3bfa0a0d3a3e88125e9de95484b1aa1e81c277e5da599a1236d3eb752
|
7
|
+
data.tar.gz: b7e2775f68646c105f4e1d5011d3bc4e593c911b855afdaea05dfbfde343bf48eec41ed68a234ebe1e169ad61ba528cb45728cfce64981f9c921f3ac447cdfa9
|
data/README.md
CHANGED
@@ -23,6 +23,12 @@ rails g rake_migrations:install
|
|
23
23
|
rake db:migrate
|
24
24
|
```
|
25
25
|
|
26
|
+
Finally, open the file 'config/rake_migrations_check.rb' and replace "<database name>" with your database's name:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
client = Mysql2::Client.new(host: "localhost", username: "root", database: "<database name>")
|
30
|
+
```
|
31
|
+
|
26
32
|
## Use
|
27
33
|
Whenever somebody from your team wants to create a new run once task, simply generate it by running:
|
28
34
|
|
@@ -2,7 +2,7 @@ require 'mysql2'
|
|
2
2
|
|
3
3
|
module RakeMigrationsCheck
|
4
4
|
def self.check
|
5
|
-
client = Mysql2::Client.new(host: "localhost", username: "root", database: "
|
5
|
+
client = Mysql2::Client.new(host: "localhost", username: "root", database: "<database name>")
|
6
6
|
results = client.query("select * from rake_migrations").map {|res| res["version"] }
|
7
7
|
rake_migrations_lib = "#{`pwd`.strip}/lib/tasks/rake_migrations/*"
|
8
8
|
|