From 8d5d0b12c367d30333d1722b92f4d00e3723dfdf Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Thu, 21 Oct 2021 13:50:15 +1300 Subject: [PATCH] Increase length of devices_attribs.attrib_type column (#13395) * Increase length of devices_attribs.attrib_type column closes #13381 Signed-off-by: Mike Beattie * Update db_schema.yaml Co-authored-by: Tony Murray --- ..._increase_length_of_attrib_type_column.php | 32 +++++++++++++++++++ misc/db_schema.yaml | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php diff --git a/database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php b/database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php new file mode 100644 index 0000000000..b3ce6ee3d5 --- /dev/null +++ b/database/migrations/2021_10_20_224207_increase_length_of_attrib_type_column.php @@ -0,0 +1,32 @@ +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(); + }); + } +} diff --git a/misc/db_schema.yaml b/misc/db_schema.yaml index 4cd33db546..610fe7c818 100644 --- a/misc/db_schema.yaml +++ b/misc/db_schema.yaml @@ -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: