With the most recent upgrade, something went wrong with the database migrations for recorder, I then dumped my whole db, not overally fussed and now it can not create .
sqlalchemy.exc.OperationalError: (MySQLdb.OperationalError) (3780, "Referencing column 'metadata_id' and referenced column 'id' in foreign key constraint 'statistics_short_term_ibfk_1' are incompatible.")
[SQL:
CREATE TABLE statistics_short_term (
metadata_id INTEGER,
id BIGINT NOT NULL AUTO_INCREMENT,
created CHAR(0),
created_ts DOUBLE,
start CHAR(0),
start_ts DOUBLE,
mean DOUBLE,
mean_weight DOUBLE,
min DOUBLE,
max DOUBLE,
last_reset CHAR(0),
last_reset_ts DOUBLE,
state DOUBLE,
sum DOUBLE,
PRIMARY KEY (id),
FOREIGN KEY(metadata_id) REFERENCES statistics_meta (id) ON DELETE CASCADE
)DEFAULT CHARSET=utf8mb4 ENGINE=InnoDB COLLATE utf8mb4_unicode_ci
]
new db from sratch, recorder still can not work, I have tried many times, it gets this far;
MySQL [hass]> show tables;
+-------------------+
| Tables_in_hass |
+-------------------+
| event_data |
| event_types |
| events |
| migration_changes |
| recorder_runs |
| schema_changes |
| state_attributes |
| states |
| states_meta |
| statistics_meta |
| statistics_runs |
+-------------------+
11 rows in set (0.003 sec)