--select * from Customer_Promotion

CREATE TABLE TBL_PROMOTION_MASTER_SETUP
(
	RowId TINYINT NOT NULL IDENTITY(1, 1) PRIMARY KEY
	, Points INT NOT NULL
	, IsActive BIT NOT NULL DEFAULT(1)
	, UpdatedBy VARCHAR(40) NULL
	, UpdatedDate DATETIME NULL
);

select * from TBL_PROMOTION_MASTER_SETUP
ALTER TABLE Customer_Promotion ADD EquivalentPoints INT

insert into TBL_PROMOTION_MASTER_SETUP
select 100, 1, null, null

CREATE TABLE TBL_PROMOTION_SETUP
(
	RowId INT NOT NULL IDENTITY(1, 1) PRIMARY KEY
	, Points INT NOT NULL
	, PromotionType VARCHAR(15) NOT NULL
	, IsActive BIT NOT NULL DEFAULT(1)
	, UpdatedBy VARCHAR(40) NULL
	, UpdatedDate DATETIME NULL
);

INSERT INTO TBL_PROMOTION_SETUP
SELECT 100, 'REGISTRATION', 1, NULL, NULL UNION
SELECT 400, 'TRANSACTION', 1, NULL, NULL


--SELECT * FROM TBL_PROMOTION_SETUP

--SELECT * FROM staticDataValue (NOLOCK) 
--	WHERE typeId = 8106
--	AND isActive = 'Y'


