Sha256: 08cc2badfee1e56d4378f2ac4e8c197453119e43fb0b642698d5f66d39d1eb46

Contents?: true

Size: 372 Bytes

Versions: 25

Compression:

Stored size: 372 Bytes

Contents

class AddPromiseTypeEnum < ActiveRecord::Migration[4.2]
  def up
    values = Marty::EnumPromiseType::VALUES
    str_values = values.map {|v| ActiveRecord::Base.connection.quote v}.join ','
    execute <<-SQL
       CREATE TYPE marty_promise_types AS ENUM (#{str_values})
    SQL
  end

  def down
    execute <<-SQL
       DROP TYPE marty_promise_types
    SQL
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
marty-8.2.0 db/migrate/502_add_promise_type_enum.rb
marty-8.0.0 db/migrate/502_add_promise_type_enum.rb
marty-6.1.0 db/migrate/502_add_promise_type_enum.rb
marty-5.2.0 db/migrate/502_add_promise_type_enum.rb
marty-5.1.4 db/migrate/502_add_promise_type_enum.rb
marty-5.1.3 db/migrate/502_add_promise_type_enum.rb
marty-5.1.2 db/migrate/502_add_promise_type_enum.rb
marty-5.1.1 db/migrate/502_add_promise_type_enum.rb
marty-5.1.0 db/migrate/502_add_promise_type_enum.rb
marty-3.1.0 db/migrate/502_add_promise_type_enum.rb
marty-3.0.1 db/migrate/502_add_promise_type_enum.rb
marty-4.0.0.rc2 db/migrate/502_add_promise_type_enum.rb
marty-3.0.0 db/migrate/502_add_promise_type_enum.rb
marty-2.9.3 db/migrate/502_add_promise_type_enum.rb
marty-2.9.2 db/migrate/502_add_promise_type_enum.rb
marty-2.9.1 db/migrate/502_add_promise_type_enum.rb
marty-2.8.0 db/migrate/502_add_promise_type_enum.rb
marty-2.7.3 db/migrate/502_add_promise_type_enum.rb
marty-2.7.2 db/migrate/502_add_promise_type_enum.rb
marty-2.7.1 db/migrate/502_add_promise_type_enum.rb