Sha256: 77954d5a256b12f48b20f55b83a90ff0cd26fc66d8e8ef4f01c7164f2aa902ce

Contents?: true

Size: 991 Bytes

Versions: 8

Compression:

Stored size: 991 Bytes

Contents

class <%= migration_class_name %> < ActiveRecord::Migration
  def self.up
    create_table :email_templates do |t|
      t.timestamps
      t.string :from_email
      t.string :from_name
      t.string :bcc
      t.string :reply_to
      t.string :body
      t.string :template_type
      t.boolean :send_via_mandrill, :default => false, :null => false
      t.boolean :send_via_gmail, :default => false, :null => false
      t.integer :email_template_type_id
    end

    create_table :email_template_types do |t|
      t.string :type
      t.boolean :critical, :default => false, :null => false
    end

    create_table :email_template_types_users do |t|
      t.integer :email_template_id
      t.integer :user_id
    end

    add_index :email_tt_users, [:email_template_id, :user_id]
    add_index :users_email_tt, [:user_id, :email_template_id]
  end

  def down
    drop_table :email_templates
    drop_table :email_templates_type
    drop_table :email_template_types_users
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
no_notifier_needed-2.4.5 lib/generators/no_notifier_needed/templates/install.rb
no_notifier_needed-2.4.4 lib/generators/no_notifier_needed/templates/install.rb
no_notifier_needed-2.4.3 lib/generators/no_notifier_needed/templates/install.rb
no_notifier_needed-2.4.2 lib/generators/no_notifier_needed/templates/install.rb
no_notifier_needed-2.4.1 lib/generators/no_notifier_needed/templates/install.rb
no_notifier_needed-2.4.0 lib/generators/no_notifier_needed/templates/install.rb
no_notifier_needed-2.3.8 lib/generators/no_notifier_needed/templates/install.rb
no_notifier_needed-2.3.7 lib/generators/no_notifier_needed/templates/install.rb