Merge pull request #10491 from snipe/fixes/migration_licenses_table_issue
Fixed - v6 migration licenses table issue
This commit is contained in:
commit
23a2700178
2 changed files with 21 additions and 35 deletions
|
@ -6,30 +6,15 @@ class CreateTempLicensesTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* This migration is overwritten by a later migration - 2013_11_25_recreate_licenses_table.php
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!Schema::hasTable('licenses')) {
|
//
|
||||||
Schema::create('licenses', function ($table) {
|
|
||||||
$table->increments('id');
|
|
||||||
$table->string('name');
|
|
||||||
$table->integer('model_id');
|
|
||||||
$table->text('serial');
|
|
||||||
$table->string('license_email');
|
|
||||||
$table->string('license_name');
|
|
||||||
$table->date('purchase_date')->nullable();
|
|
||||||
$table->decimal('purchase_cost', 8, 2)->nullable();
|
|
||||||
$table->string('order_number');
|
|
||||||
$table->integer('assigned_to');
|
|
||||||
$table->text('notes');
|
|
||||||
$table->integer('user_id')->nullable();
|
|
||||||
$table->timestamps();
|
|
||||||
$table->engine = 'InnoDB';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,6 +26,6 @@ class CreateTempLicensesTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('licenses');
|
// Schema::dropIfExists('licenses');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,22 +11,23 @@ class ReCreateLicensesTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
//
|
if (!Schema::hasTable('licenses')) {
|
||||||
Schema::create('licenses', function ($table) {
|
Schema::create('licenses', function ($table) {
|
||||||
$table->increments('id');
|
$table->increments('id');
|
||||||
$table->string('name');
|
$table->string('name');
|
||||||
$table->string('serial');
|
$table->string('serial');
|
||||||
$table->date('purchase_date')->nullable();
|
$table->date('purchase_date')->nullable();
|
||||||
$table->decimal('purchase_cost', 8, 2)->nullable();
|
$table->decimal('purchase_cost', 8, 2)->nullable();
|
||||||
$table->string('order_number');
|
$table->string('order_number');
|
||||||
$table->integer('seats');
|
$table->integer('seats');
|
||||||
$table->text('notes');
|
$table->text('notes');
|
||||||
$table->integer('user_id')->nullable();
|
$table->integer('user_id')->nullable();
|
||||||
$table->integer('depreciation_id');
|
$table->integer('depreciation_id');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->softDeletes();
|
$table->softDeletes();
|
||||||
$table->engine = 'InnoDB';
|
$table->engine = 'InnoDB';
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue