sql Sistemazione tabelle s_ * orkcentral
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sql Sistemazione tabelle s_ * orkcentral相关的知识,希望对你有一定的参考价值。
truncate s_tkt;
truncate s_pay;
truncate s_rtkt;
truncate s_auto;
truncate s_com;
truncate s_inc;
truncate s_rfid;
DROP VIEW public.v_cmpnattypca;
DROP INDEX public.s_tkt_typetat;
DROP INDEX public.s_rtkt_typ_fnc;
DROP INDEX public.s_rtkt_fa;
DROP INDEX public.s_pay_idm_idh_dt;
ALTER TABLE ONLY public.s_wafa DROP CONSTRAINT s_wafa_pkey;
ALTER TABLE ONLY public.s_txp DROP CONSTRAINT s_txp_pkey;
ALTER TABLE ONLY public.s_tva DROP CONSTRAINT s_tva_pkey;
ALTER TABLE ONLY public.s_tkt DROP CONSTRAINT s_tkt_pkey;
ALTER TABLE ONLY public.s_tij DROP CONSTRAINT s_tij_pkey;
ALTER TABLE ONLY public.s_tie DROP CONSTRAINT s_tie_pkey;
ALTER TABLE ONLY public.s_stat DROP CONSTRAINT s_stat_pkey;
ALTER TABLE ONLY public.s_snd DROP CONSTRAINT s_snd_pkey;
ALTER TABLE ONLY public.s_skard DROP CONSTRAINT s_skard_pkey;
ALTER TABLE ONLY public.s_cptcli DROP CONSTRAINT s_scptcli_pkey;
ALTER TABLE ONLY public.s_sco DROP CONSTRAINT s_sco_pkey;
ALTER TABLE ONLY public.s_rtkt DROP CONSTRAINT s_rtkt_pkey;
ALTER TABLE ONLY public.s_rmotif DROP CONSTRAINT s_rmotif_pkey;
ALTER TABLE ONLY public.s_rfid DROP CONSTRAINT s_rfid_pkey;
ALTER TABLE ONLY public.s_reod DROP CONSTRAINT s_reod_pkey;
ALTER TABLE ONLY public.s_promo DROP CONSTRAINT s_promo_pkey;
ALTER TABLE ONLY public.s_press DROP CONSTRAINT s_press_pkey;
ALTER TABLE ONLY public.s_pointage DROP CONSTRAINT s_pointage_pkey;
ALTER TABLE ONLY public.s_pay DROP CONSTRAINT s_pay_pkey;
ALTER TABLE ONLY public.s_msg DROP CONSTRAINT s_msg_pkey;
ALTER TABLE ONLY public.s_kard DROP CONSTRAINT s_kard_pkey;
ALTER TABLE ONLY public.s_infpu DROP CONSTRAINT s_infpu_pkey;
ALTER TABLE ONLY public.s_inf DROP CONSTRAINT s_inf_pkey;
ALTER TABLE ONLY public.s_incf DROP CONSTRAINT s_incf_pkey;
ALTER TABLE ONLY public.s_inc DROP CONSTRAINT s_inc_pkey;
ALTER TABLE ONLY public.s_fbon DROP CONSTRAINT s_fbon_pkey;
ALTER TABLE ONLY public.s_eod DROP CONSTRAINT s_eod_pkey;
ALTER TABLE ONLY public.s_demat DROP CONSTRAINT s_demat_pkey;
ALTER TABLE ONLY public.s_consotkt DROP CONSTRAINT s_consotkt_pkey;
ALTER TABLE ONLY public.s_com DROP CONSTRAINT s_com_pkey;
ALTER TABLE ONLY public.s_clitrs DROP CONSTRAINT s_clitrs_pkey;
ALTER TABLE ONLY public.s_client DROP CONSTRAINT s_client_pkey;
ALTER TABLE ONLY public.s_clibon DROP CONSTRAINT s_clibon_pkey;
ALTER TABLE ONLY public.s_cliart DROP CONSTRAINT s_cliart_pkey;
ALTER TABLE ONLY public.s_card DROP CONSTRAINT s_card_pkey;
ALTER TABLE ONLY public.s_bonork DROP CONSTRAINT s_bonork_pkey;
ALTER TABLE ONLY public.s_bon DROP CONSTRAINT s_bon_pkey;
ALTER TABLE ONLY public.s_auto DROP CONSTRAINT s_auto_pkey;
ALTER TABLE ONLY public.s_areg DROP CONSTRAINT s_areg_pkey;
ALTER TABLE public.s_eod ALTER COLUMN ideod DROP DEFAULT;
DROP TABLE public.s_wafa;
DROP TABLE public.s_txp;
DROP TABLE public.s_tva;
DROP TABLE public.s_tkt;
DROP TABLE public.s_tij;
DROP TABLE public.s_tie;
DROP TABLE public.s_stat;
DROP TABLE public.s_snd;
DROP TABLE public.s_skard;
DROP TABLE public.s_sco;
DROP TABLE public.s_rtkt;
DROP TABLE public.s_rmotif;
DROP TABLE public.s_rfid;
DROP TABLE public.s_reod;
DROP TABLE public.s_promo;
DROP TABLE public.s_press;
DROP TABLE public.s_pointage;
DROP TABLE public.s_pay;
DROP TABLE public.s_msg;
DROP TABLE public.s_kard;
DROP TABLE public.s_infpu;
DROP TABLE public.s_inf;
DROP TABLE public.s_incf;
DROP TABLE public.s_inc;
DROP TABLE public.s_fbon;
DROP SEQUENCE public.s_eod_ideod_seq;
DROP TABLE public.s_eod;
DROP TABLE public.s_demat;
DROP TABLE public.s_cptcli;
DROP TABLE public.s_consotkt;
DROP TABLE public.s_com;
DROP TABLE public.s_clitrs;
DROP TABLE public.s_client;
DROP TABLE public.s_clibon;
DROP TABLE public.s_cliart;
DROP TABLE public.s_card;
DROP TABLE public.s_bonork;
DROP TABLE public.s_bon;
DROP TABLE public.s_auto;
DROP TABLE public.s_areg;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: v_cmpnattypca; Type: VIEW; Schema: public; Owner: orka
--
CREATE TABLE public.s_areg (
idm integer DEFAULT 0 NOT NULL,
idtie text DEFAULT ''::character varying NOT NULL,
dta date DEFAULT ('now'::text)::date NOT NULL,
idca integer DEFAULT 0 NOT NULL,
idta integer DEFAULT 0 NOT NULL,
dtr date DEFAULT ('now'::text)::date NOT NULL,
idcr integer DEFAULT 0 NOT NULL,
idtr integer DEFAULT 0 NOT NULL,
mnt numeric DEFAULT 0.00 NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
idens integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_areg OWNER TO orka;
CREATE TABLE public.s_auto (
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idh integer NOT NULL,
idt integer NOT NULL,
idr integer NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typa integer DEFAULT 0 NOT NULL,
superviseur integer DEFAULT 0 NOT NULL,
motif smallint DEFAULT 0 NOT NULL,
badge text DEFAULT ''::text NOT NULL,
idrt integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_auto OWNER TO orka;
CREATE TABLE public.s_bon (
idb text NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
hdeb time without time zone,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
codebon text DEFAULT ''::character varying NOT NULL,
libtc text DEFAULT ''::character varying,
forme smallint,
typbon smallint DEFAULT 0 NOT NULL,
typavg smallint DEFAULT 0 NOT NULL,
valeur numeric DEFAULT 0.00 NOT NULL,
idcart text DEFAULT ''::character varying NOT NULL,
idporteur text DEFAULT ''::character varying NOT NULL,
hemis time without time zone DEFAULT ('now'::text)::time(6) with time zone,
dateuse date,
huse time without time zone,
datedval date,
hdval time without time zone,
datefval date,
hfval time without time zone,
encaisser smallint DEFAULT 0 NOT NULL,
idcmp integer,
seq integer DEFAULT 0 NOT NULL,
idact integer,
idavg integer,
natbon smallint DEFAULT 0 NOT NULL,
pay smallint DEFAULT 0 NOT NULL,
typcal smallint DEFAULT 0 NOT NULL,
typv smallint DEFAULT 0 NOT NULL,
nbrmax smallint DEFAULT 0 NOT NULL,
mntrmax smallint DEFAULT 0 NOT NULL,
promo smallint DEFAULT 0 NOT NULL,
plancher smallint DEFAULT 0 NOT NULL,
ref text,
typnat integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_bon OWNER TO orka;
CREATE TABLE public.s_bonork (
idb text DEFAULT ''::character varying NOT NULL,
idgrp text DEFAULT ''::character varying NOT NULL,
idcli text DEFAULT ''::character varying NOT NULL,
dt timestamp with time zone,
idm integer DEFAULT 0 NOT NULL,
idc smallint,
idh integer,
idt integer,
idcu integer DEFAULT 0 NOT NULL,
idhu integer DEFAULT 0 NOT NULL,
idtu integer,
valeur numeric DEFAULT 0.00 NOT NULL,
dtuse timestamp with time zone,
datedval date,
datefval date,
encaisser smallint DEFAULT (0)::smallint NOT NULL,
islock character varying(1) DEFAULT '0'::character varying NOT NULL,
forme smallint,
hdeb time without time zone,
dtr date,
idens integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_bonork OWNER TO orka;
CREATE TABLE public.s_card (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typmsg smallint DEFAULT 0,
chrono smallint DEFAULT 0,
numc text DEFAULT 0 NOT NULL,
idcart text DEFAULT ''::character varying,
lib text DEFAULT ''::character varying NOT NULL,
typc smallint DEFAULT 0 NOT NULL,
doss integer DEFAULT 0 NOT NULL,
pfem integer DEFAULT 0 NOT NULL,
dtsolde date DEFAULT '2001-01-01'::date NOT NULL,
solde numeric DEFAULT 0 NOT NULL,
consop integer DEFAULT 0 NOT NULL,
gainp integer DEFAULT 0 NOT NULL,
oldp integer DEFAULT 0 NOT NULL,
newp integer DEFAULT 0 NOT NULL,
consov numeric DEFAULT (0)::numeric,
gainv numeric DEFAULT (0)::numeric,
oldv numeric DEFAULT (0)::numeric,
newv numeric DEFAULT (0)::numeric,
log smallint DEFAULT 0 NOT NULL,
nom text DEFAULT ''::text NOT NULL,
prenom text DEFAULT ''::text NOT NULL,
indicm integer DEFAULT 0 NOT NULL,
indica integer DEFAULT 0 NOT NULL,
pp integer DEFAULT 0 NOT NULL,
postal text DEFAULT ''::text NOT NULL,
ville text DEFAULT ''::text NOT NULL,
datepp text,
gainam numeric DEFAULT 0 NOT NULL,
typecarte integer DEFAULT 0 NOT NULL,
age integer DEFAULT 0 NOT NULL,
aniv text,
seg integer DEFAULT 0 NOT NULL,
freq integer DEFAULT 0 NOT NULL,
passg integer DEFAULT 0 NOT NULL,
categ integer DEFAULT 0 NOT NULL,
ide integer DEFAULT 0 NOT NULL,
ofl smallint DEFAULT 0 NOT NULL,
anivc text,
dateprm text
);
ALTER TABLE public.s_card OWNER TO orka;
CREATE TABLE public.s_cliart (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
seq integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
idcli text NOT NULL,
idcmpt bigint DEFAULT 0 NOT NULL,
idact integer DEFAULT 0 NOT NULL,
ean text DEFAULT ''::text NOT NULL,
nbr smallint NOT NULL,
qte smallint NOT NULL,
avg numeric DEFAULT (0)::numeric,
dtv text DEFAULT ''::text NOT NULL,
dtk text DEFAULT ''::text NOT NULL,
htk text DEFAULT ''::text NOT NULL,
idl text DEFAULT 0 NOT NULL,
idi text DEFAULT 0 NOT NULL,
ref text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_cliart OWNER TO orka;
CREATE TABLE public.s_clibon (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
seq integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
idcli text NOT NULL,
ean text DEFAULT ''::text NOT NULL,
typb smallint NOT NULL,
val numeric DEFAULT (0)::numeric,
dtv text DEFAULT ''::text NOT NULL,
dtk text DEFAULT ''::text NOT NULL,
htk text DEFAULT ''::text NOT NULL,
ref text DEFAULT ''::text NOT NULL,
lib text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_clibon OWNER TO orka;
CREATE TABLE public.s_client (
id integer DEFAULT nextval(('ork_iclient'::text)::regclass) NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
idc text DEFAULT ''::character varying NOT NULL,
com text DEFAULT ''::character varying NOT NULL,
credit numeric DEFAULT 0.00 NOT NULL,
idtie text DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_client OWNER TO orka;
CREATE TABLE public.s_clitrs (
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
dt date DEFAULT (now())::date NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
chrono integer DEFAULT 0 NOT NULL,
dtr date,
hr time without time zone DEFAULT (now())::time without time zone NOT NULL,
hdeb time without time zone,
typmsg smallint DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
idclient text DEFAULT ''::character varying NOT NULL,
typc smallint DEFAULT 0 NOT NULL,
nom text DEFAULT ''::character varying NOT NULL,
log smallint DEFAULT 0 NOT NULL,
mnt numeric DEFAULT 0 NOT NULL,
mntp integer DEFAULT 0 NOT NULL,
ca numeric DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_clitrs OWNER TO orka;
CREATE TABLE public.s_com (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typmsg integer DEFAULT 0 NOT NULL,
seq integer DEFAULT 0 NOT NULL,
ean text DEFAULT ''::text NOT NULL,
lib text DEFAULT ''::text NOT NULL,
ref text DEFAULT ''::text NOT NULL,
datev text DEFAULT ''::text NOT NULL,
pincode text DEFAULT ''::text NOT NULL,
pinser text DEFAULT ''::text NOT NULL,
ca numeric DEFAULT (0)::numeric NOT NULL,
errres smallint DEFAULT 0 NOT NULL,
errconf smallint DEFAULT 0 NOT NULL,
err smallint DEFAULT 0 NOT NULL,
status smallint DEFAULT 0 NOT NULL,
idtrs text DEFAULT ''::text NOT NULL,
jret jsonb DEFAULT '{}'::jsonb NOT NULL,
service text DEFAULT ''::text NOT NULL,
idrt integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_com OWNER TO orka;
CREATE TABLE public.s_consotkt (
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idh integer NOT NULL,
idt integer NOT NULL,
idr integer NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
dtconso timestamp without time zone DEFAULT now() NOT NULL
);
ALTER TABLE public.s_consotkt OWNER TO orka;
CREATE TABLE public.s_cptcli (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
seq integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
idcli text NOT NULL,
idcmpt integer DEFAULT 0 NOT NULL,
idact integer DEFAULT 0 NOT NULL,
ean text DEFAULT ''::text NOT NULL,
nbr smallint NOT NULL,
qte smallint NOT NULL,
avg numeric DEFAULT (0)::numeric,
dtv text DEFAULT ''::text NOT NULL,
dtk text DEFAULT ''::text NOT NULL,
htk text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_cptcli OWNER TO orka;
CREATE TABLE public.s_demat (
dt timestamp without time zone DEFAULT now() NOT NULL,
idtrs text DEFAULT ''::character varying NOT NULL,
ean text DEFAULT ''::character varying NOT NULL,
cserie text DEFAULT ''::character varying NOT NULL,
mnt numeric DEFAULT (0)::numeric NOT NULL,
err smallint DEFAULT 0 NOT NULL,
typart smallint DEFAULT 0 NOT NULL,
typtrs smallint DEFAULT 0 NOT NULL,
datacli text DEFAULT ''::character varying NOT NULL
);
ALTER TABLE public.s_demat OWNER TO orka;
CREATE TABLE public.s_eod (
ideod integer NOT NULL,
idens integer NOT NULL,
idm integer NOT NULL,
dt date NOT NULL,
ntkt integer DEFAULT 0 NOT NULL,
cattc numeric DEFAULT 0 NOT NULL,
mntpay numeric DEFAULT 0 NOT NULL,
npos smallint DEFAULT 0 NOT NULL,
nposoff smallint DEFAULT 0 NOT NULL,
nposerr smallint DEFAULT 0 NOT NULL,
status smallint DEFAULT 0 NOT NULL,
jlog jsonb DEFAULT '{}'::jsonb NOT NULL,
idu text DEFAULT ''::text NOT NULL,
dtstart timestamp without time zone DEFAULT now() NOT NULL,
dtend timestamp without time zone,
reftkt text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_eod OWNER TO orka;
CREATE SEQUENCE public.s_eod_ideod_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.s_eod_ideod_seq OWNER TO orka;
ALTER SEQUENCE public.s_eod_ideod_seq OWNED BY public.s_eod.ideod;
CREATE TABLE public.s_fbon (
idb text NOT NULL,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
idcli text DEFAULT ''::text NOT NULL,
idporteur text DEFAULT ''::text NOT NULL,
libtc text DEFAULT ''::text NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
hemis time without time zone DEFAULT ('now'::text)::time(6) with time zone,
datedval date,
hdval time without time zone,
datefval date,
hfval time without time zone,
dateuse date,
huse time without time zone,
valeur numeric DEFAULT 0.00 NOT NULL,
encaisser smallint DEFAULT 0 NOT NULL,
idcmp bigint,
seq integer DEFAULT 0 NOT NULL,
idact integer,
typavg smallint DEFAULT 0 NOT NULL,
idcat text DEFAULT ''::text NOT NULL,
periode smallint,
typbon smallint DEFAULT 0 NOT NULL,
natbon smallint DEFAULT 0 NOT NULL,
typcal smallint DEFAULT 0 NOT NULL,
typval smallint DEFAULT 0 NOT NULL,
nbrmax smallint DEFAULT 0 NOT NULL,
mntrmax numeric DEFAULT 0 NOT NULL,
promo smallint DEFAULT 0 NOT NULL,
remise smallint DEFAULT 0 NOT NULL,
plancher smallint DEFAULT 0 NOT NULL,
ref text,
model smallint DEFAULT 0 NOT NULL,
support integer,
idmr integer DEFAULT 0 NOT NULL,
idcr integer DEFAULT 0 NOT NULL,
idtr integer DEFAULT 0 NOT NULL,
idhr integer DEFAULT 0 NOT NULL,
hdeb time without time zone,
dtr date,
nbrmaxg smallint DEFAULT 0 NOT NULL,
mntrmaxg numeric DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_fbon OWNER TO orka;
CREATE TABLE public.s_inc (
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idc integer NOT NULL,
idh integer NOT NULL,
idt integer NOT NULL,
ean text DEFAULT ''::text NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typcode integer DEFAULT 0 NOT NULL,
typscan integer DEFAULT 0 NOT NULL,
flag smallint DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_inc OWNER TO orka;
CREATE TABLE public.s_incf (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date DEFAULT ('now'::text)::date NOT NULL,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
ean text DEFAULT ''::text NOT NULL,
fam integer DEFAULT 0 NOT NULL,
puvttc numeric DEFAULT 0 NOT NULL,
lib text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_incf OWNER TO orka;
CREATE TABLE public.s_inf (
dt date NOT NULL,
dtr date,
hdeb time without time zone,
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
c1 text,
c2 text,
c3 text,
c4 text,
c5 text
);
ALTER TABLE public.s_inf OWNER TO orka;
CREATE TABLE public.s_infpu (
dt date NOT NULL,
dtr date,
hdeb time without time zone,
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
idr integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
ean text DEFAULT ''::text NOT NULL,
pu numeric DEFAULT 0 NOT NULL,
fnd smallint DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_infpu OWNER TO orka;
CREATE TABLE public.s_kard (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
seq integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
idcli text NOT NULL,
action smallint DEFAULT 0,
qte smallint DEFAULT 0,
categ integer DEFAULT 0,
seg integer DEFAULT 0,
indica smallint DEFAULT 0,
freq integer DEFAULT 0,
passage integer DEFAULT 0,
online smallint DEFAULT 0,
typcpt smallint DEFAULT 0,
typecarte smallint DEFAULT 0,
ens smallint DEFAULT 0,
esv smallint DEFAULT 0,
mag integer DEFAULT 0,
choixrem smallint DEFAULT 0,
ville text DEFAULT ''::text NOT NULL,
tel text DEFAULT ''::text NOT NULL,
nom text DEFAULT ''::text NOT NULL,
cp text DEFAULT ''::text NOT NULL,
totalca numeric DEFAULT (0)::numeric,
totgainautremagv numeric DEFAULT (0)::numeric,
totgainautremagp numeric DEFAULT (0)::numeric,
dtsv text DEFAULT ''::text NOT NULL,
sv numeric DEFAULT (0)::numeric,
dtsp text DEFAULT ''::text NOT NULL,
sp integer DEFAULT 0,
dtpp text DEFAULT ''::text NOT NULL,
spp integer DEFAULT 0,
dtk text DEFAULT ''::text NOT NULL,
htk text DEFAULT ''::text NOT NULL,
jret jsonb DEFAULT '{}'::jsonb NOT NULL,
actif smallint DEFAULT 0 NOT NULL,
idvisu text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_kard OWNER TO orka;
CREATE TABLE public.s_msg (
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
hdeb time without time zone,
idc smallint DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idmsg integer NOT NULL,
typm integer DEFAULT 0 NOT NULL,
bloc smallint NOT NULL,
ordre smallint NOT NULL,
dev smallint DEFAULT 0 NOT NULL,
idr smallint NOT NULL,
clt smallint DEFAULT 0 NOT NULL,
min integer DEFAULT 0 NOT NULL,
align integer DEFAULT 0 NOT NULL,
bold integer DEFAULT 0 NOT NULL,
font integer DEFAULT 0 NOT NULL,
otxt text DEFAULT ''::text NOT NULL,
txt text DEFAULT ''::text NOT NULL,
ojsontxt text DEFAULT ''::text NOT NULL,
jsontxt text DEFAULT ''::text NOT NULL,
status smallint DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_msg OWNER TO orka;
CREATE TABLE public.s_pay (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typt integer DEFAULT 0 NOT NULL,
typcp smallint DEFAULT (0)::smallint NOT NULL,
iddev integer DEFAULT 0 NOT NULL,
libdev text DEFAULT ''::text NOT NULL,
txchange numeric DEFAULT 1 NOT NULL,
idreg integer DEFAULT 0 NOT NULL,
libreg text DEFAULT ''::text NOT NULL,
qte numeric DEFAULT 0.00 NOT NULL,
mnt numeric DEFAULT 0.00 NOT NULL,
mntdev numeric DEFAULT 0,
preleve smallint DEFAULT (0)::smallint NOT NULL,
statut smallint DEFAULT (0)::smallint NOT NULL,
etat smallint DEFAULT (0)::smallint NOT NULL,
compte text DEFAULT ''::text NOT NULL,
banque text DEFAULT ''::text NOT NULL,
ref text DEFAULT ''::text NOT NULL,
qte0 numeric DEFAULT 0.00 NOT NULL,
mnt0 numeric DEFAULT 0.00 NOT NULL,
idcp smallint DEFAULT 0 NOT NULL,
grpcp smallint DEFAULT 0 NOT NULL,
i0 text DEFAULT ''::text NOT NULL,
i1 text DEFAULT ''::text NOT NULL,
i2 text DEFAULT ''::text NOT NULL,
idb text DEFAULT ''::text NOT NULL,
jret jsonb DEFAULT '{}'::jsonb NOT NULL,
typcard integer DEFAULT 0 NOT NULL,
typreg smallint DEFAULT 0 NOT NULL,
rendu smallint DEFAULT 0 NOT NULL,
norendu numeric DEFAULT 0.00 NOT NULL
);
ALTER TABLE public.s_pay OWNER TO orka;
CREATE TABLE public.s_pointage (
idens integer NOT NULL,
idm integer NOT NULL,
dt date NOT NULL,
hr time without time zone NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
nomlong text NOT NULL,
ssn text NOT NULL,
op smallint DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_pointage OWNER TO orka;
CREATE TABLE public.s_press (
dt date DEFAULT ('now'::text)::date NOT NULL,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
code text DEFAULT ''::text NOT NULL,
ean text DEFAULT ''::text NOT NULL,
lib text DEFAULT ''::text NOT NULL,
qte numeric DEFAULT 0.0000 NOT NULL,
puttc numeric DEFAULT 0.00 NOT NULL,
netttc numeric DEFAULT 0,
netht numeric DEFAULT 0,
mnttva numeric DEFAULT 0,
addon text DEFAULT ''::text NOT NULL,
scan smallint DEFAULT (0)::smallint NOT NULL,
hdeb time without time zone,
dtr date
);
ALTER TABLE public.s_press OWNER TO orka;
CREATE TABLE public.s_promo (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hdeb time without time zone,
idpromo text,
code text DEFAULT ''::text NOT NULL,
ean text DEFAULT ''::text NOT NULL,
qte numeric DEFAULT 0.0000 NOT NULL,
puttc numeric DEFAULT 0.00 NOT NULL,
pu_bfr numeric DEFAULT 0.00 NOT NULL,
netttc numeric DEFAULT 0
);
ALTER TABLE public.s_promo OWNER TO orka;
CREATE TABLE public.s_reod (
ideod bigint NOT NULL,
idc integer NOT NULL,
online smallint DEFAULT 0 NOT NULL,
idens integer NOT NULL,
idm integer NOT NULL,
dt date NOT NULL,
ntkt integer DEFAULT 0 NOT NULL,
cattc numeric DEFAULT 0 NOT NULL,
mntpay numeric DEFAULT 0 NOT NULL,
idt0 integer DEFAULT 0 NOT NULL,
idtn integer DEFAULT 0 NOT NULL,
hidt0 timestamp without time zone DEFAULT (((now())::date || ' 00:00:00'::text))::timestamp without time zone NOT NULL,
hidtn timestamp without time zone DEFAULT (((now())::date || ' 23:59:59'::text))::timestamp without time zone NOT NULL,
jlog jsonb DEFAULT '{}'::jsonb NOT NULL,
dtstart timestamp without time zone DEFAULT now() NOT NULL,
dtend timestamp without time zone,
ntktmiss integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_reod OWNER TO orka;
CREATE TABLE public.s_rfid (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
hdeb time without time zone,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
idcmp bigint NOT NULL,
idact integer NOT NULL,
idavg integer NOT NULL,
eand text DEFAULT ''::text NOT NULL,
ean text DEFAULT ''::text NOT NULL,
qte numeric DEFAULT 0 NOT NULL,
pu numeric DEFAULT 0 NOT NULL,
iqte numeric DEFAULT (1)::numeric,
ca numeric DEFAULT 0 NOT NULL,
ma numeric DEFAULT 0 NOT NULL,
libtc text DEFAULT ''::text NOT NULL,
nat smallint NOT NULL,
typ smallint NOT NULL,
typbon smallint DEFAULT 0 NOT NULL,
avg numeric DEFAULT 0 NOT NULL,
cbon text DEFAULT ''::character varying NOT NULL,
idbon text DEFAULT ''::text NOT NULL,
idcart text DEFAULT ''::text NOT NULL,
idlot bigint DEFAULT 0,
liblot text DEFAULT ''::text NOT NULL,
avgvtl numeric DEFAULT 0 NOT NULL,
qtencs integer DEFAULT 0 NOT NULL,
idslot bigint DEFAULT 0 NOT NULL,
occur integer DEFAULT 0 NOT NULL,
idfrn text DEFAULT ''::text NOT NULL,
status smallint DEFAULT 0 NOT NULL,
idmsg integer DEFAULT 0 NOT NULL,
ordre integer DEFAULT 0 NOT NULL,
atta smallint DEFAULT 0 NOT NULL,
attp smallint DEFAULT 0 NOT NULL,
attc smallint DEFAULT 0 NOT NULL,
attba smallint DEFAULT 0 NOT NULL,
attrg smallint DEFAULT 0 NOT NULL,
attcpt smallint DEFAULT 0 NOT NULL,
porteur smallint DEFAULT 0 NOT NULL,
libtkt text DEFAULT ''::text NOT NULL,
totbase numeric DEFAULT 0 NOT NULL,
attt smallint DEFAULT 0 NOT NULL,
uavg numeric DEFAULT 0 NOT NULL,
idcpt integer DEFAULT 0 NOT NULL,
idscpt integer DEFAULT 0 NOT NULL,
cptlogo text DEFAULT ''::text NOT NULL,
cptid integer DEFAULT 0 NOT NULL,
txfi numeric DEFAULT 0 NOT NULL,
mntfi numeric DEFAULT 0 NOT NULL,
txvtl numeric DEFAULT 0 NOT NULL,
op text DEFAULT ''::text NOT NULL,
jret jsonb DEFAULT '{}'::jsonb NOT NULL,
valavgu numeric DEFAULT 0 NOT NULL,
avgvf numeric DEFAULT 0 NOT NULL,
avgvt numeric DEFAULT 0 NOT NULL,
avgtl numeric DEFAULT 0 NOT NULL,
idrt integer DEFAULT 0 NOT NULL,
idcmpext text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_rfid OWNER TO orka;
CREATE TABLE public.s_rmotif (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
hdeb time without time zone,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
code text DEFAULT ''::character varying NOT NULL,
ean text DEFAULT ''::character varying NOT NULL,
motif text DEFAULT ''::character varying NOT NULL,
ref text DEFAULT ''::character varying NOT NULL,
statut smallint DEFAULT (0)::smallint NOT NULL
);
ALTER TABLE public.s_rmotif OWNER TO orka;
CREATE TABLE public.s_rtkt (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typl integer DEFAULT 0 NOT NULL,
fnc integer DEFAULT 0 NOT NULL,
code text DEFAULT ''::character varying NOT NULL,
ean text DEFAULT ''::character varying NOT NULL,
lib text DEFAULT ''::character varying NOT NULL,
qte numeric DEFAULT 0.0000 NOT NULL,
puttc numeric DEFAULT 0.00 NOT NULL,
ecotaxe numeric DEFAULT 0,
netttc numeric DEFAULT 0,
netht numeric DEFAULT 0,
mnttva numeric DEFAULT 0,
mntlig numeric DEFAULT 0,
idtva smallint DEFAULT (0)::smallint NOT NULL,
txtva numeric DEFAULT 0.00 NOT NULL,
iddev integer DEFAULT 0 NOT NULL,
libdev text DEFAULT ''::character varying NOT NULL,
txchange numeric DEFAULT 0.00 NOT NULL,
pu_bfp numeric DEFAULT 0.00 NOT NULL,
idrem integer DEFAULT 0 NOT NULL,
txrem numeric DEFAULT 0.00 NOT NULL,
mntrem numeric DEFAULT 0.00 NOT NULL,
mntremman numeric DEFAULT (0)::numeric NOT NULL,
mntremtot numeric DEFAULT 0.00 NOT NULL,
mntavg numeric DEFAULT (0)::numeric NOT NULL,
totrem numeric DEFAULT (0)::numeric NOT NULL,
ecarem numeric DEFAULT (0)::numeric NOT NULL,
pu_bchg numeric DEFAULT (0)::numeric NOT NULL,
idfa integer DEFAULT 0 NOT NULL,
scan smallint DEFAULT (0)::smallint NOT NULL,
online smallint DEFAULT 0,
statut smallint DEFAULT (0)::smallint NOT NULL,
puht numeric DEFAULT 0 NOT NULL,
txremdlc numeric DEFAULT 0 NOT NULL,
pu_bdlc numeric DEFAULT 0 NOT NULL,
eandlc text DEFAULT ''::character varying NOT NULL,
idssf integer DEFAULT 0 NOT NULL,
idray integer DEFAULT 0 NOT NULL,
libray text DEFAULT ''::character varying NOT NULL,
iddep integer DEFAULT 0 NOT NULL,
optorkidee smallint DEFAULT 0 NOT NULL,
sean text DEFAULT ''::text NOT NULL,
idint text DEFAULT ''::text NOT NULL,
idcpt text DEFAULT ''::text NOT NULL,
demat integer DEFAULT 0 NOT NULL,
typcode integer DEFAULT 0 NOT NULL,
typscan integer DEFAULT 0 NOT NULL,
cptval smallint DEFAULT 0 NOT NULL,
seqdb integer DEFAULT 0 NOT NULL,
jret jsonb DEFAULT '{}'::jsonb NOT NULL,
badge smallint DEFAULT 0 NOT NULL,
libfa text DEFAULT ''::text NOT NULL,
libdep text DEFAULT ''::text NOT NULL,
annul smallint DEFAULT 0 NOT NULL,
cserie text DEFAULT ''::text NOT NULL,
flag bigint DEFAULT 0 NOT NULL,
pds numeric DEFAULT 0 NOT NULL,
opp smallint DEFAULT 0 NOT NULL,
points integer DEFAULT 0 NOT NULL,
idtvaext text DEFAULT ''::text NOT NULL
);
ALTER TABLE public.s_rtkt OWNER TO orka;
CREATE TABLE public.s_sco (
dt timestamp without time zone DEFAULT now() NOT NULL,
ean character varying(128) NOT NULL,
p numeric(13,3) DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_sco OWNER TO orka;
CREATE TABLE public.s_skard (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
seq integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
idcli text NOT NULL,
typtrs smallint DEFAULT 0,
qte smallint DEFAULT 0,
idcpt integer DEFAULT 0 NOT NULL,
lib text DEFAULT ''::text NOT NULL,
ref text DEFAULT ''::text NOT NULL,
typ smallint DEFAULT 3 NOT NULL,
s0 numeric DEFAULT (0)::numeric,
sp numeric DEFAULT (0)::numeric,
mg numeric DEFAULT (0)::numeric,
mc numeric DEFAULT (0)::numeric,
dp text DEFAULT ''::text NOT NULL,
local smallint DEFAULT 0 NOT NULL,
sscds smallint DEFAULT 0 NOT NULL,
deccli smallint DEFAULT 0 NOT NULL,
min numeric DEFAULT (0)::numeric,
max numeric DEFAULT (0)::numeric,
tranche integer DEFAULT 3 NOT NULL,
idreg integer DEFAULT 3 NOT NULL,
dtk text DEFAULT ''::text NOT NULL,
htk text DEFAULT ''::text NOT NULL,
tx numeric DEFAULT 1 NOT NULL,
dtv date DEFAULT '2100-01-01'::date NOT NULL,
idscpt integer DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_skard OWNER TO orka;
CREATE TABLE public.s_snd (
dt date NOT NULL,
dtr date,
hdeb time without time zone,
idens integer DEFAULT 0 NOT NULL,
idm integer NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
idh integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idsnd text DEFAULT 0 NOT NULL,
req text DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_snd OWNER TO orka;
CREATE TABLE public.s_stat (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
hdeb time without time zone,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
tpsscan time without time zone,
tpspay time without time zone,
nb_artpromo integer,
ca_promo numeric,
nb_lig integer,
nb_artrem integer,
ca_rem numeric,
ca_rema numeric,
ca_remi numeric,
ca_remp numeric,
nb_bonemis integer,
mnt_bonemis numeric,
nb_bonrecus integer,
mnt_bonrecus integer,
nb_liganu integer,
mnt_liganu numeric,
nb_ligret integer,
mnt_ret numeric,
nb_chgprix integer,
mnt_chgprix numeric,
nb_artanu integer,
mnt_artanu numeric,
nb_artret integer,
mnt_artret numeric,
nb_art integer,
ca_art numeric,
nb_fam integer,
ca_fam numeric,
nb_famanu integer,
ca_famanu numeric,
nb_famret integer,
ca_famret numeric,
nb_scan integer
);
ALTER TABLE public.s_stat OWNER TO orka;
CREATE TABLE public.s_tie (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typtie text DEFAULT ''::character varying NOT NULL,
idtie text DEFAULT ''::character varying NOT NULL,
typt smallint NOT NULL,
ca numeric DEFAULT (0)::numeric NOT NULL,
deb numeric DEFAULT (0)::numeric NOT NULL,
cre numeric DEFAULT (0)::numeric NOT NULL,
dtsol date DEFAULT '2001-01-01'::date NOT NULL,
sol numeric DEFAULT (0)::numeric NOT NULL,
statut smallint DEFAULT (0)::smallint NOT NULL
);
ALTER TABLE public.s_tie OWNER TO orka;
CREATE TABLE public.s_tij (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date DEFAULT ('now'::text)::date NOT NULL,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
idtij text NOT NULL
);
ALTER TABLE public.s_tij OWNER TO orka;
CREATE TABLE public.s_tkt (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
src smallint DEFAULT (0)::smallint NOT NULL,
hdeb time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hfin time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
htot time without time zone,
hpay time without time zone,
typt smallint DEFAULT (0)::smallint NOT NULL,
etat smallint DEFAULT (0)::smallint NOT NULL,
netttc numeric DEFAULT 0.00 NOT NULL,
mnttva numeric DEFAULT 0.00 NOT NULL,
netht numeric DEFAULT 0.00 NOT NULL,
capromo numeric DEFAULT 0.00 NOT NULL,
carem numeric DEFAULT 0.00 NOT NULL,
mntavgi numeric DEFAULT 0.00 NOT NULL,
mntavgf numeric DEFAULT 0.00 NOT NULL,
mntrem numeric DEFAULT 0.00 NOT NULL,
pts integer DEFAULT 0.00 NOT NULL,
refrep text DEFAULT ''::character varying NOT NULL,
refmea text DEFAULT ''::character varying NOT NULL,
reffac text DEFAULT ''::character varying NOT NULL,
totlig integer DEFAULT 0 NOT NULL,
nbligs integer DEFAULT 0 NOT NULL,
nbart integer DEFAULT 0 NOT NULL,
idcart text DEFAULT ''::character varying NOT NULL,
idvend text DEFAULT ''::character varying NOT NULL,
refext text DEFAULT ''::character varying NOT NULL,
statut integer DEFAULT 0 NOT NULL,
net integer DEFAULT 0 NOT NULL,
seqdb integer DEFAULT 0 NOT NULL,
seqdbe integer DEFAULT 0 NOT NULL,
selfscan smallint DEFAULT 0 NOT NULL,
dtmea timestamp without time zone,
otkt smallint DEFAULT 0 NOT NULL,
jret jsonb DEFAULT '{}'::jsonb NOT NULL,
reftkt text DEFAULT ''::text NOT NULL,
totmea numeric DEFAULT 0 NOT NULL,
ver text DEFAULT ''::text NOT NULL,
ebn smallint DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_tkt OWNER TO orka;
CREATE TABLE public.s_tva (
idens integer NOT NULL,
idm integer NOT NULL,
dt date NOT NULL,
idc integer NOT NULL,
idt integer NOT NULL,
idtva integer NOT NULL,
txtva numeric NOT NULL,
typtva smallint NOT NULL,
idtvaext text DEFAULT ''::text NOT NULL,
caht numeric DEFAULT 0.00 NOT NULL,
mnttva numeric DEFAULT 0.00 NOT NULL,
cattc numeric DEFAULT 0.00 NOT NULL,
idh integer NOT NULL,
dtr date DEFAULT (now())::date NOT NULL,
typt integer DEFAULT 0 NOT NULL,
etat integer DEFAULT 0 NOT NULL,
orig smallint DEFAULT 0 NOT NULL
);
ALTER TABLE public.s_tva OWNER TO orka;
CREATE TABLE public.s_txp (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb time without time zone,
typt integer DEFAULT 0 NOT NULL,
typcp smallint DEFAULT (0)::smallint NOT NULL,
iddev integer DEFAULT 0 NOT NULL,
idreg integer DEFAULT 0 NOT NULL,
libreg text DEFAULT ''::character varying NOT NULL,
qte numeric DEFAULT 0.00 NOT NULL,
mnt numeric DEFAULT 0.00 NOT NULL,
mntdev numeric DEFAULT 0,
taxe numeric DEFAULT 0 NOT NULL,
idtx integer DEFAULT 0 NOT NULL,
tx numeric DEFAULT 0.00 NOT NULL,
cts numeric DEFAULT 0.00 NOT NULL,
libtx text DEFAULT ''::character varying NOT NULL
);
ALTER TABLE public.s_txp OWNER TO orka;
CREATE TABLE public.s_wafa (
dt date DEFAULT ('now'::text)::date NOT NULL,
dtr date,
idens integer DEFAULT 0 NOT NULL,
idm integer DEFAULT 0 NOT NULL,
idc integer DEFAULT 0 NOT NULL,
idt integer DEFAULT 0 NOT NULL,
idr integer DEFAULT 0 NOT NULL,
idh integer DEFAULT 0 NOT NULL,
hr time without time zone DEFAULT ('now'::text)::time(6) with time zone NOT NULL,
hdeb character varying(8),
idreg integer DEFAULT 0 NOT NULL,
statut smallint DEFAULT (0)::smallint NOT NULL,
cin text DEFAULT ''::character varying NOT NULL,
mnt numeric DEFAULT 0.00 NOT NULL,
log smallint DEFAULT (0)::smallint NOT NULL,
ieaff text DEFAULT ''::character varying NOT NULL
);
ALTER TABLE public.s_wafa OWNER TO orka;
ALTER TABLE ONLY public.s_eod ALTER COLUMN ideod SET DEFAULT nextval('public.s_eod_ideod_seq'::regclass);
ALTER TABLE ONLY public.s_areg
ADD CONSTRAINT s_areg_pkey PRIMARY KEY (idens, idm, idtie, dta, idca, idta, dtr, idcr, idtr);
ALTER TABLE ONLY public.s_auto
ADD CONSTRAINT s_auto_pkey PRIMARY KEY (idens, idm, dt, idc, idt, idr);
ALTER TABLE ONLY public.s_bon
ADD CONSTRAINT s_bon_pkey PRIMARY KEY (idb);
ALTER TABLE ONLY public.s_bonork
ADD CONSTRAINT s_bonork_pkey PRIMARY KEY (idb);
ALTER TABLE ONLY public.s_card
ADD CONSTRAINT s_card_pkey PRIMARY KEY (dt, idm, idc, idt);
ALTER TABLE ONLY public.s_cliart
ADD CONSTRAINT s_cliart_pkey PRIMARY KEY (dt, idens, idm, idc, idt, seq);
ALTER TABLE ONLY public.s_clibon
ADD CONSTRAINT s_clibon_pkey PRIMARY KEY (dt, idens, idm, idc, idt, seq);
ALTER TABLE ONLY public.s_client
ADD CONSTRAINT s_client_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.s_clitrs
ADD CONSTRAINT s_clitrs_pkey PRIMARY KEY (idens, idm, dt, idc, idt, chrono);
ALTER TABLE ONLY public.s_com
ADD CONSTRAINT s_com_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_consotkt
ADD CONSTRAINT s_consotkt_pkey PRIMARY KEY (idens, idm, idc, idt, dt);
ALTER TABLE ONLY public.s_demat
ADD CONSTRAINT s_demat_pkey PRIMARY KEY (dt, typart, typtrs, idtrs);
ALTER TABLE ONLY public.s_eod
ADD CONSTRAINT s_eod_pkey PRIMARY KEY (ideod);
ALTER TABLE ONLY public.s_fbon
ADD CONSTRAINT s_fbon_pkey PRIMARY KEY (idb);
ALTER TABLE ONLY public.s_inc
ADD CONSTRAINT s_inc_pkey PRIMARY KEY (idens, idm, dt, idc, idt, ean);
ALTER TABLE ONLY public.s_incf
ADD CONSTRAINT s_incf_pkey PRIMARY KEY (dt, idc, idt, idens, idm, ean);
ALTER TABLE ONLY public.s_inf
ADD CONSTRAINT s_inf_pkey PRIMARY KEY (dt, idens, idm, idc, idt);
ALTER TABLE ONLY public.s_infpu
ADD CONSTRAINT s_infpu_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_kard
ADD CONSTRAINT s_kard_pkey PRIMARY KEY (dt, idens, idm, idc, idt, seq);
ALTER TABLE ONLY public.s_msg
ADD CONSTRAINT s_msg_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idmsg, idr, bloc, dev, ordre);
ALTER TABLE ONLY public.s_pay
ADD CONSTRAINT s_pay_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_pointage
ADD CONSTRAINT s_pointage_pkey PRIMARY KEY (idens, idm, dt, idc, idt);
ALTER TABLE ONLY public.s_press
ADD CONSTRAINT s_press_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_promo
ADD CONSTRAINT s_promo_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_reod
ADD CONSTRAINT s_reod_pkey PRIMARY KEY (ideod, idc);
ALTER TABLE ONLY public.s_rfid
ADD CONSTRAINT s_rfid_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_rmotif
ADD CONSTRAINT s_rmotif_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_rtkt
ADD CONSTRAINT s_rtkt_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
ALTER TABLE ONLY public.s_sco
ADD CONSTRAINT s_sco_pkey PRIMARY KEY (dt, ean);
ALTER TABLE ONLY public.s_cptcli
ADD CONSTRAINT s_scptcli_pkey PRIMARY KEY (dt, idens, idm, idc, idt, seq);
ALTER TABLE ONLY public.s_skard
ADD CONSTRAINT s_skard_pkey PRIMARY KEY (dt, idens, idm, idc, idt, seq);
ALTER TABLE ONLY public.s_snd
ADD CONSTRAINT s_snd_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr, idsnd);
ALTER TABLE ONLY public.s_stat
ADD CONSTRAINT s_stat_pkey PRIMARY KEY (dt, idens, idm, idc, idt);
ALTER TABLE ONLY public.s_tie
ADD CONSTRAINT s_tie_pkey PRIMARY KEY (dt, idens, idm, idc, idt, typtie);
ALTER TABLE ONLY public.s_tij
ADD CONSTRAINT s_tij_pkey PRIMARY KEY (dt, idens, idm, idc, idt);
ALTER TABLE ONLY public.s_tkt
ADD CONSTRAINT s_tkt_pkey PRIMARY KEY (dt, idens, idm, idc, idt);
ALTER TABLE ONLY public.s_tva
ADD CONSTRAINT s_tva_pkey PRIMARY KEY (idens, idm, dt, idc, idt, idtva);
ALTER TABLE ONLY public.s_txp
ADD CONSTRAINT s_txp_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr, idtx);
ALTER TABLE ONLY public.s_wafa
ADD CONSTRAINT s_wafa_pkey PRIMARY KEY (dt, idens, idm, idc, idt, idr);
CREATE INDEX s_pay_idm_idh_dt ON public.s_pay USING btree (idm, idh, dt);
CREATE INDEX s_rtkt_fa ON public.s_rtkt USING btree (dt, idc, idt, idfa, fnc);
CREATE INDEX s_rtkt_typ_fnc ON public.s_rtkt USING btree (dt, idc, idt, typl, fnc);
CREATE INDEX s_tkt_typetat ON public.s_tkt USING btree (dt, idm, idc, idt, typt, etat);
CREATE VIEW public.v_cmpnattypca AS
SELECT DISTINCT b.dt,
c.idcmp,
b.idt,
c.nat,
c.typ,
b.netttc
FROM public.s_rfid c,
public.s_tkt b
WHERE ((b.dt = c.dt) AND (c.idt = b.idt) AND (c.idc = b.idc) AND (b.idm = c.idm))
ORDER BY c.idcmp, b.idt, c.nat, c.typ, b.netttc, b.dt;
ALTER TABLE public.v_cmpnattypca OWNER TO orka;
以上是关于sql Sistemazione tabelle s_ * orkcentral的主要内容,如果未能解决你的问题,请参考以下文章