planetscale_rails 0.1.2 → 0.1.3

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: 7ed08836cfb00024906d50ede95a0237ee6fbce02ab89d138a812e939d1056c5
4
- data.tar.gz: 8080c0fe4eaf9d00d8e851dfe087a55cdf4dbf741228b29aea1ebbb92706f463
3
+ metadata.gz: f38096cc4396fecb1efbfba9ea4bfe7f72b39c915990fb7036f8ab4ef1a1aaa2
4
+ data.tar.gz: c609fbd59e9caf5682fddd1367533c3a99a80fe1bbd7c93591da6047f8ff22cf
5
5
  SHA512:
6
- metadata.gz: d89b0dc3b6d77bcd9663b10706bcb82021dc15b6f15cb1b3446008eef71a22abd3af20f07b58a5b3cb4c590e2ca65c1a202e2cf364f3bd1f2e4b97fcd779432a
7
- data.tar.gz: 13ac640ae92257eca79aa2d7462280f1361c4e275c9b7c490da8bba9ca4f15c58f32cf1738e15bbe59d23643bd301b6744c76232f6c5c7c246a8995444851659
6
+ metadata.gz: b4e11cfda4e78884bd30fe672b06517320f74a36244d96c61688d5d339478c99cff30050e31f049578fa27e5358692697b9019d0032108223d4c6dbb2e9a7c97
7
+ data.tar.gz: d236ee3a8a70d8e37be836e344c8e1a565c99149d7f301760810c8efc03ebea30e1cdb1e78458fc788b9fd9f41b1fe98fdaa4f9fc9e29cad1fb64636bf6d579f
data/README.md CHANGED
@@ -12,10 +12,10 @@ The rake tasks allow you to use local MySQL for development. When you're ready t
12
12
  against it. See [usage](#usage) for details.
13
13
 
14
14
  ```
15
- rake psdb:migrate # Migrate the database for current environment
16
- rake psdb:rollback # Rollback primary database for current environment
17
- rake psdb:schema:load # Load the current schema into the database
18
- rake psdb:setup_pscale # Setup a proxy to connect to PlanetScale
15
+ rake psdb:migrate # Migrate the database for current environment
16
+ rake psdb:rollback # Rollback primary database for current environment
17
+ rake psdb:schema:load # Load the current schema into the database
18
+ rake psdb:setup_pscale # Setup a proxy to connect to PlanetScale
19
19
  ```
20
20
 
21
21
  ## Installation
@@ -28,19 +28,23 @@ group :development do
28
28
  end
29
29
  ```
30
30
 
31
- And then execute:
31
+ And then execute in your terminal:
32
32
 
33
- $ bundle install
33
+ ```
34
+ bundle install
35
+ ```
34
36
 
35
37
  ## Usage
36
38
 
37
39
  First, make sure you have the [`pscale` CLI installed](https://github.com/planetscale/cli#installation). You'll use `pscale` to create a new branch.
38
40
 
39
- 1. `pscale branch switch my-new-branch-name --database my-db-name --create`
40
-
41
- Run this locally, it will create a new branch off of `main`. The `switch` command will update a `.pscale.yml` file to track
41
+ 1. Run this locally, it will create a new branch off of `main`. The `switch` command will update a `.pscale.yml` file to track
42
42
  that this is the branch you want to migrate.
43
43
 
44
+ ```
45
+ pscale branch switch my-new-branch-name --database my-db-name --create
46
+ ```
47
+
44
48
  **Tip:** In your database settings. Enable "Automatically copy migration data." Select "Rails/Phoenix" as the migration framework. This will auto copy your `schema_migrations` table between branches.
45
49
 
46
50
  2. Once your branch is ready, you can then use the `psdb` rake task to connect to your branch and run `db:migrate`.
@@ -46,7 +46,7 @@ namespace :psdb do
46
46
  database = ps_config["database"]
47
47
  branch = ps_config["branch"]
48
48
 
49
- raise "You must have `pscale` installed on your computer" unless command?("pscale").colorize(:red)
49
+ raise "You must have `pscale` installed on your computer".colorize(:red) unless command?("pscale")
50
50
  if branch.blank? || database.blank?
51
51
  raise "Your branch is not properly setup, please switch to a branch by using the CLI.".colorize(:red)
52
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlanetscaleRails
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
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.1.2
4
+ version: 0.1.3
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: 2023-03-10 00:00:00.000000000 Z
12
+ date: 2023-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colorize