IF NOT EXISTS (SELECT * FROM sysobjects WHERE name = 'IRI_Drugs')
BEGIN
    CREATE TABLE [dbo].[IRI_Drugs]
    (
        [Id] [INT] IDENTITY(1, 1) NOT NULL,
        [Code] [VARCHAR](50) NOT NULL,
        [Name] [NVARCHAR](MAX) NULL,
        [Description] [NVARCHAR](MAX) NULL,
        [IsActive] [BIT] NULL,
        [InsertDate] [SMALLDATETIME] NULL,
        CONSTRAINT [PK_IRI_Drugs]
            PRIMARY KEY CLUSTERED ([Id] ASC)
    ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY];

    ALTER TABLE [dbo].[IRI_Drugs]
    ADD CONSTRAINT [DF__IRI_Drugs__Inser__200F4ABB]
    DEFAULT (GETDATE()) FOR [InsertDate];
END;