-- 1. Enroll 表
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'Enroll')) 
 BEGIN 
 alter table Enroll add AdditionalCharge1 money NULL 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项1', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'Enroll')) 
 BEGIN 
 alter table Enroll add AdditionalCharge2 money NULL 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项2', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'Enroll')) 
 BEGIN 
 alter table Enroll add AdditionalCharge3 money NULL 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项3', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3'; 
 END 

IF not exists(select * from sys.columns where name='Note' and [object_id]=object_id(N'Enroll')) 
 BEGIN 
 alter table Enroll add Note nvarchar(1000) NULL 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项说明', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'Enroll', @level2type = N'COLUMN', @level2name = 'Note'; 
 END 

-- 2. TrialRevenuesPrice 表
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'TrialRevenuesPrice')) 
 BEGIN 
 alter table TrialRevenuesPrice add AdditionalCharge1 money NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项1', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'TrialRevenuesPrice')) 
 BEGIN 
 alter table TrialRevenuesPrice add AdditionalCharge2 money NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项2', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'TrialRevenuesPrice')) 
 BEGIN 
 alter table TrialRevenuesPrice add AdditionalCharge3 money NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项3', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3'; 
 END 

IF not exists(select * from sys.columns where name='Note' and [object_id]=object_id(N'TrialRevenuesPrice')) 
 BEGIN 
 alter table TrialRevenuesPrice add Note nvarchar(1000) NULL 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项说明', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPrice', @level2type = N'COLUMN', @level2name = 'Note'; 
 END 

-- 3. DoctorWorkload 表
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'DoctorWorkload')) 
 BEGIN 
 alter table DoctorWorkload add AdditionalCharge1 money NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项1', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'DoctorWorkload')) 
 BEGIN 
 alter table DoctorWorkload add AdditionalCharge2 money NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项2', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'DoctorWorkload')) 
 BEGIN 
 alter table DoctorWorkload add AdditionalCharge3 money NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项3', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3'; 
 END 

IF not exists(select * from sys.columns where name='Note' and [object_id]=object_id(N'DoctorWorkload')) 
 BEGIN 
 alter table DoctorWorkload add Note nvarchar(1000) NULL 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项说明', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'DoctorWorkload', @level2type = N'COLUMN', @level2name = 'Note'; 
 END 

-- 4. TrialRevenuesPriceVerification 表 (类型保持为 bit)
IF not exists(select * from sys.columns where name='AdditionalCharge1' and [object_id]=object_id(N'TrialRevenuesPriceVerification')) 
 BEGIN 
 alter table TrialRevenuesPriceVerification add AdditionalCharge1 bit NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项1是否配置', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPriceVerification', @level2type = N'COLUMN', @level2name = 'AdditionalCharge1'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge2' and [object_id]=object_id(N'TrialRevenuesPriceVerification')) 
 BEGIN 
 alter table TrialRevenuesPriceVerification add AdditionalCharge2 bit NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项2是否配置', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPriceVerification', @level2type = N'COLUMN', @level2name = 'AdditionalCharge2'; 
 END 

IF not exists(select * from sys.columns where name='AdditionalCharge3' and [object_id]=object_id(N'TrialRevenuesPriceVerification')) 
 BEGIN 
 alter table TrialRevenuesPriceVerification add AdditionalCharge3 bit NOT NULL DEFAULT 0 
  EXEC sp_addextendedproperty @name = N'MS_Description',  @value = N'扩展付费项3是否配置', @level0type = N'SCHEMA', @level0name = 'dbo', @level1type = N'TABLE', @level1name = 'TrialRevenuesPriceVerification', @level2type = N'COLUMN', @level2name = 'AdditionalCharge3'; 
 END 