Class: Penthouse::Tenants::OctopusSchemaTenant
- Inherits:
-
SchemaTenant
- Object
- BaseTenant
- SchemaTenant
- Penthouse::Tenants::OctopusSchemaTenant
- Defined in:
- lib/penthouse/tenants/octopus_schema_tenant.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from SchemaTenant
#default_schema, #persistent_schemas, #tenant_schema
Attributes inherited from BaseTenant
Instance Method Summary collapse
-
#call(shard: :master, &block) {|SchemaTenant| ... } ⇒ void
ensures we’re on the correct Octopus shard, then just updates the schema name with the tenant name.
-
#create ⇒ void
creates the tenant schema within the master shard.
-
#delete ⇒ void
drops the tenant schema within the master shard.
-
#exists? ⇒ Boolean
returns whether or not the schema exists.
Methods inherited from SchemaTenant
Methods included from Migratable
Methods inherited from BaseTenant
Constructor Details
This class inherits a constructor from Penthouse::Tenants::SchemaTenant
Instance Method Details
#call(shard: :master, &block) {|SchemaTenant| ... } ⇒ void
This method returns an undefined value.
ensures we’re on the correct Octopus shard, then just updates the schema name with the tenant name
23 24 25 26 27 |
# File 'lib/penthouse/tenants/octopus_schema_tenant.rb', line 23 def call(shard: :master, &block) Octopus.using(shard) do super(&block) end end |
#create ⇒ void
This method returns an undefined value.
creates the tenant schema within the master shard
32 33 34 |
# File 'lib/penthouse/tenants/octopus_schema_tenant.rb', line 32 def create(*) call { super } end |
#delete ⇒ void
This method returns an undefined value.
drops the tenant schema within the master shard
39 40 41 |
# File 'lib/penthouse/tenants/octopus_schema_tenant.rb', line 39 def delete(*) call { super } end |
#exists? ⇒ Boolean
returns whether or not the schema exists
46 47 48 |
# File 'lib/penthouse/tenants/octopus_schema_tenant.rb', line 46 def exists?(*) call { super } end |