migration for new user and location fields

This commit is contained in:
snipe
2013-11-18 09:54:00 -05:00
parent 7c37f91dd5
commit 6214c7b706
2 changed files with 81 additions and 0 deletions
@@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
class AddContactsToUsers extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function($table)
{
$table->integer('location_id')->nullable();
$table->string('phone');
$table->string('jobtitle');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function($table)
{
$table->dropColumn('location_id');
$table->dropColumn('phone');
$table->dropColumn('jobtitle');
});
}
}
@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
class AddInfoToLocations extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('locations', function($table)
{
$table->string('address', 80);
$table->string('address2', 80);
$table->string('zip', 10);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('locations', function($table)
{
$table->dropColumn('address');
$table->dropColumn('address2');
$table->dropColumn('zip');
});
}
}