diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-04-09 00:28:58 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2012-04-09 00:28:58 +0300 |
commit | 23d950855d6d2524d00b1f0618c008e2529f06a4 (patch) | |
tree | adbf9d77a4ec9e437d285266de6892e0f17b960b /db | |
parent | 667edcdd7534206761fc9524e6eaa17f1c27b815 (diff) | |
download | gitlab-ce-23d950855d6d2524d00b1f0618c008e2529f06a4.tar.gz |
Milestone basic scaffold
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20120408180246_create_milestones.rb | 12 | ||||
-rw-r--r-- | db/migrate/20120408181910_add_milestone_id_to_issue.rb | 5 | ||||
-rw-r--r-- | db/schema.rb | 22 |
3 files changed, 33 insertions, 6 deletions
diff --git a/db/migrate/20120408180246_create_milestones.rb b/db/migrate/20120408180246_create_milestones.rb new file mode 100644 index 00000000000..ed3a510d660 --- /dev/null +++ b/db/migrate/20120408180246_create_milestones.rb @@ -0,0 +1,12 @@ +class CreateMilestones < ActiveRecord::Migration + def change + create_table :milestones do |t| + t.string :title, :null => false + t.integer :project_id, :null => false + t.text :description + t.date :due_date + t.boolean :closed, :default => false, :null => false + t.timestamps + end + end +end diff --git a/db/migrate/20120408181910_add_milestone_id_to_issue.rb b/db/migrate/20120408181910_add_milestone_id_to_issue.rb new file mode 100644 index 00000000000..a6b44090c1c --- /dev/null +++ b/db/migrate/20120408181910_add_milestone_id_to_issue.rb @@ -0,0 +1,5 @@ +class AddMilestoneIdToIssue < ActiveRecord::Migration + def change + add_column :issues, :milestone_id, :integer, :null => true + end +end diff --git a/db/schema.rb b/db/schema.rb index 4048227590d..51e78b76847 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 => 20120405211750) do +ActiveRecord::Schema.define(:version => 20120408181910) do create_table "events", :force => true do |t| t.string "target_type" @@ -30,13 +30,14 @@ ActiveRecord::Schema.define(:version => 20120405211750) do t.integer "assignee_id" t.integer "author_id" t.integer "project_id" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "closed", :default => false, :null => false - t.integer "position", :default => 0 - t.boolean "critical", :default => false, :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.boolean "closed", :default => false, :null => false + t.integer "position", :default => 0 + t.boolean "critical", :default => false, :null => false t.string "branch_name" t.text "description" + t.integer "milestone_id" end add_index "issues", ["project_id"], :name => "index_issues_on_project_id" @@ -69,6 +70,15 @@ ActiveRecord::Schema.define(:version => 20120405211750) do add_index "merge_requests", ["project_id"], :name => "index_merge_requests_on_project_id" + create_table "milestones", :force => true do |t| + t.string "title", :null => false + t.text "description" + t.date "due_date", :null => false + t.integer "project_id", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + end + create_table "notes", :force => true do |t| t.text "note" t.string "noteable_id" |