Explorar el Código

Add icon_size column to subscriptions

master
Adrian Short hace 11 años
padre
commit
d4705e9bbf
Se han modificado 2 ficheros con 13 adiciones y 1 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -11,7 +11,7 @@
#
# 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|
t.integer "priority", :default => 0
@@ -38,6 +38,7 @@ ActiveRecord::Schema.define(:version => 20130410153407) do
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "last_fetched"
t.string "favicon_url"
end

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

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


Cargando…
Cancelar
Guardar