Module: Sequel::SchemaSharding::Extensions::MigrationsExt

Included in:
Database
Defined in:
lib/sequel/schema-sharding/extensions/migrations_ext.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



8
9
10
11
12
# File 'lib/sequel/schema-sharding/extensions/migrations_ext.rb', line 8

def self.included(base)
  base.class_eval do
    attr_accessor :migration_current_schema
  end
end

Instance Method Details

#migration_schema_for_table(table) ⇒ Object



14
15
16
# File 'lib/sequel/schema-sharding/extensions/migrations_ext.rb', line 14

def migration_schema_for_table(table)
  :"#{migration_current_schema}__#{table}"
end