forked from bryanlarsen/agility-gitorial-patches
-
Notifications
You must be signed in to change notification settings - Fork 1
/
33-story-status-model-migration-run.patch
51 lines (41 loc) · 1.53 KB
/
33-story-status-model-migration-run.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
story-status-model-migration-run
From: Bryan Larsen <[email protected]>
Run your modified migration:
$ rake db:migrate
That's it. The page to manage the story statuses should appear in the main navigation.
Now that we've got more structured statuses, let's do something with them...
---
db/schema.rb | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/db/schema.rb b/db/schema.rb
index e9eaa8d..fb10fcd 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130109013414) do
+ActiveRecord::Schema.define(:version => 20130109022053) do
create_table "projects", :force => true do |t|
t.string "name"
@@ -23,14 +23,21 @@ ActiveRecord::Schema.define(:version => 20130109013414) do
create_table "stories", :force => true do |t|
t.string "title"
t.text "body"
- t.string "status"
t.integer "tasks_count", :default => 0, :null => false
t.datetime "created_at"
t.datetime "updated_at"
t.integer "project_id"
+ t.integer "status_id"
end
add_index "stories", ["project_id"], :name => "index_stories_on_project_id"
+ add_index "stories", ["status_id"], :name => "index_stories_on_status_id"
+
+ create_table "story_statuses", :force => true do |t|
+ t.string "name"
+ t.datetime "created_at"
+ t.datetime "updated_at"
+ end
create_table "task_assignments", :force => true do |t|
t.datetime "created_at"