Sha256: fff5381ca490847a5a35429f5f77d344ddca2f6999340ba75950982dac925bd6

Contents?: true

Size: 425 Bytes

Versions: 15

Compression:

Stored size: 425 Bytes

Contents

class CreateMartyNotificationsEventTypes < ActiveRecord::Migration[4.2]
  def up
    values = ::Marty::Notifications::EventType.values
    str_values = values.map {|v| ActiveRecord::Base.connection.quote v}.join ','

    execute <<-SQL
       CREATE TYPE marty_notifications_event_types AS ENUM (#{str_values});
    SQL
  end

  def down
    execute <<-SQL
       DROP TYPE marty_notifications_event_types;
    SQL
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
marty-14.3.0 db/migrate/519_create_marty_notifications_event_types.rb
marty-14.0.0 db/migrate/519_create_marty_notifications_event_types.rb
marty-13.0.2 db/migrate/519_create_marty_notifications_event_types.rb
marty-11.0.0 db/migrate/519_create_marty_notifications_event_types.rb
marty-10.0.3 db/migrate/519_create_marty_notifications_event_types.rb
marty-10.0.2 db/migrate/519_create_marty_notifications_event_types.rb
marty-10.0.0 db/migrate/519_create_marty_notifications_event_types.rb
marty-9.5.1 db/migrate/519_create_marty_notifications_event_types.rb
marty-9.5.0 db/migrate/519_create_marty_notifications_event_types.rb
marty-9.3.3 db/migrate/519_create_marty_notifications_event_types.rb
marty-9.3.2 db/migrate/519_create_marty_notifications_event_types.rb
marty-9.3.0 db/migrate/519_create_marty_notifications_event_types.rb
marty-8.5.0 db/migrate/519_create_marty_notifications_event_types.rb
marty-8.4.1 db/migrate/519_create_marty_notifications_event_types.rb
marty-8.3.1 db/migrate/519_create_marty_notifications_event_types.rb