 /* INVENTORY MANAGEMENT SYSTEM TABLES */
 /* --------------------------------------------------------------------------*/
-
 DROP TABLE IF EXISTS `ims_item_records`;
 CREATE TABLE ims_item_records
 (

	equipment VARCHAR(100),
	resources TEXT,
	space VARCHAR(100),
	PRIMARY KEY(inv_uuid)	
);


	PRIMARY KEY(catalog_id,inv_id)
);

DROP TABLE IF EXISTS `ims_optimization`;
CREATE TABLE ims_optimization
(
/*	optim_id BIGINT NOT NULL AUTO_INCREMENT,*/

	catalog_id VARCHAR(100),
	inv_id BIGINT,
	week BIGINT,
	actual_value VARCHAR(50),
	forecasted_value VARCHAR(50),
	unit VARCHAR(20),
	PRIMARY KEY(catalog_id,inv_id,week)
);


DROP TABLE IF EXISTS `ims_alternate`;
CREATE TABLE ims_alternate
(
	alternate_id BIGINT NOT NULL AUTO_INCREMENT,
	catalog_id VARCHAR(100),
	inv_id BIGINT,
	alternate VARCHAR(100),
	PRIMARY KEY(alternate_id)
);

DROP TABLE IF EXISTS `ims_relation`;
CREATE TABLE ims_relation
(
	relation_id BIGINT NOT NULL AUTO_INCREMENT,
	catalog_id VARCHAR(100),
	inv_id BIGINT,
	relation VARCHAR(100),
	PRIMARY KEY(relation_id)
);

