pgdice 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +12 -2
- data/lib/pgdice/approved_tables.rb +1 -1
- data/lib/pgdice/version.rb +1 -1
- data/lib/pgdice.rb +1 -0
- 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: baa3b75796eec26ca750d8ddbac02e65a950547e7a7c0e5ecae153df99c4d848
|
4
|
+
data.tar.gz: 38925c051239b2d766a32349d574ff588ace9dc593af8e0b4750089cf189ceba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 945a4449998d4ae78dbf13569e60e65d691facb01f1cbe100cdc989af1654453fa74366ab2db8b351b82948aa3219d13779ac22134bfe21b29ffabfa02f04089
|
7
|
+
data.tar.gz: 3e2fd18360da4861befd6132a75574ddbba1fe6e38ccac5a743a913c2373e08671015bf5bf9193988d190186f643c1b7bd377366adae8fa8a25ace0510006a5a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
|
6
|
+
## [v0.3.1] : 2018-10-22
|
7
|
+
### Changes
|
8
|
+
- Bump up `approved_tables` to `PgDice` module.
|
9
|
+
|
5
10
|
## [v0.3.0] : 2018-10-21
|
6
11
|
### Changes
|
7
12
|
- Delegate methods from the management classes onto the `PgDice` module itself.
|
data/README.md
CHANGED
@@ -217,7 +217,7 @@ _Dropping tables is irreversible! Do this at your own risk!!_
|
|
217
217
|
If you want to drop old tables (after backing them up of course) you can run:
|
218
218
|
|
219
219
|
```ruby
|
220
|
-
PgDice.drop_old_partitions(
|
220
|
+
PgDice.drop_old_partitions('comments')
|
221
221
|
```
|
222
222
|
|
223
223
|
#### Notes on `drop_old_partitions`
|
@@ -243,6 +243,16 @@ An [InsufficientTablesError](lib/pgdice.rb) will be raised if any conditions are
|
|
243
243
|
This will check that there are 7 future tables from now and that there are 90 past tables
|
244
244
|
per our configuration above.
|
245
245
|
|
246
|
+
## Listing approved tables
|
247
|
+
|
248
|
+
Sometimes you might need to know the tables configured for `PgDice`. To list the configured tables
|
249
|
+
you can run:
|
250
|
+
```ruby
|
251
|
+
PgDice.approved_tables
|
252
|
+
```
|
253
|
+
|
254
|
+
The [ApprovedTables](lib/pgdice/approved_tables.rb) object responds to the most common enumerable methods.
|
255
|
+
|
246
256
|
|
247
257
|
# FAQ
|
248
258
|
|
@@ -259,7 +269,7 @@ per our configuration above.
|
|
259
269
|
end
|
260
270
|
```
|
261
271
|
|
262
|
-
1. I'm seeing off-by-one errors for my `
|
272
|
+
1. I'm seeing off-by-one errors for my `assert_tables` calls?
|
263
273
|
- You should make sure your database is configured to use `UTC`.
|
264
274
|
[https://www.postgresql.org/docs/10/datatype-datetime.html](https://www.postgresql.org/docs/10/datatype-datetime.html)
|
265
275
|
|
data/lib/pgdice/version.rb
CHANGED
data/lib/pgdice.rb
CHANGED
@@ -55,6 +55,7 @@ module PgDice
|
|
55
55
|
:list_droppable_partitions, :list_droppable_partitions_by_batch_size
|
56
56
|
def_delegators :partition_helper, :partition_table, :undo_partitioning, :undo_partitioning!
|
57
57
|
def_delegators :validation, :assert_tables
|
58
|
+
def_delegators :configuration, :approved_tables
|
58
59
|
|
59
60
|
def partition_manager
|
60
61
|
raise PgDice::NotConfiguredError, 'partition_manager' unless configuration
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgdice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Newell
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|