Open wid opened 3 years ago
Workaround
ALTER TABLE data_importer_importedobjects ADD CONSTRAINT temp_fix UNIQUE (content_type_id, object_pk, old_object_pk);
and run migrate
ALTER TABLE data_importer_importedobjects drop CONSTRAINT temp_fix;
and run migrate
Steps to reproduce
Install ralph onto mysql 8.0.23
Expected behavior
Actual behavior
Sometime it works, sometime I get this:
State of the database:
mysql> show create table data_importer_importedobjects \G 1. row Table: data_importer_importedobjects Create Table: CREATE TABLE
data_importer_importedobjects
(id
int NOT NULL AUTO_INCREMENT,created
datetime(6) NOT NULL,modified
datetime(6) NOT NULL,object_pk
int NOT NULL,old_object_pk
varchar(255) NOT NULL,content_type_id
int NOT NULL, PRIMARY KEY (id
), UNIQUE KEYdata_importer_importedobje_content_type_id_1cc729b58d8480f0_uniq
(content_type_id
,object_pk
,old_object_pk
), KEYdata_importer_importedobjects_120cc505
(object_pk
), KEYdata_importer_importedobjects_45b250e8
(old_object_pk
), KEYdata_importer_importedobjects_417f1b1c
(content_type_id
), CONSTRAINTdata__content_type_id_2132ebbc23fb1882_fk_django_content_type_id
FOREIGN KEY (content_type_id
) REFERENCESdjango_content_type
(id
) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 1 row in set (0.00 sec)Environment
I used my helm chart.