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