Added TaskList and Task migrations and models

This commit is contained in:
Jason Denney
2013-02-08 22:10:52 -05:00
parent ec19c8461d
commit 545c33b953
6 changed files with 54 additions and 2 deletions
+9
View File
@@ -0,0 +1,9 @@
class TaskList < ActiveRecord::Migration
def change
create_table :task_lists do |t|
t.integer "item_id", :null => false
t.string "item_type", :null => false
t.string "name", :null => false
end
end
end
+10
View File
@@ -0,0 +1,10 @@
class Task < ActiveRecord::Migration
def change
create_table :tasks do |t|
t.integer "task_list_id", :null => false
t.string "task", :null => false
t.text "notes"
t.boolean "done"
end
end
end
+14 -1
View File
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130120142249) do
ActiveRecord::Schema.define(:version => 20130209023110) do
create_table "bike_actions", :force => true do |t|
t.string "action", :limit => 128, :null => false
@@ -96,6 +96,19 @@ ActiveRecord::Schema.define(:version => 20130120142249) do
add_index "logs", ["loggable_id", "loggable_type", "context"], :name => "index_logs_on_loggable_id_and_loggable_type_and_context"
create_table "task_lists", :force => true do |t|
t.integer "item_id", :null => false
t.string "item_type", :null => false
t.string "name", :null => false
end
create_table "tasks", :force => true do |t|
t.integer "task_list_id", :null => false
t.string "task", :null => false
t.text "notes"
t.boolean "done"
end
create_table "transaction_actions", :force => true do |t|
t.string "action", :limit => 128, :null => false
t.datetime "created_at", :null => false