Anonymous avatar Anonymous committed a65d014

Project

Comments (0)

Files changed (3)

 syntax: glob
 *~$*
+*.~*
+fbemb/*
+src/backup/*
+src/lib/*
+src/*.exe
+src/*.dbg

Binary file modified.

+SET SQL DIALECT 3;
+CREATE DATABASE 'd:\freelance\docbase\fbemb\db\db.fdb'
+USER 'SYSDBA' PASSWORD 'masterkey' PAGE_SIZE 4096
+DEFAULT CHARACTER SET UTF8;
+
 /******************************************************************************/
 /***                                Domains                                 ***/
 /******************************************************************************/
 
 
 /******************************************************************************/
+/***                  Generators for autoincrement fields                   ***/
+/******************************************************************************/
+
+CREATE GENERATOR GEN_APPLICATION_ID;
+SET GENERATOR GEN_APPLICATION_ID TO 0;
+
+CREATE GENERATOR GEN_APPLICATION_CARGO_ID;
+SET GENERATOR GEN_APPLICATION_CARGO_ID TO 0;
+
+CREATE GENERATOR GEN_CARGO_ID;
+SET GENERATOR GEN_CARGO_ID TO 0;
+
+CREATE GENERATOR GEN_CARGO_WAYBILL_ID;
+SET GENERATOR GEN_CARGO_WAYBILL_ID TO 0;
+
+CREATE GENERATOR GEN_CLIENTS_ID;
+SET GENERATOR GEN_CLIENTS_ID TO 0;
+
+CREATE GENERATOR GEN_CONTRACT_ID;
+SET GENERATOR GEN_CONTRACT_ID TO 0;
+
+
+
+/******************************************************************************/
 /***                               Exceptions                               ***/
 /******************************************************************************/
 
 
 SET TERM ^ ;
 
+
+
+/******************************************************************************/
+/***                   Triggers for autoincrement fields                    ***/
+/******************************************************************************/
+
+CREATE TRIGGER APPLICATION_BI FOR APPLICATION
+ACTIVE BEFORE INSERT POSITION 0
+AS
+BEGIN
+  IF (NEW.ID IS NULL) THEN
+    NEW.ID = GEN_ID(GEN_APPLICATION_ID, 1);
+END^
+
+
+CREATE TRIGGER APPLICATION_CARGO_BI FOR APPLICATION_CARGO
+ACTIVE BEFORE INSERT POSITION 0
+AS
+BEGIN
+  IF (NEW.ID IS NULL) THEN
+    NEW.ID = GEN_ID(GEN_APPLICATION_CARGO_ID, 1);
+END^
+
+
+CREATE TRIGGER CARGO_BI FOR CARGO
+ACTIVE BEFORE INSERT POSITION 0
+AS
+BEGIN
+  IF (NEW.ID IS NULL) THEN
+    NEW.ID = GEN_ID(GEN_CARGO_ID, 1);
+END^
+
+
+CREATE TRIGGER CARGO_WAYBILL_BI FOR CARGO_WAYBILL
+ACTIVE BEFORE INSERT POSITION 0
+AS
+BEGIN
+  IF (NEW.ID IS NULL) THEN
+    NEW.ID = GEN_ID(GEN_CARGO_WAYBILL_ID, 1);
+END^
+
+
+CREATE TRIGGER CLIENTS_BI FOR CLIENTS
+ACTIVE BEFORE INSERT POSITION 0
+AS
+BEGIN
+  IF (NEW.ID IS NULL) THEN
+    NEW.ID = GEN_ID(GEN_CLIENTS_ID, 1);
+END^
+
+
+CREATE TRIGGER CONTRACT_BI FOR CONTRACT
+ACTIVE BEFORE INSERT POSITION 0
+AS
+BEGIN
+  IF (NEW.ID IS NULL) THEN
+    NEW.ID = GEN_ID(GEN_CONTRACT_ID, 1);
+END^
+
 SET TERM ; ^
 
 /******************************************************************************/
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.