
-- ADD one more column  sys_ver_apk_url
Select * from sys_ver (NOLOCK)

Alter table sys_ver  ADD sys_ver_apk_url varchar(200);
----------------------------------------------------------------------------------------------
--ADD New Table tkn_mst
CREATE TABLE [dbo].[tkn_mst](
	[tkn_dvc_id] [varchar](50) NULL,
	[tkn_brand] [varchar](50) NULL,
	[tkn_model] [varchar](50) NULL,
	[tkn_token] [varchar](300) NULL,
	[tkn_user] [varchar](50) NULL,
	[tkn_site] [varchar](4) NULL,
	[tkn_login] [datetime] NULL,
	[tkn_logout] [datetime] NULL,
	[tkn_online] [varchar](1) NULL,
	[RowID] [numeric](12, 0) IDENTITY(1,1) NOT NULL
) ON [PRIMARY]

GO
----------------------------------------------------------------------------------------------
--For Acknowledgement rating we adding this columns

alter table wko_det
add wko_det_rating1 numeric(21,4) null

alter table wko_det
add wko_det_rating2 numeric(21,4) null

alter table wko_det
add wko_det_rating3 numeric(21,4) null

alter table wko_det
add wko_det_ack_name varchar (60) null

alter table wko_det
add wko_det_ack_id varchar (60) null

alter table wko_det
add wko_det_ack_contact varchar (20) null

alter table wko_det
add wko_det_ack_date datetime null

--After Creat the column next steps 

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_rating1'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wko_det', 'wko_det_rating1', 
		'Rating 1:', 
		'Rating 1:', 
		'Rating 1', 
		'Rating 1', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_rating2'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wko_det', 'wko_det_rating2', 
		'Rating 2:', 
		'Rating 2:', 
		'Rating 2', 
		'Rating 2', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_rating3'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wko_det', 'wko_det_rating3', 
		'Rating 3:', 
		'Rating 3:', 
		'Rating 3', 
		'Rating 3', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_ack_name'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wko_det', 'wko_det_ack_name', 
		'Acknowledge By:', 
		'Acknowledge By:', 
		'Acknowledge By', 
		'Acknowledge By', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_ack_id'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wko_det', 'wko_det_ack_id', 
		'Acknowledge ID:', 
		'Acknowledge ID:', 
		'Acknowledge ID', 
		'Acknowledge ID', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_ack_contact'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 
SELECT 	language_cd, 'wko_det', 'wko_det_ack_contact', 
		'Contact:', 
		'Contact:', 
		'Contact', 
		'Contact', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO


DELETE	cf_label
WHERE	table_name = 'wko_det'
AND 	column_name = 'wko_det_ack_date'
GO

INSERT 	cf_label (language_cd, table_name, column_name, 
		default_label,
		customize_label, 
		default_header, 
		customize_header, 
		cfr_flag, cf_label_required, audit_user, audit_date ) 

SELECT 	language_cd, 'wko_det', 'wko_det_ack_date', 
		'Acknowledge Date:', 
		'Date:', 
		'Acknowledge Date', 
		'Date', 
		'0', '0', 'admin', getdate() 
FROM	cf_language 
GO

-------------------------------------------------------------------------------------------------------
--Add date on wko_ls7
alter table wko_ls7
add wko_ls7_date3 datetime null
--------------------------------------------------------------------------------------------------------