Class: MenuRestItemsUsersCachedContentPages

Inherits:
ActiveRecord::Migration
  • Object
show all
Includes:
Goldberg::Migration
Defined in:
lib/six-updater-web/vendor/plugins/goldberg/db/migrate/002_menu_rest_items_users_cached_content_pages.rb

Class Method Summary collapse

Methods included from Goldberg::Migration

dump_bootstrap, dump_for_class, goldberg_classes, included, load_bootstrap, load_for_class

Class Method Details

.downObject



17
18
19
20
21
22
23
24
25
# File 'lib/six-updater-web/vendor/plugins/goldberg/db/migrate/002_menu_rest_items_users_cached_content_pages.rb', line 17

def self.down
  remove_column "#{prefix}content_pages", "content_cache"

  remove_column "#{prefix}users", "email"
  remove_column "#{prefix}users", "fullname"
  remove_column "#{prefix}users", "password_salt"

  remove_column "#{prefix}controller_actions", "url_to_use"
end

.upObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/six-updater-web/vendor/plugins/goldberg/db/migrate/002_menu_rest_items_users_cached_content_pages.rb', line 4

def self.up
  # Add URL to use for Actions, to better support REST
  add_column "#{prefix}controller_actions", "url_to_use", :string

  # Enhancements for Users
  add_column "#{prefix}users", "password_salt", :string
  add_column "#{prefix}users", "fullname", :string
  add_column "#{prefix}users", "email", :string

  # Add caching for ContentPages
  add_column "#{prefix}content_pages", "content_cache", :text
end