Sha256: fd471c4add7059636b5f83b746d4919eb78ed35446d284a839c572f2bdb35c1e

Contents?: true

Size: 707 Bytes

Versions: 13

Compression:

Stored size: 707 Bytes

Contents

class APICallModelMigration < Migration
  def self.up(site)
    site.records.create_model :api_calls do |api_calls|
      add_field :name, :string
      add_field :http_method, :string
      add_field :domain, :string
      add_field :port, :integer, default: 80
      add_field :path, :string
      add_field :username, :string
      add_field :password, :string
      add_field :authentication, :enum, options: %w{basic digest}
      add_field :mime_type, :string, default: 'json'
      add_field :body, :text
      add_field :body_layout, :string
      add_field :function, :string
      api_calls.record_class_name = 'APICall'
    end
  end
  
  def self.down(site)
    site.api_calls.destroy
  end
end

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
yodel-0.0.7 lib/yodel/models/migrations/12_api_call_model.rb
yodel_production_environment-0.0.7 lib/migrations/yodel/12_api_call_model.rb
yodel_development_environment-0.0.7 lib/migrations/yodel/12_api_call_model.rb
yodel_production_environment-0.0.4 lib/migrations/yodel/12_api_call_model.rb
yodel_development_environment-0.0.4 lib/migrations/yodel/12_api_call_model.rb
yodel-0.0.4 lib/yodel/models/migrations/12_api_call_model.rb
yodel-0.0.3 lib/yodel/models/migrations/12_api_call_model.rb
yodel_production_environment-0.0.2 lib/migrations/yodel/12_api_call_model.rb
yodel_development_environment-0.0.2 lib/migrations/yodel/12_api_call_model.rb
yodel-0.0.2 lib/yodel/models/migrations/12_api_call_model.rb
yodel-0.0.1 lib/yodel/models/migrations/12_api_call_model.rb
yodel_development_environment-0.0.1 lib/migrations/yodel/12_api_call_model.rb
yodel_production_environment-0.0.1 lib/migrations/yodel/12_api_call_model.rb