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