\echo Use "CREATE EXTENSION pgzint" to load this file. \quit

/* primary functions */
CREATE OR REPLACE FUNCTION bc_generate(
  pinput text,
  psymbology integer,
  pheight float8,
  pscale float8,
  pwhitespacewidth integer,
  pborderwidth integer,
  poutputoptions integer,
  pfgcolor text,
  pbgcolor text,
  pshowtext boolean,
  poption1 integer,
  poption2 integer,
  poption3 integer, 
  protation integer = 0
)
RETURNS bytea
AS 'MODULE_PATHNAME'
LANGUAGE C IMMUTABLE;

CREATE OR REPLACE FUNCTION bc_qrcode(pinput text)
RETURNS bytea
LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
  BEGIN
    RETURN(bc_generate(pinput, 58, NULL, 2, 0, NULL, NULL, NULL, NULL, NULL, NULL, 14, NULL, 0));
  END;
$$;

CREATE OR REPLACE FUNCTION bc_excode39(pinput text)
RETURNS bytea
LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
  BEGIN
    RETURN(bc_generate(pinput, 9, NULL, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0));
  END;
$$;

CREATE OR REPLACE FUNCTION bc_pdf417(pinput text)
RETURNS bytea
LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
  BEGIN
    RETURN(bc_generate(pinput, 55, NULL, 3, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0));
  END;
$$;

CREATE OR REPLACE FUNCTION bc_maxicode(pinput text)
RETURNS bytea
LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
  BEGIN
    RETURN(bc_generate(pinput, 57, 33, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0));
  END;
$$;

CREATE OR REPLACE FUNCTION bc_code128(pinput text)
RETURNS bytea
LANGUAGE plpgsql IMMUTABLE STRICT
AS $$
  BEGIN
    RETURN(bc_generate(pinput, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0));
  END;
$$;

CREATE OR REPLACE FUNCTION pgzint_version()
RETURNS TEXT
LANGUAGE plpgsql STABLE
AS $$
  BEGIN
    RETURN '0.2.0';
  END;
$$;

/* table to store barcode symbol information */
CREATE TABLE bc_symbols
(
  bc_symbol_id serial,
  bc_symbol_zint_id integer, -- ID of the Barcode from zint.h
  bc_symbol_zint_constant text, -- Defined constant of the Barcode from zint.h
  bc_symbol_name text, -- Name of the Barcode
  CONSTRAINT bc_symbol_id_pk PRIMARY KEY (bc_symbol_id),
  CONSTRAINT constant_id_unique UNIQUE NULLS NOT DISTINCT (bc_symbol_zint_id, bc_symbol_zint_constant)
)
WITH (
  OIDS=FALSE
);

COMMENT ON COLUMN bc_symbols.bc_symbol_zint_id IS 'ID of the Barcode from zint.h';
COMMENT ON COLUMN bc_symbols.bc_symbol_zint_constant IS 'Constant for the Barcode from zint.h';
COMMENT ON COLUMN bc_symbols.bc_symbol_name IS 'Name of the Barcode';

/*
  Convenience function to get symbol id from the defined constant
*/
CREATE OR REPLACE FUNCTION getzintsymbolid(pZintConstant text)
  RETURNS integer AS
$$
DECLARE
  _result INTEGER;
BEGIN
  IF (pZintConstant IS NULL) THEN
    RETURN NULL;
  END IF;

  SELECT bc_symbol_zint_id INTO _result
  FROM bc_symbols
  WHERE (bc_symbol_zint_constant=pZintConstant);

  IF (_result IS NULL) THEN
    RAISE EXCEPTION 'Barcode % was not found.', pZintConstant;
  END IF;

  RETURN _result;
END;
$$
  LANGUAGE plpgsql STABLE;

/*
  Convenience function to get the symbol constant from the defined id
*/
CREATE OR REPLACE FUNCTION getzintsymbolconstant(pZintId integer)
  RETURNS text AS
$$
DECLARE
  _result TEXT;
