Permalink
Browse files

Start of change of design to simplify things a little bit. Add types …

…to tasks.
  • Loading branch information...
1 parent 0f27eed commit 628e3657f20d00ad0791197995cc529259ae6c74 @leenookx committed Feb 12, 2011
@@ -0,0 +1,2 @@
+class TaskTypes < ActiveRecord::Base
+end
@@ -0,0 +1,12 @@
+class CreateTaskTypes < ActiveRecord::Migration
+ def self.up
+ create_table :task_types do |t|
+ t.string :description
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :task_types
+ end
+end
@@ -0,0 +1,9 @@
+class AddTypeToTask < ActiveRecord::Migration
+ def self.up
+ add_column :tasks, :type_id, :integer
+ end
+
+ def self.down
+ remove_column :tasks, :type_id
+ end
+end
@@ -0,0 +1,12 @@
+require 'active_record/fixtures'
+
+class PopulateTaskTypes < ActiveRecord::Migration
+ def self.up
+ directory = File.join(File.dirname(__FILE__), "data")
+ Fixtures.create_fixtures(directory, "task_types")
+ end
+
+ def self.down
+ TaskTypes.delete_all
+ end
+end
@@ -0,0 +1,8 @@
+1:
+ description: Story
+
+2:
+ description: Task
+
+3:
+ description: Issue
View
@@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20110212064511) do
+ActiveRecord::Schema.define(:version => 20110212075138) do
create_table "activations", :force => true do |t|
t.string "code", :null => false
@@ -52,6 +52,23 @@
add_index "invitations", ["code"], :name => "index_invitations_on_code"
+ create_table "issues", :force => true do |t|
+ t.string "title"
+ t.integer "status_id"
+ t.integer "assigned_to"
+ t.string "description"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "notes", :force => true do |t|
+ t.integer "story_id"
+ t.integer "user_id"
+ t.string "contents"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
create_table "project_roles", :force => true do |t|
t.integer "user_id"
t.integer "role_id"
@@ -85,6 +102,49 @@
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
+ create_table "sprints", :force => true do |t|
+ t.string "name", :null => false
+ t.integer "project_id"
+ t.integer "status_id"
+ t.datetime "start_date"
+ t.datetime "end_date"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "statuses", :force => true do |t|
+ t.string "description"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "stories", :force => true do |t|
+ t.integer "project_id"
+ t.integer "sprint_id"
+ t.integer "status_id"
+ t.string "name"
+ t.string "description"
+ t.integer "user_id"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "task_types", :force => true do |t|
+ t.string "description"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
+
+ create_table "tasks", :force => true do |t|
+ t.integer "sprint_id"
+ t.integer "status_id"
+ t.string "name"
+ t.string "description"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ t.integer "type_id"
+ end
+
create_table "users", :force => true do |t|
t.string "name"
t.string "email"
@@ -0,0 +1,11 @@
+# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
+
+# This model initially had no columns defined. If you add columns to the
+# model remove the '{}' from the fixture names and add the columns immediately
+# below each fixture, per the syntax in the comments below
+#
+one: {}
+# column: value
+#
+two: {}
+# column: value
@@ -0,0 +1,8 @@
+require 'test_helper'
+
+class TaskTypesTest < ActiveSupport::TestCase
+ # Replace this with your real tests.
+ test "the truth" do
+ assert true
+ end
+end

0 comments on commit 628e365

Please sign in to comment.