diff --git a/database/migrations/2020_03_24_0844_add_primary_key_to_device_graphs.php b/database/migrations/2020_03_24_0844_add_primary_key_to_device_graphs.php new file mode 100644 index 0000000000..d543c9c618 --- /dev/null +++ b/database/migrations/2020_03_24_0844_add_primary_key_to_device_graphs.php @@ -0,0 +1,39 @@ +bigIncrements('id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('device_graphs', function (Blueprint $table) { + $table->dropColumn('id'); + }); + } +} diff --git a/misc/db_schema.yaml b/misc/db_schema.yaml index 517f48f837..b6b7892032 100644 --- a/misc/db_schema.yaml +++ b/misc/db_schema.yaml @@ -545,7 +545,9 @@ device_graphs: Columns: - { Field: device_id, Type: 'int(10) unsigned', 'Null': false, Extra: '' } - { Field: graph, Type: varchar(255), 'Null': true, Extra: '' } + - { Field: id, Type: 'bigint(20) unsigned', 'Null': false, Extra: auto_increment } Indexes: + PRIMARY: { Name: PRIMARY, Columns: [id], Unique: true, Type: BTREE } device_id: { Name: device_id, Columns: [device_id], Unique: false, Type: BTREE } device_groups: Columns: