mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Updated README files, and database schemas.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@39 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
c12cab974e
commit
05c037ef3f
6 changed files with 155 additions and 14 deletions
|
|
@ -6,10 +6,11 @@
|
|||
<%= render_collection_of_partials "not_done", @not_done %>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p>Other Contexts:
|
||||
<% for other_context in Context.find_all %>
|
||||
<%= link_to( other_context.name.capitalize, { :controller => "context", :action => "show", :id => other_context.id } ) + " | " %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div><!- End of display_box -->
|
||||
|
||||
<div id="input_box">
|
||||
|
|
|
|||
|
|
@ -12,9 +12,11 @@
|
|||
</table>
|
||||
<% end %>
|
||||
</div>
|
||||
<p>Other Projects:
|
||||
<% for other_project in Project.find_all %>
|
||||
<%= link_to( other_project.name.capitalize, { :controller => "project", :action => "show", :id => other_project.id } ) + " | " %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div><!-- End of display box -->
|
||||
|
||||
<div id="input_box">
|
||||
|
|
|
|||
93
tracks/db/tracks_1.0.2_sqlite.sql
Normal file
93
tracks/db/tracks_1.0.2_sqlite.sql
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# SQLite dump
|
||||
# ************************************************************
|
||||
|
||||
# Dump of table contexts
|
||||
# ------------------------------------------------------------
|
||||
|
||||
CREATE TABLE 'contexts' (
|
||||
'id' INTEGER PRIMARY KEY,
|
||||
'name' varchar(255) NOT NULL default '',
|
||||
'hide' tinyint(4) NOT NULL default '0',
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Dump of table projects
|
||||
# ------------------------------------------------------------
|
||||
|
||||
CREATE TABLE 'projects' (
|
||||
'id' INTEGER PRIMARY KEY,
|
||||
'name' varchar(255) NOT NULL default '',
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Dump of table todos
|
||||
# ------------------------------------------------------------
|
||||
|
||||
CREATE TABLE 'todos' (
|
||||
'id' INTEGER PRIMARY KEY,
|
||||
'context_id' int(11) NOT NULL default '0',
|
||||
'description' varchar(100) NOT NULL default '',
|
||||
'notes' text,
|
||||
'done' tinyint(4) NOT NULL default '0',
|
||||
'created' datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
'due' date default NULL,
|
||||
'completed' datetime default NULL,
|
||||
'project_id' int(11) default NULL,
|
||||
)
|
||||
|
||||
|
||||
|
||||
# Dump of table users
|
||||
# ------------------------------------------------------------
|
||||
|
||||
CREATE TABLE 'users' (
|
||||
'id' INTEGER PRIMARY KEY,
|
||||
'login' varchar(80) default NULL,
|
||||
'password' varchar(40) default NULL,
|
||||
'word' varchar(255) default NULL,
|
||||
'is_admin' tinyint(4) NOT NULL default '0',
|
||||
)
|
||||
|
||||
# Dump of table contexts
|
||||
# ------------------------------------------------------------
|
||||
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("1","agenda","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("2","call","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("3","email","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("4","errand","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("5","lab","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("6","library","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("7","freetime","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("8","office","0");
|
||||
INSERT INTO 'contexts' ('id','name') VALUES ("11","waiting-for","0");
|
||||
|
||||
|
||||
# Dump of table projects
|
||||
# ------------------------------------------------------------
|
||||
|
||||
INSERT INTO 'projects' ('id','name') VALUES ("1","Build a working time machine");
|
||||
INSERT INTO 'projects' ('id','name') VALUES ("2","Make more money than Billy Gates");
|
||||
INSERT INTO 'projects' ('id','name') VALUES ("3","Evict dinosaurs from the garden");
|
||||
|
||||
|
||||
# Dump of table todos
|
||||
# ------------------------------------------------------------
|
||||
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("1","1","Call Bill Gates to find out how much he makes per day","","0","2004-11-28 16:01:00","2004-10-30",NULL,"2");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("52","2","Call dinosaur exterminator","Ask him if I need to hire a skip for the corpses.","0","2004-11-28 16:06:08","2004-11-30",NULL,"3");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("53","4","Buy milk","","1","2004-11-28 16:06:31","0000-00-00","2004-11-28 16:06:42",NULL);
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("54","4","Buy bread","","1","2004-11-28 16:06:58","0000-00-00","2004-11-30 13:41:09",NULL);
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("55","5","Construct time dilation device","","0","2004-11-28 16:07:33","0000-00-00",NULL,"1");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("56","2","Phone Grandfather to ask about the paradox","Added some _notes_.","0","2004-11-28 16:08:33","2004-12-30",NULL,"1");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("61","6","Get a book out of the library","Dinosaurs\'R\'Us","0","2004-12-22 14:07:06","0000-00-00",NULL,"3");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("60","4","Upgrade to Rails 0.9.1","","1","2004-12-20 17:02:52","2004-12-21","2004-12-20 17:06:48",NULL);
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("65","1","This should be due today","","0","2004-12-31 17:23:06","2004-12-31",NULL,NULL);
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("75","1","foo","","1","2004-12-31 18:38:34","2005-01-05","2005-01-02 12:27:10",NULL);
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("81","1","Buy shares","","0","2005-01-01 12:40:26","2005-02-01",NULL,"2");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("85","1","Buy stegosaurus bait","","1","2005-01-01 12:53:12","2005-01-02","2005-01-01 12:53:43","3");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("92","1","New action in context","Some notes","1","2005-01-02 14:52:49","2005-03-01","2005-01-02 15:44:19","3");
|
||||
INSERT INTO 'todos' ('id','context_id','description','notes','done','created','due','completed','project_id') VALUES ("97","2","Call stock broker","tel: 12345","0","2005-01-03 11:38:25","0000-00-00",NULL,"2");
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,11 @@
|
|||
## Tracks :: GTD web application
|
||||
## $LastChangedDate$
|
||||
## $HeadURL$
|
||||
# Homepage:: http://www.rousette.org.uk/projects/
|
||||
# Author:: bsag (http://www.rousette.org.uk/)
|
||||
# Version:: 1.02
|
||||
# Copyright:: (cc) 2004-2005 rousette.org.uk
|
||||
# License:: GNU GPL
|
||||
|
||||
Main project site: <http://www.rousette.org.uk/projects/>
|
||||
Project wiki: <http://www.rousette.org.uk/projects/wiki/>
|
||||
|
|
|
|||
|
|
@ -1,36 +1,76 @@
|
|||
Tracks: a GTD web application, built with Ruby on Rails
|
||||
-------------------------------------------------------------
|
||||
|
||||
## $LastChangedDate$
|
||||
## $HeadURL$
|
||||
|
||||
# Homepage:: http://www.rousette.org.uk/projects/
|
||||
# Author:: bsag (http://www.rousette.org.uk/)
|
||||
# Version:: 1.01
|
||||
# Version:: 1.02
|
||||
# Copyright:: (cc) 2004-2005 rousette.org.uk
|
||||
# License:: GNU GPL
|
||||
|
||||
This is a still a work in progress, and there's almost no error checking or validation of the data yet. Use caution when you run it, and make sure that you back up any important data. Full changenotes can be found in tracks/doc/CHANGENOTES.txt. Full API documentation can be found at tracks/doc/app/index.html.
|
||||
This is a still a work in progress; use caution when you run it, and make sure that you back up any important data. Full changenotes can be found in tracks/doc/CHANGENOTES.txt. Full API documentation can be found at tracks/doc/app/index.html.
|
||||
|
||||
**IF THIS CRASHES YOUR MACHINE AND LOSES YOUR DATA, IT'S NOT MY FAULT!**
|
||||
|
||||
## Installation
|
||||
|
||||
Before you start, you need to make sure that you have Ruby 1.8.x, mySQL and Rails 0.9.x. Note particularly the last requirement: this will probably not work with Rails 0.8.x. I have now included RedCloth 3.0 (which allows both Textile and Markdown format in the notes field) in the distribution. Find out more about RedCloth here:
|
||||
Before you start, you need to make sure that you have Ruby 1.8.2, mySQL and Rails 0.10.0. Note particularly the last requirement: this version *requires* Rails 0.10.0, or the re-writing of URLs will not work. In fact, the whole app will not work ;-). I have now included RedCloth 3.0.3 (which allows both Textile and Markdown format in the notes field) in the distribution. Find out more about RedCloth here:
|
||||
<http://www.whytheluckystiff.net/ruby/redcloth/>
|
||||
It's licensed under a BSD license.
|
||||
It's licensed under a BSD license. There's an odd error which pops up when using Redcloth from the lib directory in the application, but only when you are running under the development environment. To get around this, I've set environment.rb to look for a gem version of Redcloth first and use that, and only then fall back on the included version (see CHANGENOTES.txt for details).
|
||||
|
||||
1. Unzip tracks.zip somewhere in your home folder ( e.g. /Users/yourusername/Sites).
|
||||
### New users
|
||||
|
||||
1. Unzip tracks_1_02.zip somewhere in your home folder ( e.g. /Users/yourusername/Sites).
|
||||
2. Make a mySQL database called tracks for which you have full access rights.
|
||||
3. Import the tables and contents using the tracks_dump 03.01.2005.sql file (in tracks/db). If you have previously used the application, export the contents of the tables from your old todo database and import them into the tracks database.
|
||||
3. Import the tables and contents using the tracks_1.0.2_tables_mysql.sql and tracks_1.0.2_content_mysql.sql files (in tracks/db). If you don't want to start with dummy next actions in your database, simply delete everything from the line:
|
||||
# Dump of table todos
|
||||
to the end of the tracks_1.0.2_content_mysql.sql file.
|
||||
4. Open the tracks/config/database.yml file, and enter your username and password details.
|
||||
5. Open the tracks/config/setting.yml file, and enter your desired format for dates (see CHANGENOTES.txt for details).
|
||||
6. Open Terminal and navigate to the todo folder in your Sites folder.
|
||||
5. Open the tracks/config/setting.yml file, and enter your desired format for dates and your email address for the login/signup page (see CHANGENOTES.txt for details).
|
||||
6. Open Terminal and navigate inside the tracks folder (e.g. cd /Users/yourusername/Sites/tracks).
|
||||
7. Run the command: ruby script/server --environment=production
|
||||
If you already have the previous GTD application running, make sure that you stop the server, or run Tracks on a different port with ruby script/server --environment=production --port=3030
|
||||
8. *IMPORTANT* Tracks now has password protection on all the browser accessible files. The first time that you access it, you need to visit <http://127.0.0.1:3000/login/signup>. Choose your username and password, and you will be directed back to the main listing page (<http://127.0.0.1:3000/todo/list>).
|
||||
*IMPORTANT* If you already have an application running on WEBrick (Tracks or anything else), make sure that you stop the server, or run Tracks on a different port with ruby script/server --environment=production --port=3030
|
||||
8. In a browser, go to http://127.0.0.1:3000/login/signup. This will allow you to choose a username and password for the admin user. Thereafter, anyone else trying to access login/signup will get a message that they are not allowed to sign up, and are given your email address to contact for permission. When you are logged in as the admin user, you can visit login/signup to sign up additional users. Note that Tracks isn't truly multi-user: all your users will be able to view (and edit) your data. The login system is just to restrict access to your sensitive data.
|
||||
9. Have fun!
|
||||
|
||||
### Upgrading
|
||||
|
||||
1. Before you do anything else, BACK UP YOUR DATABASE (tables and content). Then make a separate export of the contents only (assuming that you want to move your data to the new version.)
|
||||
2. In your contents export, delete the contents of the Users table. There are new fields in the users table, and it would be best to create your users again from scratch from the login/signup page.
|
||||
3. For safety, rename your current Tracks directory to 'tracks-old' or something similar, and if you are able, create a new database for the new version. If you can't create a new database, delete the contents and tables in your old one MAKING SURE THAT YOU HAVE BACKED UP YOUR DATABASE AS IN STEP 1 FIRST.
|
||||
4. Import first tracks_1.0.2_tables_mysql.sql from tracks/db, then your own contents dump file into the new database.
|
||||
5. Fill in the correct details in database.yml and settings.yml, referring to the old copies in tracks-old if necessary.
|
||||
6. From here, follow steps 6-9 for new users above. Don't forget that as you've deleted your users table, you'll need to re-create your users via login/signup.
|
||||
|
||||
|
||||
## Using databases other than MySQL
|
||||
|
||||
Rick Bradley kindly converted the MySQL schema for Tracks to Postgresql format, so I was able to use that as a model for the new version - see tracks/db/tracks_1.0.2_postgres.sql. Remember that you'll also need to change the adapter line in database.yml:
|
||||
adapter: postgresql
|
||||
|
||||
If you use SQLite, you could try the schema tracks/db/tracks_1.0.2_sqlite.sql, but note that it is untested. You also need to alter database.yml a little:
|
||||
adapter: sqlite
|
||||
dbfile: ../db/tracks.db
|
||||
|
||||
Substitute your real SQLite database name for tracks.db above.
|
||||
|
||||
|
||||
## Other servers
|
||||
|
||||
WEBrick is the easiest server to get working to test out Tracks, and will be fine if you have Tracks installed on your own machine. One nice feature in Rails 0.10.0 is that WEBrick runs by default on the IP address 0.0.0.0, which means that you can access it via 127.0.0.1 when you are on the same machine, or via the external IP address of the machine running Tracks, so long as you can access the network of that machine from your current location. However, it is possible to use other servers, and the new re-writing rules of Rails 0.10.0 ('Routes' in environment/routes.rb) mean that very little configuration is needed.
|
||||
|
||||
### Apache
|
||||
|
||||
See the file tracks/README_RAILS for an example of an Apache conf. The file tracks/public/.htaccess contains the necessary re-write rules to call dispatch.cgi or dispatch.fcgi. All other rules are handled by routes.rb
|
||||
|
||||
### Lighttpd
|
||||
|
||||
Again, see tracks/README_RAILS for a working example of a lighttpd.conf file. Note that you'll want to change the line:
|
||||
"bin-environment" => ( "RAILS_ENV" => "development"
|
||||
|
||||
to
|
||||
"bin-environment" => ( "RAILS_ENV" => "production"
|
||||
|
||||
|
||||
## Contacting me
|
||||
|
||||
I'd love any suggestions you have for improvements, bug-fixes etc. Email me on:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue