mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Changes made to the default datestamp in the migrations to fix compatability with PostgreSQL (see #218) caused even new actions to be marked as stale (#257). This also affected SQLite3, as reported by Sjoerd Siebinga on the mailing list.
This changeset sets the default datestamp using Rails to set a db-appropriate format. It fixes SQLite3, and I hope also PostgreSQL though I can't test this. Fixes #257. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@249 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
d0784999c1
commit
f10e5b102e
4 changed files with 22 additions and 22 deletions
|
|
@ -19,7 +19,7 @@ class CreateTracksDb < ActiveRecord::Migration
|
||||||
t.column :description, :string, :null => false
|
t.column :description, :string, :null => false
|
||||||
t.column :notes, :text
|
t.column :notes, :text
|
||||||
t.column :done, :boolean, :default => false, :null => false
|
t.column :done, :boolean, :default => false, :null => false
|
||||||
t.column :created, :datetime, :default => '0000-01-01 00:00:00'
|
t.column :created, :datetime, :default => Time.now.to_s(:db)
|
||||||
t.column :due, :date
|
t.column :due, :date
|
||||||
t.column :completed, :datetime
|
t.column :completed, :datetime
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@ class Notes < ActiveRecord::Migration
|
||||||
t.column :user_id, :integer, :null => false
|
t.column :user_id, :integer, :null => false
|
||||||
t.column :project_id, :integer, :null => false
|
t.column :project_id, :integer, :null => false
|
||||||
t.column :body, :text
|
t.column :body, :text
|
||||||
t.column :created_at, :datetime, :default => '0000-01-01 00:00:00'
|
t.column :created_at, :datetime, :default => Time.now.to_s(:db)
|
||||||
t.column :updated_at, :datetime, :default => '0000-01-01 00:00:00'
|
t.column :updated_at, :datetime, :default => Time.now.to_s(:db)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,26 +5,26 @@
|
||||||
ActiveRecord::Schema.define(:version => 8) do
|
ActiveRecord::Schema.define(:version => 8) do
|
||||||
|
|
||||||
create_table "contexts", :force => true do |t|
|
create_table "contexts", :force => true do |t|
|
||||||
t.column "name", :string, :default => "", :null => false
|
t.column "name", :string, :null => false
|
||||||
t.column "hide", :integer, :limit => 4, :default => 0, :null => false
|
t.column "position", :integer, :null => false
|
||||||
t.column "position", :integer, :default => 0, :null => false
|
t.column "hide", :boolean, :default => false
|
||||||
t.column "user_id", :integer, :default => 1
|
t.column "user_id", :integer, :default => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "notes", :force => true do |t|
|
create_table "notes", :force => true do |t|
|
||||||
t.column "user_id", :integer, :default => 0, :null => false
|
t.column "user_id", :integer, :null => false
|
||||||
t.column "project_id", :integer, :default => 0, :null => false
|
t.column "project_id", :integer, :null => false
|
||||||
t.column "body", :text
|
t.column "body", :text
|
||||||
t.column "created_at", :datetime
|
t.column "created_at", :datetime, :default => Sat May 27 11:22:19 BST 2006
|
||||||
t.column "updated_at", :datetime
|
t.column "updated_at", :datetime, :default => Sat May 27 11:22:19 BST 2006
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "projects", :force => true do |t|
|
create_table "projects", :force => true do |t|
|
||||||
t.column "name", :string, :default => "", :null => false
|
t.column "name", :string, :null => false
|
||||||
t.column "position", :integer, :default => 0, :null => false
|
t.column "position", :integer, :null => false
|
||||||
t.column "done", :integer, :limit => 4, :default => 0, :null => false
|
t.column "done", :boolean, :default => false
|
||||||
t.column "user_id", :integer, :default => 1
|
t.column "user_id", :integer, :default => 1
|
||||||
t.column "description", :text
|
t.column "description", :text, :default => ""
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "sessions", :force => true do |t|
|
create_table "sessions", :force => true do |t|
|
||||||
|
|
@ -36,24 +36,24 @@ ActiveRecord::Schema.define(:version => 8) do
|
||||||
add_index "sessions", ["session_id"], :name => "sessions_session_id_index"
|
add_index "sessions", ["session_id"], :name => "sessions_session_id_index"
|
||||||
|
|
||||||
create_table "todos", :force => true do |t|
|
create_table "todos", :force => true do |t|
|
||||||
t.column "context_id", :integer, :default => 0, :null => false
|
t.column "context_id", :integer, :null => false
|
||||||
t.column "description", :string, :limit => 100, :default => "", :null => false
|
t.column "project_id", :integer
|
||||||
|
t.column "description", :string, :null => false
|
||||||
t.column "notes", :text
|
t.column "notes", :text
|
||||||
t.column "done", :integer, :limit => 4, :default => 0, :null => false
|
t.column "done", :boolean, :default => false, :null => false
|
||||||
t.column "created_at", :datetime
|
t.column "created_at", :datetime, :default => Sat May 27 11:22:16 BST 2006
|
||||||
t.column "due", :date
|
t.column "due", :date
|
||||||
t.column "completed", :datetime
|
t.column "completed", :datetime
|
||||||
t.column "project_id", :integer
|
|
||||||
t.column "user_id", :integer, :default => 1
|
t.column "user_id", :integer, :default => 1
|
||||||
t.column "type", :string, :default => "Immediate", :null => false
|
t.column "type", :string, :default => "Immediate", :null => false
|
||||||
t.column "show_from", :date
|
t.column "show_from", :date
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
create_table "users", :force => true do |t|
|
||||||
t.column "login", :string, :limit => 80
|
t.column "login", :string, :limit => 80, :null => false
|
||||||
t.column "password", :string, :limit => 40
|
t.column "password", :string, :limit => 40, :null => false
|
||||||
t.column "word", :string
|
t.column "word", :string
|
||||||
t.column "is_admin", :integer, :limit => 4, :default => 0, :null => false
|
t.column "is_admin", :boolean, :default => false, :null => false
|
||||||
t.column "preferences", :text
|
t.column "preferences", :text
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue