/*
   01 Agustus 20189:04:14
   User: 
   Server: dev-db01
   Database: AJK
   Application: 
*/

/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
COMMIT
BEGIN TRANSACTION
GO
CREATE TABLE dbo.custport_m_bank
	(
	bank_id int NOT NULL IDENTITY (1, 1),
	bank_name varchar(100) NOT NULL,
	bank_code varchar(5) NULL,
	swiftcode varchar(20) NULL,
	created_by varchar(15) NOT NULL,
	created_date datetime NOT NULL,
	modified_by varchar(15) NULL,
	modified_date datetime NULL,
	is_active bit NOT NULL
	)  ON [PRIMARY]
GO
ALTER TABLE dbo.custport_m_bank ADD CONSTRAINT
	DF_custport_m_bank_created_date DEFAULT GETDATE() FOR created_date
GO
ALTER TABLE dbo.custport_m_bank ADD CONSTRAINT
	DF_custport_m_bank_is_active DEFAULT 1 FOR is_active
GO
ALTER TABLE dbo.custport_m_bank ADD CONSTRAINT
	PK_custport_m_bank PRIMARY KEY CLUSTERED 
	(
	bank_id
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

GO
ALTER TABLE dbo.custport_m_bank ADD CONSTRAINT
	IX_custport_m_bank_bank_name UNIQUE NONCLUSTERED 
	(
	bank_name
	) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

GO
ALTER TABLE dbo.custport_m_bank SET (LOCK_ESCALATION = TABLE)
GO
COMMIT
