 	expire_date DATE,
 	cost_per_unit VARCHAR(100),
 	state VARCHAR(20),
-    inserted_date DATE,
+        inserted_date DATE,
+	total_amount VARCHAR(50),
+	predict_amount VARCHAR(50),
 	PRIMARY KEY(item_id)
 );
 

/* INVENTORY MANAGEMENT SYSTEM TABLES */
/* --------------------------------------------------------------------------*/

DROP TABLE IF EXISTS `ims_item_records`;
CREATE TABLE ims_item_records
(

	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)
);

