Increase length of devices_attribs.attrib_type column (#13395)

* Increase length of devices_attribs.attrib_type column

closes #13381

Signed-off-by: Mike Beattie <mike@ethernal.org>

* Update db_schema.yaml

Co-authored-by: Tony Murray <murraytony@gmail.com>
This commit is contained in:
Mike Beattie
2021-10-21 13:50:15 +13:00
committed by GitHub
parent aa6d685c9e
commit 8d5d0b12c3
2 changed files with 33 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class IncreaseLengthOfAttribTypeColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('devices_attribs', function (Blueprint $table) {
$table->string('attrib_type', 64)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('devices_attribs', function (Blueprint $table) {
$table->string('attrib_type', 32)->change();
});
}
}

View File

@@ -554,7 +554,7 @@ devices_attribs:
Columns:
- { Field: attrib_id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
- { Field: device_id, Type: 'int unsigned', 'Null': false, Extra: '' }
- { Field: attrib_type, Type: varchar(32), 'Null': false, Extra: '' }
- { Field: attrib_type, Type: varchar(64), 'Null': false, Extra: '' }
- { Field: attrib_value, Type: text, 'Null': false, Extra: '' }
- { Field: updated, Type: timestamp, 'Null': false, Extra: 'on update CURRENT_TIMESTAMP', Default: CURRENT_TIMESTAMP }
Indexes: