actual_db_schema 0.7.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +3 -1
- data/README.md +12 -4
- data/actual_db_schema.gemspec +6 -6
- data/lib/actual_db_schema/version.rb +1 -1
- metadata +22 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93ad4dbd2993e9e0b42afe547312d0c65027dd94a0bb12ec32bd8db9a054e050
|
4
|
+
data.tar.gz: d7ba34542cd5d9fcc09e6eadeba2147ab00e21245ad41197e9f0697db2c98ba9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 452cbc36fd51ff0c37e9cc6a4e1bd84ca0ecccee9ba7bb34958c77a96fa7753dc1f02a6d34f4d4bc1e26753f3bf9dfc6c31d9ac4d64a8cd5ad69ea0e4f04a011
|
7
|
+
data.tar.gz: 54a6f8d64cb267b7906b5c375b09074dd3e6dc1acffa99d33b19335143f2ef29b94843b8f9965b1d3eb4c8453dc1dc362da03da50bca428838f497dd98996e80
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.7.2] - 2024-03-30
|
2
|
+
- update title and description in Rubygems
|
3
|
+
|
4
|
+
## [0.7.1] - 2024-03-19
|
5
|
+
|
6
|
+
- add csv as a dependency since Ruby 3.3 has removed it from the standard library
|
7
|
+
|
1
8
|
## [0.7.0] - 2024-01-18
|
2
9
|
|
3
10
|
- db:phantom_migrations displays the branch in which the phantion migration was run
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
actual_db_schema (0.7.
|
4
|
+
actual_db_schema (0.7.2)
|
5
5
|
activerecord (>= 6.0.0)
|
6
6
|
activesupport (>= 6.0.0)
|
7
|
+
csv
|
7
8
|
|
8
9
|
GEM
|
9
10
|
remote: https://rubygems.org/
|
@@ -92,6 +93,7 @@ GEM
|
|
92
93
|
concurrent-ruby (1.2.2)
|
93
94
|
connection_pool (2.4.1)
|
94
95
|
crass (1.0.6)
|
96
|
+
csv (3.3.0)
|
95
97
|
date (3.3.3)
|
96
98
|
debug (1.8.0)
|
97
99
|
irb (>= 1.5.0)
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Does switching between branches in your Rails app mess up the DB schema?
|
6
6
|
|
7
|
-
Keep the DB schema actual across branches in your Rails project. Just install `actual_db_schema` gem and run `db:migrate` in branches as usual. It automatically rolls back the *phantom migrations* (non-relevant to the current branch). No additional steps are needed.
|
7
|
+
Keep the DB schema actual across branches in your Rails project. Just install `actual_db_schema` gem and run `db:migrate` in branches as usual. It automatically rolls back the *phantom migrations* (non-relevant to the current branch). No additional steps are needed. It works with both `schema.rb` and `structure.sql`.
|
8
8
|
|
9
9
|
## Why ActualDbSchema
|
10
10
|
|
@@ -28,9 +28,9 @@ With `actual_db_schema` gem you don't need to care about that anymore. It saves
|
|
28
28
|
|
29
29
|
### How it solves the issue
|
30
30
|
|
31
|
-
This gem stores all run migrations with their code in the `tmp/
|
31
|
+
This gem stores all run migrations with their code in the `tmp/migrated` folder. Whenever you perform a schema dump, it rolls back the *phantom migrations*.
|
32
32
|
|
33
|
-
The *phantom migrations* list is the difference between the migrations you've executed (in the `tmp/
|
33
|
+
The *phantom migrations* list is the difference between the migrations you've executed (in the `tmp/migrated` folder) and the current ones (in the `db/migrate` folder).
|
34
34
|
|
35
35
|
Therefore, all you do is run rails `db:migrate` in your current branch. `actual_db_schema` will ensure the DB schema is up-to-date. You'll never have an inaccurate `schema.rb` file again.
|
36
36
|
|
@@ -63,7 +63,15 @@ The gem offers the following rake tasks that can be manually run according to yo
|
|
63
63
|
|
64
64
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
65
65
|
|
66
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
66
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
67
|
+
|
68
|
+
To release a new version do the following in the order:
|
69
|
+
|
70
|
+
- update the version number in `version.rb`;
|
71
|
+
- update the CHANGELOG;
|
72
|
+
- `bundle install` to update `Gemfile.lock`;
|
73
|
+
- make the commit and push;
|
74
|
+
- run `bundle exec rake release`. This will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
67
75
|
|
68
76
|
## Contributing
|
69
77
|
|
data/actual_db_schema.gemspec
CHANGED
@@ -8,20 +8,19 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.authors = ["Andrei Kaleshka"]
|
9
9
|
spec.email = ["ka8725@gmail.com"]
|
10
10
|
|
11
|
-
spec.summary = "Keep your DB
|
11
|
+
spec.summary = "Keep your DB and schema.rb consistent in dev branches."
|
12
12
|
spec.description = <<~DESC
|
13
|
-
|
14
|
-
|
15
|
-
Install this gem and forget about that issue by running the standard rake db:migrate.
|
13
|
+
Wipe out inconsistent DB and schema.rb when switching branches.
|
14
|
+
Just install this gem and use the standard rake db:migrate command.
|
16
15
|
DESC
|
17
|
-
spec.homepage = "https://
|
16
|
+
spec.homepage = "https://blog.widefix.com/actual-db-schema/"
|
18
17
|
spec.license = "MIT"
|
19
18
|
spec.required_ruby_version = ">= 2.7.0"
|
20
19
|
|
21
20
|
# spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
|
22
21
|
|
23
22
|
spec.metadata["homepage_uri"] = spec.homepage
|
24
|
-
spec.metadata["source_code_uri"] =
|
23
|
+
spec.metadata["source_code_uri"] = "https://github.com/widefix/actual_db_schema"
|
25
24
|
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
26
25
|
|
27
26
|
# Specify which files should be added to the gem when it is released.
|
@@ -38,6 +37,7 @@ Gem::Specification.new do |spec|
|
|
38
37
|
# Uncomment to register a new dependency of your gem
|
39
38
|
spec.add_runtime_dependency "activerecord", ">= 6.0.0"
|
40
39
|
spec.add_runtime_dependency "activesupport", ">= 6.0.0"
|
40
|
+
spec.add_runtime_dependency "csv"
|
41
41
|
|
42
42
|
spec.add_development_dependency "appraisal"
|
43
43
|
spec.add_development_dependency "debug"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actual_db_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrei Kaleshka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 6.0.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: csv
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: appraisal
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,9 +109,8 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
description: |
|
98
|
-
|
99
|
-
|
100
|
-
Install this gem and forget about that issue by running the standard rake db:migrate.
|
112
|
+
Wipe out inconsistent DB and schema.rb when switching branches.
|
113
|
+
Just install this gem and use the standard rake db:migrate command.
|
101
114
|
email:
|
102
115
|
- ka8725@gmail.com
|
103
116
|
executables: []
|
@@ -131,13 +144,13 @@ files:
|
|
131
144
|
- lib/railtie.rb
|
132
145
|
- lib/tasks/db.rake
|
133
146
|
- sig/actual_db_schema.rbs
|
134
|
-
homepage: https://
|
147
|
+
homepage: https://blog.widefix.com/actual-db-schema/
|
135
148
|
licenses:
|
136
149
|
- MIT
|
137
150
|
metadata:
|
138
|
-
homepage_uri: https://
|
151
|
+
homepage_uri: https://blog.widefix.com/actual-db-schema/
|
139
152
|
source_code_uri: https://github.com/widefix/actual_db_schema
|
140
|
-
changelog_uri: https://
|
153
|
+
changelog_uri: https://blog.widefix.com/actual-db-schema//blob/main/CHANGELOG.md
|
141
154
|
post_install_message:
|
142
155
|
rdoc_options: []
|
143
156
|
require_paths:
|
@@ -156,5 +169,5 @@ requirements: []
|
|
156
169
|
rubygems_version: 3.4.21
|
157
170
|
signing_key:
|
158
171
|
specification_version: 4
|
159
|
-
summary: Keep your DB
|
172
|
+
summary: Keep your DB and schema.rb consistent in dev branches.
|
160
173
|
test_files: []
|