if not exists(select * from syscolumns where id=object_id('gresmanager_goods') and name='goods_allow_discount')
ALTER TABLE gresmanager_goods ADD goods_allow_discount int NULL DEFAULT (0)
GO
UPDATE gresmanager_goods SET goods_allow_discount=0
GO
if not exists(select * from syscolumns where id=object_id('gresmanager_table_consume_detail') and name='detail_discount')
ALTER TABLE gresmanager_table_consume_detail ADD detail_discount decimal(18,4) NOT NULL DEFAULT (1)
GO
UPDATE gresmanager_table_consume_detail SET detail_discount=1
GO
if not exists(select * from syscolumns where id=object_id('gresmanager_consume_bill_tmp') and name='bill_deposit')
ALTER TABLE gresmanager_consume_bill_tmp ADD bill_deposit decimal(18,4) NULL DEFAULT (0)
GO
UPDATE gresmanager_consume_bill_tmp SET bill_deposit=0
GO