RENAME TABLE IF EXISTS stock.outbound TO stock.buyOut;

ALTER TABLE stock.buyOut
	CHANGE IF EXISTS tableName source enum('buy','sale','orderRow') CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
	CHANGE IF EXISTS id outFk int(10) UNSIGNED NOT NULL,
	DROP INDEX IF EXISTS source,
	DROP COLUMN IF EXISTS tableId,
	DROP INDEX IF EXISTS expired,
	DROP COLUMN IF EXISTS expired,
	ADD INDEX IF NOT EXISTS (source);
