--增加资金流水中的充值是否成功字段
alter table [MoneyAccount] add [Ma_IsSuccess] bit  NULL
go
update [MoneyAccount] set [Ma_IsSuccess]=1
go
alter table [MoneyAccount] ALTER COLUMN [Ma_IsSuccess] bit  NOT NULL
go
--增加资金流水中的充值时的接口ID
alter table [MoneyAccount] add Pai_ID int  NULL
go
update [MoneyAccount] set Pai_ID=0
go
alter table [MoneyAccount] ALTER COLUMN Pai_ID int  NOT NULL
go

/****** Object:  Table [dbo].[PayInterface]    Script Date: 11/13/2015 18:07:20 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[PayInterface]') AND type in (N'U'))
DROP TABLE [dbo].[PayInterface]
GO

USE [QuestionBank]
GO

/****** Object:  Table [dbo].[PayInterface]    Script Date: 11/13/2015 18:07:20 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[PayInterface](
	[Pai_ID] [int] IDENTITY(1,1) NOT NULL,
	[Pai_Name] [nvarchar](255) NULL,
	[Pai_Pattern] [nvarchar](255) NULL,
	[Pai_Tax] [int] NOT NULL,
	[Pai_Intro] [nvarchar](1000) NULL,
	[Pai_Currency] [nvarchar](255) NULL,
	[Pai_Platform] [nvarchar](255) NULL,
	[Pai_ParterID] [nvarchar](255) NULL,
	[Pai_Key] [nvarchar](255) NULL,
	[Pai_InterfaceType] [nvarchar](255) NULL,
	[Pai_Feerate] [real] NOT NULL,
	[Pai_Config] [nvarchar](max) NULL,
	[Pai_IsEnable] [bit] NOT NULL,
	[Org_ID] [int] NOT NULL,
 CONSTRAINT [PK_PayInterface] PRIMARY KEY CLUSTERED 
(
	[Pai_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO


