/*==============================================================*/
/* Upgrade struktury z wersji 85 do 86                          */
/*==============================================================*/

/* ============================================================ */
/*   Table: LotControlProfile                                   */
/* ============================================================ */
CREATE TABLE LotControlProfile (
    LotProfileId                    INTEGER         PRIMARY KEY AUTOINCREMENT,
    Name                            text(255)       NOT NULL,
    IsActive                        SMALLINT        NOT NULL,
    LotSupportType                  SMALLINT        NOT NULL,
    CreateLotOnDelivery             SMALLINT        NOT NULL,
    LotNumberUniqueCheck            SMALLINT        NOT NULL,
    SelectLotOnOutcome              SMALLINT        NOT NULL,
    SelectLotOnDeliveryCorrection   SMALLINT        NOT NULL,
    Description1                    text(255)       NULL,
    Description2                    text(255)       NULL,
    Description3                    text(255)       NULL,
    Description4                    text(255)       NULL,
    ExternalId                      VARCHAR(20)     NULL,
    Creation                        datetime        NULL,
    LastUpdate                      datetime        NULL,
    SelectLotOnReceipt              SMALLINT        NOT NULL,
    EnterSalesPrice                 SMALLINT        NOT NULL,
    EnterExpirationDate             SMALLINT        NOT NULL,
    EnterLotNumber                  SMALLINT        NOT NULL,
    EnterLotDescriptions            SMALLINT        NOT NULL,
    DefaultSalesPrice               SMALLINT        NOT NULL
)
GO

/* Update numeru struktury */
UPDATE StructureVersion SET Version = 86
GO
