if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[object_versions]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[object_versions] go create table [dbo].[object_versions] ( [dbname] [nvarchar] (128) not null , [name] [nvarchar] (128) not null , [schema_ver] [int] not null , [version_date] [datetime] not null , [uid] [smallint] not null , [object_create_date] [datetime] not null , [xtype] [char] (2) not null , [dflag] [bit] null ) on [PRIMARY] go alter table [dbo].[object_versions] with nocheck add constraint [pk_object_version] primary key clustered ( [dbname], [name], [schema_ver], [version_date], [uid] ) with fillfactor = 98 on [PRIMARY] go alter table [dbo].[object_versions] with nocheck add constraint [df_object_version_check_date] default (getdate()) for [version_date] go