diff --git a/database/migrations/2024_10_06_002633_ports_vlans_table_add_port_id_index.php b/database/migrations/2024_10_06_002633_ports_vlans_table_add_port_id_index.php new file mode 100644 index 0000000000..bf15b67f4a --- /dev/null +++ b/database/migrations/2024_10_06_002633_ports_vlans_table_add_port_id_index.php @@ -0,0 +1,28 @@ +index('port_id'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('ports_vlans', function (Blueprint $table) { + $table->dropIndex('ports_vlans_port_id_index'); + }); + } +}; diff --git a/misc/db_schema.yaml b/misc/db_schema.yaml index 24eb144ba8..e80df0b0a3 100644 --- a/misc/db_schema.yaml +++ b/misc/db_schema.yaml @@ -1794,6 +1794,7 @@ ports_vlans: Indexes: PRIMARY: { Name: PRIMARY, Columns: [port_vlan_id], Unique: true, Type: BTREE } ports_vlans_device_id_port_id_vlan_unique: { Name: ports_vlans_device_id_port_id_vlan_unique, Columns: [device_id, port_id, vlan], Unique: true, Type: BTREE } + ports_vlans_port_id_index: { Name: ports_vlans_port_id_index, Columns: [port_id], Unique: false, Type: BTREE } port_groups: Columns: - { Field: id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }