﻿CREATE TABLE [dbo].[MtzProgPending] (
    [idxPending]  INT             IDENTITY (1, 1) NOT NULL,
    [idxIntPro]   INT             NOT NULL,
    [idxMacchina] INT             NULL,
    [data]        DATETIME        NULL,
    [descrizione] NVARCHAR (2500) NULL,
    [idxPriorita] INT             NULL,
    [isFermo]     BIT             CONSTRAINT [DF_MtzProgPending_isFermo] DEFAULT ((1)) NULL,
    [idxTipo]     INT             NULL,
    CONSTRAINT [PK_MtzProgPending] PRIMARY KEY CLUSTERED ([idxPending] ASC),
    CONSTRAINT [FK_MtzProgPending_MtzProgrammata] FOREIGN KEY ([idxIntPro]) REFERENCES [dbo].[MtzProgrammata] ([idxIntPro]) ON DELETE CASCADE ON UPDATE CASCADE
);

