class CreateDashboardSettings

Public Instance Methods

down() click to toggle source
# File lib/generators/templates/create_taxweb_widgets_users.rb, line 14
def down
  drop_table :dashboard_settings if table_exists? :dashboard_settings
end
up() click to toggle source
# File lib/generators/templates/create_taxweb_widgets_users.rb, line 3
def up
  unless table_exists?(:dashboard_settings)
    create_table :dashboard_settings do |t|
      t.references :user, index: true, foreign_key: false
      t.string :widget
      t.string :action
      t.index [:widget, :action]
    end
  end
end