View Issue Details

IDProjectCategoryView StatusLast Update
0000623ГРАНИТGeneralpublic2014-02-21 15:09
Reporterruslan Assigned Tobarry  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Summary0000623: +База данных- Новая таблица для ДК
DescriptionДобавь в базу таблицу для ДК.
TagsNo tags attached.

Activities

ruslan

2014-02-13 20:33

manager  

dk_giftcertificate.txt (3,789 bytes)   
/******************************************************************************/
/***               Generated by IBExpert 06.02.2014 10:02:26                ***/
/******************************************************************************/

/******************************************************************************/
/***      Following SET SQL DIALECT is just for the Database Comparer       ***/
/******************************************************************************/
SET SQL DIALECT 3;



/******************************************************************************/
/***                                 Tables                                 ***/
/******************************************************************************/


CREATE GENERATOR DK_GIFTCERTIFICATE_ID;

CREATE TABLE DK_GIFTCERTIFICATE (
    ID       INTEGER NOT NULL,
    GDSID    INTEGER NOT NULL,
    SZID     INTEGER,
    TYP      SMALLINT DEFAULT 0 NOT NULL,
    BARCODE  VARCHAR(20) NOT NULL,
    PRICE    DOUBLE PRECISION NOT NULL
);




/******************************************************************************/
/***                              Primary Keys                              ***/
/******************************************************************************/

ALTER TABLE DK_GIFTCERTIFICATE ADD CONSTRAINT DK_GIFTCERTIFICATE_PK PRIMARY KEY (ID);


/******************************************************************************/
/***                              Foreign Keys                              ***/
/******************************************************************************/

ALTER TABLE DK_GIFTCERTIFICATE ADD CONSTRAINT DK_GIFTCERTIFICATE_FK FOREIGN KEY (GDSID) REFERENCES GOODS (ID);


/******************************************************************************/
/***                                Triggers                                ***/
/******************************************************************************/


SET TERM ^ ;



/******************************************************************************/
/***                          Triggers for tables                           ***/
/******************************************************************************/



/* Trigger: DK_GIFTCERTIFICATE_BI */
CREATE OR ALTER TRIGGER DK_GIFTCERTIFICATE_BI FOR DK_GIFTCERTIFICATE
ACTIVE BEFORE INSERT POSITION 0
as
begin
  if (New.ID is Null) then New.ID = Gen_ID(DK_GIFTCERTIFICATE_ID,  1);
end
^


SET TERM ; ^



/******************************************************************************/
/***                              Descriptions                              ***/
/******************************************************************************/

COMMENT ON TABLE DK_GIFTCERTIFICATE IS 
'Движения подарочных сертификатов';



/******************************************************************************/
/***                          Fields descriptions                           ***/
/******************************************************************************/

COMMENT ON COLUMN DK_GIFTCERTIFICATE.TYP IS 
'0 - OUT - Сертификат продали;
1 - IN - Сертификатом оплатили заказ;';

COMMENT ON COLUMN DK_GIFTCERTIFICATE.BARCODE IS 
'Штрих-код сертификата';

COMMENT ON COLUMN DK_GIFTCERTIFICATE.PRICE IS 
'Номинальная стоимость сертификата';



/******************************************************************************/
/***                               Privileges                               ***/
/******************************************************************************/
dk_giftcertificate.txt (3,789 bytes)   

barry

2014-02-17 07:59

administrator   ~0001502

mebl_ib5.zip

Issue History

Date Modified Username Field Change
2014-02-13 20:33 ruslan New Issue
2014-02-13 20:34 ruslan File Added: dk_giftcertificate.txt
2014-02-17 07:59 barry Note Added: 0001502
2014-02-17 07:59 barry Status new => resolved
2014-02-17 07:59 barry Resolution open => fixed
2014-02-17 07:59 barry Assigned To => barry
2014-02-21 15:09 ruslan Status resolved => closed