Skip to the content
Documentation

Clustered env upgrade sql

No ratings yet

There is a change in the table structure of the cluster db tables in 4.0.3, so if upgrading to anything above this you'll need to run something like this:

ALTER TABLE ezdbfile
	DROP INDEX ezdbfile_name,
	DROP INDEX ezdbfile_expired_name;

ALTER TABLE ezdbfile MODIFY name TEXT NOT NULL,
	ADD COLUMN name_trunk TEXT NOT NULL,
	MODIFY expired BOOL NOT NULL DEFAULT '0',
	ADD INDEX ezdbfile_name (name(250)),
	ADD INDEX ezdbfile_expired_name (expired, name(250)),
	ADD INDEX ezdbfile_name_trunk (name_trunk(250));

ALTER TABLE ezdbfile_data ADD CONSTRAINT ezdbfile_fk1 FOREIGN KEY (name_hash) REFERENCES ezdbfile (name_hash) ON DELETE CASCADE;

You can always