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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/dynamic_migrations/postgres/server.rb +4 -0
- data/lib/dynamic_migrations/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: cd85087e52878be82f2733bc12a2949cff8cd25b5b52a6b0e820e760ad7d8ea0
|
4
|
+
data.tar.gz: a22b55bec2b78053ccca5541eeb55b33c78007d01f5af22997b8498a8631fbbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
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.
|
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-
|
11
|
+
date: 2023-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|