There is a pending schema migration which I can't fix

Hi,
There is a pending schema migration which I try to resolve by running

icingacli director migration run --verbose

I get this Error
ERROR: RuntimeException in /usr/local/share/icingaweb2/modules/director/library/Director/Db/Migration.php:60 with message: Migration 167 failed (SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘director_daemon_info’ already exists) while running CREATE TABLE director_daemon_info (
instance_uuid_hex VARCHAR(32) NOT NULL, – random by daemon
schema_version SMALLINT UNSIGNED NOT NULL,
fqdn VARCHAR(255) NOT NULL,
username VARCHAR(64) NOT NULL,
pid INT UNSIGNED NOT NULL,
binary_path VARCHAR(128) NOT NULL,
binary_realpath VARCHAR(128) NOT NULL,
php_binary_path VARCHAR(128) NOT NULL,
php_binary_realpath VARCHAR(128) NOT NULL,
php_version VARCHAR(64) NOT NULL,
php_integer_size SMALLINT NOT NULL,
running_with_systemd ENUM(‘y’, ‘n’) NOT NULL,
ts_started BIGINT(20) NOT NULL,
ts_stopped BIGINT(20) DEFAULT NULL,
ts_last_modification BIGINT(20) DEFAULT NULL,
ts_last_update BIGINT(20) DEFAULT NULL,
process_info MEDIUMTEXT NOT NULL,
PRIMARY KEY (instance_uuid_hex)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_bin

I don’t know how to resolve this

Thanks,
Shadi

What Director version are you using?
Is it a fresh isntallation or did you do an update?

What happens if you try applying the Schema migrations from the webinterface?

When I try to apply a pending schema migration through web interface I get the same error. The icinga director version is 1.7.2

1 Like

@log1c awesome , worked like a charm , Thanks :slight_smile: