Browse Source

Add icon_size column to subscriptions

master
Adrian Short 11 years ago
parent
commit
d4705e9bbf
2 changed files with 13 additions and 1 deletions
  1. +10
    -0
      db/migrate/20130417153542_add_icon_size_to_subscriptions.rb
  2. +3
    -1
      db/schema.rb

+ 10
- 0
db/migrate/20130417153542_add_icon_size_to_subscriptions.rb View File

@@ -0,0 +1,10 @@
class AddIconSizeToSubscriptions < ActiveRecord::Migration
def up
add_column :subscriptions, :icon_size, :integer, :default => 12
Subscription.all.each { |s| s.update_attribute :icon_size, 12 }
end

def down
remove_column :subscriptions, :icon_size
end
end

+ 3
- 1
db/schema.rb View File

@@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.


ActiveRecord::Schema.define(:version => 20130410153407) do
ActiveRecord::Schema.define(:version => 20130417153542) do


create_table "delayed_jobs", :force => true do |t| create_table "delayed_jobs", :force => true do |t|
t.integer "priority", :default => 0 t.integer "priority", :default => 0
@@ -38,6 +38,7 @@ ActiveRecord::Schema.define(:version => 20130410153407) do
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.datetime "last_fetched" t.datetime "last_fetched"
t.string "favicon_url"
end end


create_table "layers", :force => true do |t| create_table "layers", :force => true do |t|
@@ -67,6 +68,7 @@ ActiveRecord::Schema.define(:version => 20130410153407) do
t.datetime "created_at" t.datetime "created_at"
t.datetime "updated_at" t.datetime "updated_at"
t.string "icon_url" t.string "icon_url"
t.integer "icon_size", :default => 12
end end


add_index "subscriptions", ["feed_id", "layer_id"], :name => "index_feeds_layers_on_feed_id_and_layer_id", :unique => true add_index "subscriptions", ["feed_id", "layer_id"], :name => "index_feeds_layers_on_feed_id_and_layer_id", :unique => true


Loading…
Cancel
Save