Module: Torque::PostgreSQL::Adapter::Definition
- Defined in:
- lib/torque/postgresql/adapter/schema_definitions.rb
Overview
Add exclusive support for versioned commands when importing from schema dump. This ensures that such methods are not available in regular migrations.
Instance Method Summary collapse
- #create_function(name, version:, dir: pool.migrations_paths) ⇒ Object
- #create_type(name, version:, dir: pool.migrations_paths) ⇒ Object
- #create_view(name, version:, dir: pool.migrations_paths) ⇒ Object
Instance Method Details
#create_function(name, version:, dir: pool.migrations_paths) ⇒ Object
57 58 59 60 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 57 def create_function(name, version:, dir: pool.migrations_paths) return super unless VersionedCommands.valid_type?(:function) execute VersionedCommands.fetch_command(dir, :function, name, version) end |
#create_type(name, version:, dir: pool.migrations_paths) ⇒ Object
62 63 64 65 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 62 def create_type(name, version:, dir: pool.migrations_paths) return super unless VersionedCommands.valid_type?(:type) execute VersionedCommands.fetch_command(dir, :type, name, version) end |
#create_view(name, version:, dir: pool.migrations_paths) ⇒ Object
67 68 69 70 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 67 def create_view(name, version:, dir: pool.migrations_paths) return super unless VersionedCommands.valid_type?(:view) execute VersionedCommands.fetch_command(dir, :view, name, version) end |