mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-31 05:05:18 +01:00
Changed all the created_at and updated_at fields back to a null default to fix #301. It seems that the problem with datetime fields and Postgresql was a Rails bug that was fixed in 1.1, so it should be OK now.
Unfortunately, I couldn't seem to create a migration to revert the fields, so I had to alter the older migration files. This means that if you're using the trunk you need to export your data, delete the database, create it again, run rake db:migrate and then reimport your data. Make sure you backup the whole database first, just in case! git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@261 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
b78b0f4eca
commit
cf0d56e10b
5 changed files with 8 additions and 8 deletions
|
|
@ -19,7 +19,7 @@ class CreateTracksDb < ActiveRecord::Migration
|
|||
t.column :description, :string, :null => false
|
||||
t.column :notes, :text
|
||||
t.column :done, :boolean, :default => false, :null => false
|
||||
t.column :created, :datetime, :default => Time.now.to_s(:db)
|
||||
t.column :created, :datetime
|
||||
t.column :due, :date
|
||||
t.column :completed, :datetime
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ class Notes < ActiveRecord::Migration
|
|||
t.column :user_id, :integer, :null => false
|
||||
t.column :project_id, :integer, :null => false
|
||||
t.column :body, :text
|
||||
t.column :created_at, :datetime, :default => Time.now.to_s(:db)
|
||||
t.column :updated_at, :datetime, :default => Time.now.to_s(:db)
|
||||
t.column :created_at, :datetime
|
||||
t.column :updated_at, :datetime
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
class AddProjectDescription < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :projects, :description, :text, :default => ''
|
||||
add_column :projects, :description, :text
|
||||
end
|
||||
|
||||
def self.down
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ ActiveRecord::Schema.define(:version => 8) do
|
|||
t.column "user_id", :integer, :null => false
|
||||
t.column "project_id", :integer, :null => false
|
||||
t.column "body", :text
|
||||
t.column "created_at", :datetime, :default => Sat May 27 11:22:19 BST 2006
|
||||
t.column "updated_at", :datetime, :default => Sat May 27 11:22:19 BST 2006
|
||||
t.column "created_at", :datetime
|
||||
t.column "updated_at", :datetime
|
||||
end
|
||||
|
||||
create_table "projects", :force => true do |t|
|
||||
|
|
@ -24,7 +24,7 @@ ActiveRecord::Schema.define(:version => 8) do
|
|||
t.column "position", :integer, :null => false
|
||||
t.column "done", :boolean, :default => false
|
||||
t.column "user_id", :integer, :default => 1
|
||||
t.column "description", :text, :default => ""
|
||||
t.column "description", :text
|
||||
end
|
||||
|
||||
create_table "sessions", :force => true do |t|
|
||||
|
|
@ -41,7 +41,7 @@ ActiveRecord::Schema.define(:version => 8) do
|
|||
t.column "description", :string, :null => false
|
||||
t.column "notes", :text
|
||||
t.column "done", :boolean, :default => false, :null => false
|
||||
t.column "created_at", :datetime, :default => Sat May 27 11:22:16 BST 2006
|
||||
t.column "created_at", :datetime
|
||||
t.column "due", :date
|
||||
t.column "completed", :datetime
|
||||
t.column "user_id", :integer, :default => 1
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue