Module: ColdStorage::InternalSchema
- Defined in:
- lib/cold_storage/internal_schema.rb
Overview
The gem's own tables inside the archive database. They are created on demand: the archive database needs no migrations of its own.
Constant Summary collapse
- RUNS_TABLE =
'cold_storage_runs'- METADATA_TABLE =
'cold_storage_metadata'
Class Method Summary collapse
Class Method Details
.ensure! ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/cold_storage/internal_schema.rb', line 11 def ensure! ArchiveRecord.with_archive_connection do |connection| create_runs_table(connection) (connection) end true end |
.ready? ⇒ Boolean
19 20 21 22 23 |
# File 'lib/cold_storage/internal_schema.rb', line 19 def ready? ArchiveRecord.with_archive_connection do |connection| connection.table_exists?(RUNS_TABLE) && connection.table_exists?(METADATA_TABLE) end end |