YES - it worked
adding --set-vars="foreign_key_checks=0" took care of it thx
pt-online-schema-change -uxxxxxxxx -pxxxxx h=127.0.0.1,D=sku,t=subscription_elements -P3306 --alter "ADD COLUMN country_id TINYINT(3) UNSIGNED default 228 NOT NULL, ADD COLUMN language_id TINYINT(3) UNSIGNED default 44 NOT NULL, ADD CONSTRAINT fk_se_country_1 FOREIGN KEY (country_id) REFERENCES country(country_id) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT fk_se_language_1 FOREIGN KEY (language_id) REFERENCES language(language_id) ON DELETE NO ACTION ON UPDATE NO ACTION" --alter-foreign-keys-method=auto --execute --set-vars="foreign_key_checks=0" No foreign keys reference `sku`.`subscription_elements`; ignoring --alter-foreign-keys-method. Altering `sku`.`subscription_elements`... Creating new table... Created new table sku._subscription_elements_new OK. Altering new table... Altered `sku`.`_subscription_elements_new` OK. Creating triggers... Created triggers OK. Copying approximately 1803540 rows... Copying `sku`.`subscription_elements`: 16% 02:30 remain Copying `sku`.`subscription_elements`: 28% 02:26 remain Copying `sku`.`subscription_elements`: 39% 02:15 remain Copying `sku`.`subscription_elements`: 50% 01:59 remain Copying `sku`.`subscription_elements`: 64% 01:23 remain Copying `sku`.`subscription_elements`: 75% 00:59 remain Copying `sku`.`subscription_elements`: 87% 00:29 remain Copied rows OK. Swapping tables... Swapped original and new tables OK. Dropping old table... Dropped old table `sku`.`_subscription_elements_old` OK. Dropping triggers... Dropped triggers OK. Successfully altered `sku`.`subscription_elements`.
YES - it worked
adding --set-vars= "foreign_ key_checks= 0"
took care of it
thx
pt-online- schema- change -uxxxxxxxx -pxxxxx h=127.0. 0.1,D=sku, t=subscription_ elements -P3306 --alter "ADD COLUMN country_id TINYINT(3) UNSIGNED default 228 NOT NULL, ADD COLUMN language_id TINYINT(3) UNSIGNED default 44 NOT NULL, ADD CONSTRAINT fk_se_country_1 FOREIGN KEY (country_id) REFERENCES country(country_id) ON DELETE NO ACTION ON UPDATE NO ACTION, ADD CONSTRAINT fk_se_language_1 FOREIGN KEY (language_id) REFERENCES language( language_ id) ON DELETE NO ACTION ON UPDATE NO ACTION" --alter- foreign- keys-method= auto --execute --set-vars= "foreign_ key_checks= 0" subscription_ elements` ; ignoring --alter- foreign- keys-method. subscription_ elements` ... on_elements_ new OK. _subscription_ elements_ new` OK. subscription_ elements` : 16% 02:30 remain subscription_ elements` : 28% 02:26 remain subscription_ elements` : 39% 02:15 remain subscription_ elements` : 50% 01:59 remain subscription_ elements` : 64% 01:23 remain subscription_ elements` : 75% 00:59 remain subscription_ elements` : 87% 00:29 remain _subscription_ elements_ old` OK. subscription_ elements` .
No foreign keys reference `sku`.`
Altering `sku`.`
Creating new table...
Created new table sku._subscripti
Altering new table...
Altered `sku`.`
Creating triggers...
Created triggers OK.
Copying approximately 1803540 rows...
Copying `sku`.`
Copying `sku`.`
Copying `sku`.`
Copying `sku`.`
Copying `sku`.`
Copying `sku`.`
Copying `sku`.`
Copied rows OK.
Swapping tables...
Swapped original and new tables OK.
Dropping old table...
Dropped old table `sku`.`
Dropping triggers...
Dropped triggers OK.
Successfully altered `sku`.`