mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
37 lines
791 B
PHP
Executable file
37 lines
791 B
PHP
Executable file
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateLocationsTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('locations', function ($table) {
|
|
$table->increments('id');
|
|
$table->string('name')->nullable();
|
|
$table->string('city')->nullable();
|
|
$table->string('state',2)->nullable();
|
|
$table->string('country',2)->nullable();
|
|
$table->timestamps();
|
|
$table->integer('user_id')->nullable();
|
|
$table->engine = 'InnoDB';
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::drop('locations');
|
|
}
|
|
|
|
}
|