Skip to content

Instantly share code, notes, and snippets.

@ematta
Last active August 29, 2015 14:06
Show Gist options
  • Save ematta/b838f1d4353d47ef9da9 to your computer and use it in GitHub Desktop.
Save ematta/b838f1d4353d47ef9da9 to your computer and use it in GitHub Desktop.
Sequel.migration do
up do
# Table: Burndown Project
# String: Name - The name of the project
# String: Description - Short description of the project
create_table(:burndown_project) do
primary_key :id
String :name
String :description
end
# Table: Burndown Sprint
# Foreign Key: Burndown Project
# Integer: Sprint Number - Which sprint we are on for Project
# Integer: Sprint Hours - Hours allowed for this sprint iteration
# (total man hours available)
create_table(:burndown_sprint) do
primary_key :id
foreign_key :burndown_project_id, :burndown_project
Integer :sprint_number
Integer :sprint_hours
end
# Table: Burndown Tasks
# Foreign Key Burndown Sprint
# String: Name - The task name
# String: Description - The task description
# Integer: Hours - Total hours alloted for this sprint.
# NOTE: Instead of days, we take it down to
# the hour so we can keep track in a
# a granular level
create_table(:burndown_tasks) do
primary_key :id
foreign_key :burndown_sprint_id, :burndown_sprint
String :name
String :description
Integer :hours
end
# Table: Burndown Assignee
# String: Name - Assignee Name
# Integer: Hours - Hours allotted per sprint (can by changed)
create_table(:burndown_assignee) do
primary_key :id
String :name
Integer :hours
end
# Table: Burndown Progress
# Foreign Key: Burndown Tasks
# Foreign Key:
# String: Notes - Notes that the assignee can keep on the progress of a task
# Integer: Hours - How long it took a task to complete
create_table(:burndown_progress) do
primary_key :id
foreign_key :burndown_tasks_id, :burndown_tasks
foreign_key :burndown_asignee_id, :burndown_asignee
String :notes
Integer :hours
TrueClass :complete
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment