actual_db_schema 0.8.4 → 0.8.6
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/lib/actual_db_schema/git.rb +2 -1
- data/lib/actual_db_schema/git_hooks.rb +0 -7
- data/lib/actual_db_schema/version.rb +1 -1
- data/lib/generators/actual_db_schema/templates/actual_db_schema.rb +3 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b9b0ce8fc7b1dbf1e0af8af4d06cdb13c60a9b36499b2de11b3d2dd320833f2
|
4
|
+
data.tar.gz: bcb1f6e85b9fea8dcac89535fe4118edc9ced43f5ea57c3878d24d3b7b1786d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caa882430fcf07bcdd6c60a8653b0792587c627b99a93843599e9cb986bba53d644875650e825ddeb73b3c168d5831728cebb5e5ef276d077663da9f9c2bcdf9
|
7
|
+
data.tar.gz: f88c0acf54bba3ed626e380fa64a264573afc5ee2f1489ff6a3d3682ce2fd623d1b6b88917771811455a1e98e495b8252043cf6832044f86ccbb8da19d3d4f6e
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
## 0.8.6 - 2025-05-21
|
2
|
+
- Fix gem installtion with git hooks
|
3
|
+
- Update README
|
4
|
+
|
5
|
+
## 0.8.5 - 2025-04-10
|
6
|
+
|
7
|
+
- Fix the gem working on projects without git
|
8
|
+
|
1
9
|
## [0.8.4] - 2025-03-20
|
2
10
|
|
3
11
|
- Fix initializer file that can break other bundle groups that development
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
actual_db_schema (0.8.
|
4
|
+
actual_db_schema (0.8.6)
|
5
5
|
activerecord
|
6
6
|
activesupport
|
7
7
|
ast
|
@@ -96,7 +96,7 @@ GEM
|
|
96
96
|
concurrent-ruby (1.2.2)
|
97
97
|
connection_pool (2.4.1)
|
98
98
|
crass (1.0.6)
|
99
|
-
csv (3.3.
|
99
|
+
csv (3.3.4)
|
100
100
|
date (3.3.3)
|
101
101
|
debug (1.8.0)
|
102
102
|
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
|
7
|
+
Keep the DB schema current 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
|
|
data/lib/actual_db_schema/git.rb
CHANGED
@@ -63,7 +63,6 @@ module ActualDbSchema
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def install_post_checkout_hook
|
66
|
-
return unless git_hooks_enabled?
|
67
66
|
return unless hooks_directory_present?
|
68
67
|
|
69
68
|
if File.exist?(hook_path)
|
@@ -87,12 +86,6 @@ module ActualDbSchema
|
|
87
86
|
@hook_path ||= hooks_dir.join("post-checkout")
|
88
87
|
end
|
89
88
|
|
90
|
-
def git_hooks_enabled?
|
91
|
-
return true if ActualDbSchema.config[:git_hooks_enabled]
|
92
|
-
|
93
|
-
puts colorize("[ActualDbSchema] Git hooks are disabled in configuration. Skipping installation.", :gray)
|
94
|
-
end
|
95
|
-
|
96
89
|
def hooks_directory_present?
|
97
90
|
return true if Dir.exist?(hooks_dir)
|
98
91
|
|
@@ -15,9 +15,10 @@ if defined?(ActualDbSchema)
|
|
15
15
|
# Enable the UI for managing migrations.
|
16
16
|
config.ui_enabled = Rails.env.development? || ENV["ACTUAL_DB_SCHEMA_UI_ENABLED"].present?
|
17
17
|
|
18
|
-
# Enable automatic phantom migration rollback on branch switch
|
18
|
+
# Enable automatic phantom migration rollback on branch switch.
|
19
19
|
# config.git_hooks_enabled = true
|
20
|
-
|
20
|
+
git_hook_enabled_env = ENV["ACTUAL_DB_SCHEMA_GIT_HOOKS_ENABLED"]
|
21
|
+
config.git_hooks_enabled = git_hook_enabled_env.nil? ? true : git_hook_enabled_env.present?
|
21
22
|
|
22
23
|
# If your application leverages multiple schemas for multi-tenancy, define the active schemas.
|
23
24
|
# config.multi_tenant_schemas = -> { ["public", "tenant1", "tenant2"] }
|
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.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrei Kaleshka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|