Browse Source

DB migration

pull/23/head
Aaron Parecki 6 years ago
parent
commit
b0940bfbb0
No known key found for this signature in database GPG Key ID: 276C2817346D6056
1 changed files with 35 additions and 0 deletions
  1. +35
    -0
      compass/database/migrations/2018_01_28_224119_cache_last_location.php

+ 35
- 0
compass/database/migrations/2018_01_28_224119_cache_last_location.php View File

@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CacheLastLocation extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('databases', function (Blueprint $table) {
$table->longtext('last_location')->nullable();
$table->datetime('last_location_date')->nullable();
$table->longtext('current_trip')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('databases', function (Blueprint $table) {
$table->dropColumn('last_location');
$table->dropColumn('last_location_date');
$table->dropColumn('current_trip');
});
}
}

Loading…
Cancel
Save