db_patch 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -1
  3. data/lib/db_patch/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 574c88472862d4a828ca55feb1b037cc00784834
4
- data.tar.gz: 6e2ecc460b59a842ade2b965cdcb4167041e8100
3
+ metadata.gz: 59e581d757718909d0fdd2cbc35320362df1fbfc
4
+ data.tar.gz: e3b5fe49d2cd428d955576cdc3d640c3a42b7e87
5
5
  SHA512:
6
- metadata.gz: 190cf6515397883790e7a8356bda18d9356f359739a3d5015e93cb19e494073bdd15d95676b6b81573386350cedd5f8f25dc4f09fc2c0ae0219e76c3d5a6a79a
7
- data.tar.gz: b24613ad9ee14fe45537adc7bb9f45c800639d25d4e5eb0776b528abc2ad4914b4e91bd2930d75a58b0773b0f76c23c17e0dc53a49d70268056724be223d822b
6
+ metadata.gz: b15ea07db56a9f6f92fe14ab7f83f23d4a45a599db4158b95a6e092ff3a03c21c63b53e267dbd8c7fb9dc9878a64185b249b12a998e14d30f488c1720d00f698
7
+ data.tar.gz: b48e89afeff89e42ca63a585ee696ddbd13716fb6cf803e423d7bf46964e070fb0fbd003349e840645cbfac557331900e604a07ea22def315dedcaa09c3d9d8b
data/README.md CHANGED
@@ -1,2 +1,90 @@
1
1
  # rails_db_patch
2
- Manage tool for ruby script which executed to DB only once
2
+ Manage tool for one-time ruby script which executed to DB in Rails application.
3
+
4
+
5
+ ## Description
6
+
7
+ You write one-time script for manipulate db.
8
+ then you'll test it in your environment. if it is OK, now you execute it to production environment.
9
+
10
+ by the way, where the script should be commit to?
11
+ Surely the script was finished the role(rest in peace..)
12
+
13
+ but.
14
+
15
+ Any chance.
16
+ it the customer request you to create new environment?
17
+ if your colleague destroyed Database?
18
+
19
+ the script will called from hell to revive the environment.
20
+
21
+ and, you'll say "*I trashed that script!!!!*"
22
+
23
+ you'll think "*I wish I can also manage one-time script also like migration file.*"
24
+
25
+
26
+ ### **This is it.**
27
+
28
+
29
+ ## Usage
30
+
31
+ First after installed, you need to initialize database.
32
+ it creates 'patch_versions' table to DB.
33
+
34
+ ```
35
+ rake db:patch:init
36
+ ```
37
+
38
+ Craete new blank script file.
39
+
40
+ ```
41
+ rake db:patch:new
42
+ ```
43
+
44
+ and execute the script to DB.
45
+
46
+ ```
47
+ rake db:patch:execute
48
+ ```
49
+
50
+
51
+ if you want to clear add patch history. execute this command.
52
+
53
+ ```
54
+ rake db:patch:clear
55
+ ```
56
+
57
+
58
+ ## Install
59
+
60
+ add Gemfile.
61
+
62
+ ```Gemfile
63
+ gem "db_patch"
64
+ ```
65
+
66
+ and install.
67
+
68
+ ```
69
+ bundle install
70
+ ```
71
+
72
+ then, It enable to use db_patch tasks.
73
+
74
+ ```
75
+ $ rake -T
76
+ rake db:patch:clear # clear database
77
+ rake db:patch:execute # execute path
78
+ rake db:patch:init # initialize database
79
+ rake db:patch:new # create new patch file
80
+ ```
81
+
82
+ ## Contribution
83
+
84
+ ## Licence
85
+
86
+ [MIT](https://github.com/jacoyutorius/rails_db_patch/blob/master/MIT-LICENSE)
87
+
88
+ ## Author
89
+
90
+ [jacoyutroius](https://github.com/jacoyutorius)
@@ -1,3 +1,3 @@
1
1
  module DbPatch
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db_patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuto Ogi