mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-11 03:38:51 +01:00
Sessions are now stored in the database rather than files in tracks/tmp. tracks/tmp.tmpl is no longer needed. This prevents the file system from becoming littered with file, and should help performance.
You need to run rake migrate to get your database up to schema version 7 to add the necessary session table to your database. git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@183 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
e50389788b
commit
62087003f1
5 changed files with 27 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ Rails::Initializer.run do |config|
|
|||
|
||||
# Use the database for sessions instead of the file system
|
||||
# (create the session table with 'rake create_sessions_table')
|
||||
# config.action_controller.session_store = :active_record_store
|
||||
config.action_controller.session_store = :active_record_store
|
||||
|
||||
# Enable page/fragment caching by setting a file-based store
|
||||
# (remember to create the caching directory and make it readable to the application)
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ config.action_mailer.raise_delivery_errors = false
|
|||
|
||||
# Unique cookies
|
||||
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] = "TrackDev"
|
||||
ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:tmpdir] = "#{RAILS_ROOT}/tmp"
|
||||
# ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:tmpdir] = "#{RAILS_ROOT}/tmp"
|
||||
15
tracks/db/migrate/007_add_sessions_table.rb
Normal file
15
tracks/db/migrate/007_add_sessions_table.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
class AddSessionsTable < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :sessions do |t|
|
||||
t.column :session_id, :string
|
||||
t.column :data, :text
|
||||
t.column :updated_at, :datetime
|
||||
end
|
||||
|
||||
add_index :sessions, :session_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :sessions
|
||||
end
|
||||
end
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
# migrations feature of ActiveRecord to incrementally modify your database, and
|
||||
# then regenerate this schema definition.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 6) do
|
||||
ActiveRecord::Schema.define(:version => 7) do
|
||||
|
||||
create_table "contexts", :force => true do |t|
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
|
|
@ -27,6 +27,14 @@ ActiveRecord::Schema.define(:version => 6) do
|
|||
t.column "description", :text
|
||||
end
|
||||
|
||||
create_table "sessions", :force => true do |t|
|
||||
t.column "session_id", :string
|
||||
t.column "data", :text
|
||||
t.column "updated_at", :datetime
|
||||
end
|
||||
|
||||
add_index "sessions", ["session_id"], :name => "sessions_session_id_index"
|
||||
|
||||
create_table "todos", :force => true do |t|
|
||||
t.column "context_id", :integer, :default => 0, :null => false
|
||||
t.column "project_id", :integer
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ Wiki (deprecated - please use Trac): http://www.rousette.org.uk/projects/wiki/
|
|||
18. Validation errors are now reported in a status box (just above the new next action form).
|
||||
19. There's a rake task (upgrade_sqlite_db) which allows you to safely upgrade databases created with version 1.03, afterwhich you can run rake migrate to complete the process. From there, rake migrate should work OK.
|
||||
20. Moved settings for Tracks from the file settings.yml to the database. Running 'rake migrate' will update your database appropriately, and add the default settings into it. Then you should be able to visit <tt>http://0.0.0.0:3000/user/preferences</tt> to view and edit your settings. The advantage is that you don't need to mess about with the settings.yml file, and each of the users can have their own settings.
|
||||
21. Session data is now stored in the database rather than a file in tracks/tmp. This should prevent the tmp directory cluttering up the file system, and give better performance. You need to run rake migrate to add the session table to your database.
|
||||
|
||||
== Version 1.03
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue