RENAME TABLE IF EXISTS stock.inbound TO stock.buyLot;

ALTER TABLE stock.buyLot
	DROP KEY source,
	DROP COLUMN tableName,
	CHANGE tableId lotFk int(10) unsigned NOT NULL,
	CHANGE isSync isSync tinyint(4) NOT NULL AFTER lotFk,
	DROP PRIMARY KEY,
	DROP COLUMN id,
	ADD PRIMARY KEY (lotFk);
