USE [cmod]
GO
/****** Object:  Table [dbo].[CM_USERS]    Script Date: 08/11/2024 13:57:02 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[CM_USERS](
	[USERID] [varchar](25) NOT NULL,
	[PASSWORD] [varchar](100) NULL,
 CONSTRAINT [PK_USERS] PRIMARY KEY CLUSTERED 
(
	[USERID] 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
CREATE TABLE [dbo].[CM_TUBES](
	[TUBEID] [int] IDENTITY(1,1) NOT NULL,
	[ACCESSNUMBER] [varchar](10) NULL,
	[SAMPLETYPE] [varchar](10) NULL,
	[COLLECTIONDATE] [datetime] NULL,
	[COLL_USERID] [varchar](25) NULL,
	[COLLSTATUS] [varchar](1) NOT NULL,
	[CREATEDATE] [datetime] NULL,
 CONSTRAINT [PK_TUBES] PRIMARY KEY CLUSTERED 
(
	[TUBEID] 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

ALTER TABLE [dbo].[CM_TUBES] ADD  CONSTRAINT [DF_TUBES_STATUS]  DEFAULT ((0)) FOR [COLLSTATUS]
GO

