-- Schema: ndiscount
-- Brief: NDiscount component controller
-- Created by: ldlima
-- Table schema_version: must be defined for database update through the NDiscountPersistence component

CREATE TABLE schema_version AS
SELECT "$Author: ldlima $" AS Author,
       "$Date: 2020-09-25 16:30:00 -0300$" AS LastModifiedAt,
       "$Revision: a87ea4567d8eabee5e385baea8a9f43a5403f010$" AS Revision;

-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CREATE TABLE StoredBenefits (
  Id INTEGER NOT NULL PRIMARY KEY,
  BenefitId VARCHAR NOT NULL,
  BenefitJSON VARCHAR NOT NULL
);

CREATE UNIQUE INDEX 'idx_StoredBenefits_Id' ON 'StoredBenefits' ('Id');
CREATE UNIQUE INDEX 'idx_StoredBenefits_BenefitId' ON 'StoredBenefits' ('BenefitId');
