Browse Source

Change feeds.last_fetched and posts.published to datetime

master
Adrian Short 11 years ago
parent
commit
2dc6636d60
3 changed files with 25 additions and 3 deletions
  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 View File

@@ -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 View File

@@ -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 View File

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


Loading…
Cancel
Save