Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added default for priority order in issues table
  • Loading branch information
Srikanth-AD committed Jun 17, 2015
1 parent 6d2bccf commit 91137ae
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .env.example
Expand Up @@ -21,4 +21,4 @@ MAIL_FROM_NAME=fromnameforemails
MAIL_TO_NAME=tonameforemails
SITE_URL=siteurl
SITE_TIMEZONE=America/Indianapolis
APP_NAME=ScrumWala
APP_NAME=Scrumwala
69 changes: 33 additions & 36 deletions database/migrations/2015_03_23_002918_create_issues_table.php
@@ -1,7 +1,7 @@
<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateIssuesTable extends Migration {

Expand All @@ -10,50 +10,47 @@ class CreateIssuesTable extends Migration {
*
* @return void
*/
public function up()
{
Schema::create('issues', function(Blueprint $table)
{
$table->increments('id');
$table->string('title');
$table->text('description');
public function up() {
Schema::create('issues', function (Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('description');
$table->timestamp('deadline')->nullable();
$table->timestamps();
$table->integer('project_id')->unsigned();
$table->integer('user_id')->unsigned();
$table->integer('type_id')->unsigned();
$table->integer('sprint_id')->unsigned();
$table->integer('status_id')->unsigned();
$table->integer('priority_order')->unsigned();
$table->foreign('project_id')
->references('id')
->on('projects');

$table->foreign('user_id')
->references('id')
->on('users');

$table->foreign('type_id')
->references('id')
->on('issue_types');

$table->foreign('sprint_id')
->references('id')
->on('sprints');

$table->foreign('status_id')
->references('id')
->on('issue_statuses');
});
$table->integer('project_id')->unsigned();
$table->integer('user_id')->unsigned();
$table->integer('type_id')->unsigned();
$table->integer('sprint_id')->unsigned();
$table->integer('status_id')->unsigned();
$table->integer('priority_order')->unsigned()->default(0);
$table->foreign('project_id')
->references('id')
->on('projects');

$table->foreign('user_id')
->references('id')
->on('users');

$table->foreign('type_id')
->references('id')
->on('issue_types');

$table->foreign('sprint_id')
->references('id')
->on('sprints');

$table->foreign('status_id')
->references('id')
->on('issue_statuses');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
public function down() {
Schema::drop('issues');
}

Expand Down

0 comments on commit 91137ae

Please sign in to comment.