BEGIN
  IF (pZintId IS NULL) THEN
    RETURN NULL;
  END IF;

  SELECT bc_symbol_zint_constant INTO _result
  FROM bc_symbols
  WHERE (bc_symbol_zint_id=pZintId);

  IF (_result IS NULL) THEN
    RAISE EXCEPTION 'Barcode ID % was not found.', pZintId;
  END IF;

  RETURN _result;
END;
$$
  LANGUAGE plpgsql STABLE;

/*
  Default data for the bc_symbols table
*/
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE11',            1, 'Code 11');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_C25STANDARD',       2, '2 of 5 Standard (Matrix)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_C25MATRIX',         2, '2 of 5 Standard (Matrix) (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_C25INTER',          3, '2 of 5 Interleaved');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_C25IATA',           4, '2 of 5 IATA');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_C25LOGIC',          6, '2 of 5 Data Logic');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_C25IND',            7, '2 of 5 Industrial');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE39',            8, 'Code 39');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EXCODE39',          9, 'Extended Code 39');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN8',             10, 'EAN-8 (European Article Number) GTIN-8');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN_2ADDON',       11, 'EAN/UPC 2-digit add-on (standalone)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN_5ADDON',       12, 'EAN/UPC 5-digit add-on (standalone)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EANX',             13, 'Legacy EAN-13/8/5/2');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EANX_CHK',         14, 'Legacy EAN-13/8 with check digit');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN13',            15, 'EAN-13 (European Article Number) GTIN-13');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_GS1_128',          16, 'GS1-128');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN128',           16, 'GS1-128 (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODABAR',          18, 'Codabar');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE128',          20, 'Code 128');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DPLEIT',           21, 'Deutsche Post Leitcode');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DPIDENT',          22, 'Deutsche Post Identcode');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE16K',          23, 'Code 16k');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE49',           24, 'Code 49');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE93',           25, 'Code 93');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_FLAT',             28, 'Flattermarken');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_OMN',         29, 'GS1 DataBar Omnidirectional');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS14',            29, 'GS1 DataBar Omnidirectional (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_LTD',         30, 'GS1 DataBar Limited');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS_LTD',          30, 'GS1 DataBar Limited (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_EXP',         31, 'GS1 DataBar Expanded');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS_EXP',          31, 'GS1 DataBar Expanded (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_TELEPEN',          32, 'Telepen Alpha');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPCA',             34, 'UPC-A');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPCA_CHK',         35, 'UPC-A including check digit');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPCE',             37, 'UPC-E');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPCE_CHK',         38, 'UPC-E including check digit');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_POSTNET',          40, 'USPS (U.S. Postal Service) POSTNET');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_MSI_PLESSEY',      47, 'MSI Plessey');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_FIM',              49, 'Facing Identification Mark');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_LOGMARS',          50, 'LOGMARS');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PHARMA',           51, 'Pharmacode One-Track');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PZN',              52, 'Pharmazentralnummer');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PHARMA_TWO',       53, 'Pharmacode Two-Track');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CEPNET',           54, 'Brazilian CEPNet Postal Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PDF417',           55, 'PDF417');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PDF417COMP',       56, 'Compact PDF417 (Truncated PDF417)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PDF417TRUNC',      56, 'Compact PDF417 (Truncated PDF417) (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_MAXICODE',         57, 'MaxiCode');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_QRCODE',           58, 'QR Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE128AB',        60, 'Code 128 (Suppress Code Set C)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE128B',         60, 'Code 128 (Suppress Code Set C) (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_AUSPOST',          63, 'Australia Post Standard Customer');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_AUSREPLY',         66, 'Australia Post Reply Paid');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_AUSROUTE',         67, 'Australia Post Routing');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_AUSREDIRECT',      68, 'Australia Post Redirection');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_ISBNX',            69, 'ISBN');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RM4SCC',           70, 'Royal Mail 4-State Customer Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DATAMATRIX',       71, 'Data Matrix (ECC200)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN14',            72, 'EAN-14');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_VIN',              73, 'Vehicle Identification Number');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODABLOCKF',       74, 'Codablock F');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_NVE18',            75, 'NVE-18 (SSCC-18)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_JAPANPOST',        76, 'Japanese Postal Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_KOREAPOST',        77, 'Korea Post');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_STK',         79, 'GS1 DataBar Stacked');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS14STACK',       79, 'GS1 DataBar Stacked (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_OMNSTK',      80, 'GS1 DataBar Stacked Omnidirectional');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS14STACK_OMNI',  80, 'GS1 DataBar Stacked Omnidirectional (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_EXPSTK',      81, 'GS1 DataBar Expanded Stacked');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS_EXPSTACK',     81, 'GS1 DataBar Expanded Stacked (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PLANET',           82, 'USPS PLANET');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_MICROPDF417',      84, 'MicroPDF417');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_USPS_IMAIL',       85, 'USPS Intelligent Mail (OneCode)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_ONECODE',          85, 'USPS Intelligent Mail (OneCode) (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_PLESSEY',          86, 'UK Plessey');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_TELEPEN_NUM',      87, 'Telepen Numeric');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_ITF14',            89, 'ITF-14');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_KIX',              90, 'Dutch Post KIX Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_AZTEC',            92, 'Aztec Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DAFT',             93, 'DAFT Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DPD',              96, 'DPD Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_MICROQR',          97, 'Micro QR Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_128',         98, 'HIBC (Health Industry Barcode) Code 128');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_39',          99, 'HIBC Code 39');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_DM',         102, 'HIBC Data Matrix');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_QR',         104, 'HIBC QR Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_PDF',        106, 'HIBC PDF417');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_MICPDF',     108, 'HIBC MicroPDF417');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_BLOCKF',     110, 'HIBC Codablock F');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HIBC_AZTEC',      112, 'HIBC Aztec Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DOTCODE',         115, 'DotCode');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_HANXIN',          116, 'Han Xin (Chinese Sensible) Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_MAILMARK_2D',     119, 'Royal Mail 2D Mailmark (CMDM) (Data Matrix)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPU_S10',         120, 'Universal Postal Union S10');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_MAILMARK_4S',     121, 'Royal Mail 4-State Mailmark');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_MAILMARK',        121, 'Royal Mail 4-State Mailmark (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_AZRUNE',          128, 'Aztec Runes');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODE32',          129, 'Code 32');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EANX_CC',         130, 'Legacy EAN-13/8/5/2 Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_GS1_128_CC',      131, 'GS1-128 Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN128_CC',       131, 'GS1-128 Composite (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_OMN_CC',     132, 'GS1 DataBar Omnidirectional Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS14_CC',        132, 'GS1 DataBar Omnidirectional Composite (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_LTD_CC',     133, 'GS1 DataBar Limited Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS_LTD_CC',      133, 'GS1 DataBar Limited Composite (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_EXP_CC',     134, 'GS1 DataBar Expanded Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS_EXP_CC',      134, 'GS1 DataBar Expanded Composite (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPCA_CC',         135, 'UPC-A Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPCE_CC',         136, 'UPC-E Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_STK_CC',     137, 'GS1 DataBar Stacked Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS14STACK_CC',   137, 'GS1 DataBar Stacked Composite (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_OMNSTK_CC',  138, 'GS1 DataBar Stacked Omnidirectional Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS14_OMNI_CC',   138, 'GS1 DataBar Stacked Omnidirectional Composite (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DBAR_EXPSTK_CC',  139, 'GS1 DataBar Expanded Stacked Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RSS_EXPSTACK_CC', 139, 'GS1 DataBar Expanded Stacked Composite (Legacy Constant)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CHANNEL',         140, 'Channel Code');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_CODEONE',         141, 'Code One');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_GRIDMATRIX',      142, 'Grid Matrix');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_UPNQR',           143, 'UPNQR (Univerzalnega Plačilnega Naloga QR)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_ULTRA',           144, 'Ultracode');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_RMQR',            145, 'Rectangular Micro QR Code (rMQR)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_BC412',           146, 'IBM BC412 (SEMI T1-95)');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_DXFILMEDGE',      147, 'DX Film Edge Barcode on 35mm and APS films');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN8_CC',         148, 'EAN-8 Composite');
INSERT INTO bc_symbols (bc_symbol_zint_constant, bc_symbol_zint_id, bc_symbol_name) VALUES ('BARCODE_EAN13_CC',        149, 'EAN-13 Composite');
