planetscale_rails 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -0
- data/lib/planetscale_rails/tasks/psdb.rake +2 -2
- data/lib/planetscale_rails/version.rb +1 -1
- 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: 2b6092e8239253b330f4864fa3388c9826c326493d8d585a47e8bcb310e7dce2
|
4
|
+
data.tar.gz: b7457fdeb6ee47845266c63cd4baf13e80ee76746a121bf9644f3b5b9ad677c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f104e35e0864e821d6e885d9f0d5b7af5067c5bea40c69440b60c1fc3d7dea6ecd2bcf3aad11dae9a606ca1d7b8d649989bcd4633ec5f805ba68c90d7bbd5bfa
|
7
|
+
data.tar.gz: 20aba5b8f3f8b9c7f15c0a95bc0f18bbea1a371258e293d1264599e91e015d6a721cb874594c8372cad990f9552dff724810fdaaeb867b0b223b961f1afe39a1
|
data/README.md
CHANGED
@@ -35,6 +35,18 @@ bundle install
|
|
35
35
|
|
36
36
|
Make sure you have the [`pscale` CLI installed](https://github.com/planetscale/cli#installation).
|
37
37
|
|
38
|
+
### Disable schema dump
|
39
|
+
|
40
|
+
Add the following to your `config/application.rb`.
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
if ENV["DISABLE_SCHEMA_DUMP"]
|
44
|
+
config.active_record.dump_schema_after_migration = false
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
This will allow the gem to disable schema dumping after running `psdb:migrate`.
|
49
|
+
|
38
50
|
## Usage
|
39
51
|
|
40
52
|
1. Using pscale, create a new branch. This command will create a local `.pscale.yml` file. You should add it to your `.gitignore`.
|
@@ -85,8 +85,7 @@ namespace :psdb do
|
|
85
85
|
adapter = "trilogy"
|
86
86
|
end
|
87
87
|
|
88
|
-
|
89
|
-
url = "#{adapter}://#{username}:#{password}@#{host}:3306/#{database}?ssl_mode=VERIFY_IDENTITY&schema_dump="
|
88
|
+
url = "#{adapter}://#{username}:#{password}@#{host}:3306/#{database}?ssl_mode=VERIFY_IDENTITY"
|
90
89
|
|
91
90
|
# Check common CA paths for certs.
|
92
91
|
ssl_ca_path = %w[/etc/ssl/certs/ca-certificates.crt /etc/pki/tls/certs/ca-bundle.crt /etc/ssl/ca-bundle.pem /etc/ssl/cert.pem].find { |f| File.exist?(f) }
|
@@ -108,6 +107,7 @@ namespace :psdb do
|
|
108
107
|
desc "Create credentials for PlanetScale and sets them to ENV['PSCALE_DATABASE_URL']"
|
109
108
|
task "create_creds" => %i[environment check_ci] do
|
110
109
|
ENV["PSCALE_DATABASE_URL"] = create_connection_string
|
110
|
+
ENV["DISABLE_SCHEMA_DUMP"] = "true"
|
111
111
|
end
|
112
112
|
|
113
113
|
desc "Connects to the current PlanetScale branch and runs rails db:migrate"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: planetscale_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Coutermarsh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-01-
|
12
|
+
date: 2024-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|