planetscale_rails 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1c96f1384c6bcee4a33e81124384b80ce8cff99823b1d5fc77ad926967087a4
4
- data.tar.gz: '0880e54628a3c0b22a98f1883dce8fd6ac4aee57315fffab014d07c9da66e014'
3
+ metadata.gz: 2b6092e8239253b330f4864fa3388c9826c326493d8d585a47e8bcb310e7dce2
4
+ data.tar.gz: b7457fdeb6ee47845266c63cd4baf13e80ee76746a121bf9644f3b5b9ad677c1
5
5
  SHA512:
6
- metadata.gz: c4fabd32053c4456bdd002729f21fd9548905a7fc8472a97dd23fb0f1aed9df5798381cae839fd4495b0acacdc97170c47b92312cc38c78a0a31df3911097765
7
- data.tar.gz: 2f50ab3be8305f60c81c11d625f470775678bf311d103c1301d982fb1aa5f6c39ac8b176f21bd8eb4ea511098f22e8a77a3b09cdb459130ea60bdddcee37ae57
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
- # Setting schema_dump to nil is intentional. It prevents Rails from creating a dump after running migrations.
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"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlanetscaleRails
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
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.1
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 00:00:00.000000000 Z
12
+ date: 2024-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize