Sha256: f6cfb0d76f73d5c491e810f838ea0fcc538cd4f176d0c01a240b0cc74034f6fa

Contents?: true

Size: 729 Bytes

Versions: 6

Compression:

Stored size: 729 Bytes

Contents

class CreateEmailbutlerTables < ActiveRecord::Migration[7.0]
  def self.up
    enable_extension 'pgcrypto' unless extensions.include?('pgcrypto')
    enable_extension 'uuid-ossp' unless extensions.include?('uuid-ossp')

    create_table :emailbutler_messages do |t|
      t.uuid :uuid, null: false, default: ''
      t.string :mailer, null: false
      t.string :action, null: false
      t.jsonb :params, null: false, default: {}
      t.string :send_to, array: true
      t.integer :status, null: false, default: 0
      t.datetime :timestamp
      t.integer :lock_version
      t.timestamps
    end
    add_index :emailbutler_messages, :uuid, unique: true
  end

  def self.down
    drop_table :emailbutler_messages
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
emailbutler-0.5.5 db/migrate/20230510094545_create_emailbutler_tables.rb
emailbutler-0.5.4 db/migrate/20230510094545_create_emailbutler_tables.rb
emailbutler-0.5.3 db/migrate/20230510094545_create_emailbutler_tables.rb
emailbutler-0.5.2 db/migrate/20230510094545_create_emailbutler_tables.rb
emailbutler-0.3.0 db/migrate/20220916162720_create_emailbutler_tables.rb
emailbutler-0.2.3 db/migrate/20220916162720_create_emailbutler_tables.rb