Selaa lähdekoodia

Change feeds.last_fetched and posts.published to datetime

master
Adrian Short 12 vuotta sitten
vanhempi
commit
2dc6636d60
3 muutettua tiedostoa jossa 25 lisäystä ja 3 poistoa
  1. +11
    -0
      db/migrate/20130222123833_feeds_change_last_fetched_to_datetime.rb
  2. +11
    -0
      db/migrate/20130222125833_post_published_change_to_datetime.rb
  3. +3
    -3
      db/schema.rb

+ 11
- 0
db/migrate/20130222123833_feeds_change_last_fetched_to_datetime.rb Näytä tiedosto

@@ -0,0 +1,11 @@
class FeedsChangeLastFetchedToDatetime < ActiveRecord::Migration
def up
remove_column :feeds, :last_fetched
add_column :feeds, :last_fetched, :datetime
end

def down
remove_column :feeds, :last_fetched
add_column :feeds, :last_fetched, :time
end
end

+ 11
- 0
db/migrate/20130222125833_post_published_change_to_datetime.rb Näytä tiedosto

@@ -0,0 +1,11 @@
class PostPublishedChangeToDatetime < ActiveRecord::Migration
def up
remove_column :posts, :published
add_column :posts, :published, :datetime
end

def down
remove_column :posts, :published
add_column :posts, :published, :time
end
end

+ 3
- 3
db/schema.rb Näytä tiedosto

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

ActiveRecord::Schema.define(:version => 20130222123224) do
ActiveRecord::Schema.define(:version => 20130222125833) do

create_table "feeds", :force => true do |t|
t.string "title"
@@ -19,9 +19,9 @@ ActiveRecord::Schema.define(:version => 20130222123224) do
t.string "url"
t.string "description"
t.string "generator"
t.time "last_fetched"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "last_fetched"
end

create_table "posts", :force => true do |t|
@@ -30,13 +30,13 @@ ActiveRecord::Schema.define(:version => 20130222123224) do
t.string "author"
t.text "summary"
t.text "content"
t.time "published"
t.decimal "lat"
t.decimal "lon"
t.integer "feed_id"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "guid"
t.datetime "published"
end

create_table "users", :force => true do |t|


Ladataan…
Peruuta
Tallenna