dynamic_migrations 1.1.0 → 1.1.1

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: ccf1d1bb6e3e6cd8ee50486a73c36113b6e3d1827d65cd3372100e2da7fc0fe7
4
- data.tar.gz: 1d5d496a2f8bc9632b2511eb90e52ed1be6018be25f7609f2119413ba18cfac9
3
+ metadata.gz: cd85087e52878be82f2733bc12a2949cff8cd25b5b52a6b0e820e760ad7d8ea0
4
+ data.tar.gz: a22b55bec2b78053ccca5541eeb55b33c78007d01f5af22997b8498a8631fbbb
5
5
  SHA512:
6
- metadata.gz: 05a7df93bf0b8a2f555a6e485fff7b9322f78c83e4b729fc1caf2103f409301330ab3eafd1e7e7675b6675a2ea5e9bde123ae3bd05b7e05a3169b72f1351a40b
7
- data.tar.gz: 5ef389f80d979b915f999883677d36228bb1d8ee37604e2e08b07eceec12af21bb808c085a05c83bcb42169405ef5fd1e98d3083b9462e16da29611cdf459a4c
6
+ metadata.gz: c5a4322f59ab8d3fd626136633f6a9e1faeab846fb3165257a216347d232a5ea44363e0d9b0fc4ebad8a128e05beb0a78e9cbefe6710d6312cd5d4326e976747
7
+ data.tar.gz: 387790fda8976ade419f384e70171e2a89c1392756d8aae4e5915230a90dcb27eaf1a256f241f55dc0296d31f67bee6c565528194bda0e97e0c849d18ea7e663
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.1](https://github.com/craigulliott/dynamic_migrations/compare/v1.1.0...v1.1.1) (2023-07-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * validating that new databases don't already exist and removing a debug print statement ([73bed2d](https://github.com/craigulliott/dynamic_migrations/commit/73bed2d6ab928c7a8f53b2aa17a188a77ed369e9))
9
+ * validating that new databases don't already exist and removing a debug print statement ([73bed2d](https://github.com/craigulliott/dynamic_migrations/commit/73bed2d6ab928c7a8f53b2aa17a188a77ed369e9))
10
+ * validating that new databases don't already exist and removing a debug print statement ([f4cfb1e](https://github.com/craigulliott/dynamic_migrations/commit/f4cfb1e81252ed967ad1a6d864d495c182ca908f))
11
+
3
12
  ## [1.1.0](https://github.com/craigulliott/dynamic_migrations/compare/v1.0.0...v1.1.0) (2023-07-10)
4
13
 
5
14
 
@@ -4,6 +4,9 @@ module DynamicMigrations
4
4
  module Postgres
5
5
  # This class represents a postgres server. A server can contain many databases.
6
6
  class Server
7
+ class DatabaseAlreadyExistsError < StandardError
8
+ end
9
+
7
10
  attr_reader :host, :port, :username, :password
8
11
 
9
12
  # initialize a new object to represent a postgres server
@@ -17,6 +20,7 @@ module DynamicMigrations
17
20
 
18
21
  def add_database database_name
19
22
  raise ExpectedSymbolError, database_name unless database_name.is_a? Symbol
23
+ raise DatabaseAlreadyExistsError, "database `#{database_name}` already exists" if @databases.key? database_name
20
24
  @databases[database_name] = Database.new self, database_name
21
25
  end
22
26
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DynamicMigrations
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynamic_migrations
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Craig Ulliott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-10 00:00:00.000000000 Z
11
+ date: 2023-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg