charlescng / docker-containers

Docker containers and unRAID docker templates
10 stars 11 forks source link

Could only add one device #9

Closed jdeluyck closed 3 years ago

jdeluyck commented 3 years ago

Just installed the https://hub.docker.com/r/uberchuckie/observium container.

Observium started, but I could only add one device. After some digging i found out the db was missing auto_increment on the device_id column.

alter table devices change column device_id device_id int(11) not null auto_increment;

fixed it. Perhaps something to take along?

charlescng commented 3 years ago

I can't reproduce this problem. I can add multiple devices and I see multiple rows in the devices table.

MariaDB [observium]> select device_id from devices;
+-----------+
| device_id |
+-----------+
|         1 |
|         2 |
+-----------+
2 rows in set (0.000 sec)
MariaDB [observium]> describe devices device_id;
+-----------+---------+------+-----+---------+----------------+
| Field     | Type    | Null | Key | Default | Extra          |
+-----------+---------+------+-----+---------+----------------+
| device_id | int(11) | NO   | PRI | NULL    | auto_increment |
+-----------+---------+------+-----+---------+----------------+
1 row in set (0.000 sec)

Tested with https://hub.docker.com/layers/uberchuckie/observium/latest/images/sha256-919fe1279f1c8c3262e939f128c3564f492a340be102af5f638d48e72dec9a9e?context=explore