CREATE TABLE IF NOT EXISTS tblpromotional_campaigns (
  id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  campaign_name VARCHAR(250) NOT NULL,
  campaign_code VARCHAR(250) NOT NULL,
  discount_percent FLOAT(5,2) NOT NULL,
  start_date DATETIME,
  end_date DATETIME,
  type ENUM('always','event_based') NOT NULL,
  users_current_plan VARCHAR(100) NOT NULL,
  after_how_many_days INT(4),
  data longtext,
  priority FLOAT(5,2) NOT NULL DEFAULT 1,
  PRIMARY KEY (id)
) ENGINE=INNODB DEFAULT CHARSET=utf8 ;

ALTER TABLE tblpromotional_campaigns ADD added_by_admin_id bigint(20) DEFAULT NULL;
ALTER TABLE tblpromotional_campaigns ADD updated_by_admin_id bigint(20) DEFAULT NULL;
ALTER TABLE tblpromotional_campaigns ADD added_on DATETIME NULL;
ALTER TABLE tblpromotional_campaigns ADD updated_on DATETIME NULL;