dynamodb-migration 0.2.0 → 0.3.0
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/README.md +22 -7
- data/dynamodb-migration.gemspec +1 -0
- data/lib/dynamodb/migration/execute.rb +2 -2
- data/lib/dynamodb/migration/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74e3e254ecd09009114274031548f14690803466
|
4
|
+
data.tar.gz: abfbffb5f2a6612f483e5e7958e3fa36ac70e5a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0631860e3d249170eceb2b7b295dbda23986f7006b43a11e1770011306d0a67e493fc36b5cea13f0c9d0ce35471d5f4b8ac3d6f8729686bb55f1aedd62de17c
|
7
|
+
data.tar.gz: d7108c070a794dae4769ad5ad8a463a5b99a572834060b9ca8d8c8cd97c94d0c32c61f0855fce7e56186b2b4b553b2a2d67cdf85ecb7db57b00ea698c081299b
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
|
1
|
+
[](https://badge.fury.io/rb/dynamodb-client)
|
2
|
+
# DynamoDB::Migration
|
2
3
|
|
3
|
-
Allows for the creation of simple DynamoDB commands that will be executed only
|
4
|
+
Allows for the creation of simple DynamoDB commands that will be executed only
|
5
|
+
once against a DynamoDB database to allow you to "migrate" the schema of the
|
6
|
+
database over time. This is a simple implementation for DynamoDB, similar to
|
7
|
+
tools such as FlywayDB and Active Record Migrations.
|
4
8
|
|
5
9
|
## Installation
|
6
10
|
|
@@ -26,7 +30,7 @@ In a rake task or in your applications start up, simply add:
|
|
26
30
|
require 'dynamodb/migration'
|
27
31
|
|
28
32
|
options = {
|
29
|
-
client:
|
33
|
+
client: dynamodb_client, # an Aws::DynamoDB::Client instance
|
30
34
|
path: '~/my_project/migrations' # the full path to the folder where your migration classes will live
|
31
35
|
}
|
32
36
|
DynamoDB::Migration.run_all_migrations(options)
|
@@ -94,16 +98,27 @@ which it creates and maintains internally.
|
|
94
98
|
|
95
99
|
## Development
|
96
100
|
|
97
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
101
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
102
|
+
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
103
|
+
prompt that will allow you to experiment.
|
98
104
|
|
99
|
-
To install this gem onto your local machine, run `bundle exec rake install`. To
|
105
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To
|
106
|
+
release a new version, update the version number in `version.rb`, and then run
|
107
|
+
`bundle exec rake release`, which will create a git tag for the version, push
|
108
|
+
git commits and tags, and push the `.gem` file to
|
109
|
+
[rubygems.org](https://rubygems.org).
|
100
110
|
|
101
111
|
## Contributing
|
102
112
|
|
103
|
-
Bug reports and pull requests are welcome on GitHub at
|
113
|
+
Bug reports and pull requests are welcome on GitHub at
|
114
|
+
https://github.com/henrylawson/dynamodb-migration. This project is intended to
|
115
|
+
be a safe, welcoming space for collaboration, and contributors are expected to
|
116
|
+
adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
|
117
|
+
conduct.
|
104
118
|
|
105
119
|
|
106
120
|
## License
|
107
121
|
|
108
|
-
The gem is available as open source under the terms of the [MIT
|
122
|
+
The gem is available as open source under the terms of the [MIT
|
123
|
+
License](http://opensource.org/licenses/MIT).
|
109
124
|
|
data/dynamodb-migration.gemspec
CHANGED
@@ -81,8 +81,8 @@ module DynamoDB
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def migration_classes
|
84
|
-
ObjectSpace.each_object(Migration.singleton_class)
|
85
|
-
.reject { |c| c == Migration }
|
84
|
+
ObjectSpace.each_object(DynamoDB::Migration::Unit.singleton_class)
|
85
|
+
.reject { |c| c == DynamoDB::Migration::Unit }
|
86
86
|
end
|
87
87
|
|
88
88
|
def migration_executed?(clazz)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamodb-migration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henry Lawson
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: dynamodb-client
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.2.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.2.0
|
69
83
|
description: Allows for the creation of simple DynamoDB commands that will be executed
|
70
84
|
only once against a DynamoDB database to allow you to "migrate" the schema of the
|
71
85
|
database over time. This is a simple implementation for DynamoDB, similar to tools
|