1. Marisa Strong
  2. DMPTool-dev

Commits

Marisa Strong  committed 00d8fe7

db changes to create help text and suggested_answer contexts tables and funder info to resources tables

  • Participants
  • Parent commits ad54c64
  • Branches default

Comments (0)

Files changed (5)

File db/migrate/20120426205610_create_help_text_contexts.rb

View file
+class CreateHelpTextContexts < ActiveRecord::Migration
+  def self.up
+    create_table :help_text_contexts do |t|
+      t.integer :help_text_id
+      t.integer :question_id
+      
+      t.timestamps  
+
+     # execute "insert into help_text_contexts (help_text_id) select id from help_texts group by help_text"
+  end
+
+  def self.down
+    drop_table :help_text_contexts
+  end
+  end
+end

File db/migrate/20120430172139_create_suggested_answers_contexts.rb

View file
+class CreateSuggestedAnswersContexts < ActiveRecord::Migration
+  def self.up
+    create_table :suggested_answers_contexts do |t|
+      t.integer :suggested_answer_id
+      t.integer :question_id
+      
+      t.timestamps  
+  end
+
+  def self.down
+    drop_table :suggested_answers_contexts
+  end
+  end
+end

File db/migrate/20120430173402_add_sample_plan_to_resources.rb

View file
+class AddSamplePlanToResources < ActiveRecord::Migration
+  def self.up
+    add_column :resources, :sample_plan, :boolean, :default => 0
+  end
+
+  def self.down
+    remove_column :resources, :sample_plan
+  end
+end

File db/schema.rb

View file
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20110909211622) do
+ActiveRecord::Schema.define(:version => 20120430173622) do
 
   create_table "answers", :force => true do |t|
     t.integer  "plan_id"
     t.datetime "updated_at"
   end
 
+  create_table "help_text_contexts", :force => true do |t|
+    t.integer  "help_text_id"
+    t.integer  "question_id"
+    t.datetime "created_at"
+    t.datetime "updated_at"
+  end
+
   create_table "help_texts", :force => true do |t|
     t.text     "help_text",      :null => false
     t.integer  "question_id",    :null => false
     t.string   "url"
     t.datetime "created_at"
     t.datetime "updated_at"
+    t.boolean  "sample_plan", :default => false
+    t.boolean  "funder_link", :default => false
   end
 
   create_table "suggested_answers", :force => true do |t|
     t.datetime "updated_at"
   end
 
+  create_table "suggested_answers_contexts", :force => true do |t|
+    t.integer  "suggested_answer_id"
+    t.integer  "question_id"
+    t.datetime "created_at"
+    t.datetime "updated_at"
+  end
+
+  create_table "test_htc", :id => false, :force => true do |t|
+    t.integer "ht_id"
+    t.integer "q_id"
+  end
+
   create_table "user_plans", :force => true do |t|
     t.integer  "user_id"
     t.integer  "plan_id"