/*==============================================================*/
/* Upgrade struktury z wersji 61 do 62                          */
/*==============================================================*/
create table DiscountDefined (
   DiscountDefinedId                INTEGER              PRIMARY KEY AUTOINCREMENT,
   IsActive                         smallint             not null,
   Type                             int                  not null,
   Name                             text(120)            not null,
   Purpose                          smallint             not null,
   DateFrom                         datetime             null,
   DateTo                           datetime             null,
   Days                             text(10)             not null,
   Hours                            text(1000)           not null,
   DefaultValue                     decimal(20,2)        not null,
   MaxValue                         decimal(20,2)        not null,
   IsEditable                       smallint             not null,
   IsObligatory                     smallint             not null,
   IsPriceModify                    smallint             not null,
   RestrictionType                  smallint             not null,
   PurchaseValueFrom                decimal(20,2)        not null,
   PurchaseValueTo                  decimal(20,2)        not null,
   ProductGroupId                   int                  null,
   Creation                         datetime             null,
   LastUpdate                       datetime             null,
   ExternalId                       text(20)             null
)
GO

UPDATE StructureVersion SET Version = 62
GO
