Class: SandthornDriverSequel2::Migration
- Inherits:
-
Object
- Object
- SandthornDriverSequel2::Migration
- Includes:
- EventStoreContext
- Defined in:
- lib/sandthorn_driver_sequel_2/migration.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#driver ⇒ Object
readonly
Returns the value of attribute driver.
Instance Method Summary collapse
-
#initialize(url: nil, context: nil) ⇒ Migration
constructor
A new instance of Migration.
- #migrate! ⇒ Object
Methods included from EventStoreContext
#events_table_name, #snapshots_table_name, #with_context_if_exists
Constructor Details
#initialize(url: nil, context: nil) ⇒ Migration
Returns a new instance of Migration.
6 7 8 9 |
# File 'lib/sandthorn_driver_sequel_2/migration.rb', line 6 def initialize url: nil, context: nil @driver = SequelDriver.new url: url @context = context end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
5 6 7 |
# File 'lib/sandthorn_driver_sequel_2/migration.rb', line 5 def context @context end |
#driver ⇒ Object (readonly)
Returns the value of attribute driver.
5 6 7 |
# File 'lib/sandthorn_driver_sequel_2/migration.rb', line 5 def driver @driver end |
Instance Method Details
#migrate! ⇒ Object
10 11 12 13 14 |
# File 'lib/sandthorn_driver_sequel_2/migration.rb', line 10 def migrate! ensure_migration_table! events snapshots end |