Sha256: 050af2131672df6c18f7691090227b2634388554e6442fe05a36e5f156954d65
Contents?: true
Size: 398 Bytes
Versions: 21
Compression:
Stored size: 398 Bytes
Contents
class AddThreeStateBooleanType < ActiveRecord::Migration[5.2] def up end def up execute <<-SQL DO $$ BEGIN IF NOT EXISTS (SELECT 1 FROM pg_type WHERE typname = 'three_state') THEN CREATE TYPE three_state AS ENUM ('Y', 'N', 'U'); END IF; END $$; SQL end def down execute "DROP TYPE IF EXISTS three_state;" end end
Version data entries
21 entries across 21 versions & 1 rubygems