Commit 2d641dd3 authored by Ali Allaoui's avatar Ali Allaoui
Browse files

docker-compose basic example

parent 18915f8b
; Database info
database/type = "postgresql"
database/host = "db_pasteque"
database/port = 5432
database/name = "pasteque"
database/user = "pasteque"
database/password = "pasteque"
password="$2y$10$MQB/iMuAdBGkukjAojrtUewyWrc/8ZYn.JL.Z5lFax4/q53XJM/hW"
\ No newline at end of file
; Core module ident
;------------------
; Module to use. The value must match a directory in core_modules/ident/
; See the choosen module properties below
core_ident = "inifile"
; Core ident inifile
; Base path to the directory containing all user's ini files.
; Either relative to the base directory of Pasteque ,start with ./
; or an absolute path.
; Each ini file is named <login>_id.ini, some special characters are
; replaced by 'underscore charcode underscore'
ident/inifile/path = "/etc/pasteque/auth"
; Core ident database
;ident/database/dns = "mysql:host=...;dbname=..."
;ident/database/db_username = "..."
;ident/database/du_password = "..."
; Core module database
;---------------------
; Module to use. The value must match a directory in core_modules/database/
; See the choosen module properties below
;core_database = "inifile"
core_database = "static"
; Core database inifile
; Base path to the directory containing all user's ini files.
; Either relative to the base directory of Pasteque ,start with ./
; or an absolute path.
; Each ini file is named <login>_db.ini, some special characters are
; replaced by 'underscore charcode underscore'
database/inifile/path = "/etc/pasteque/auth"
; Core database static
database/static/type = "postgresql"
database/static/host = "db_pasteque"
database/static/port = "5432"
database/static/name = "pasteque"
database/static/user = "pasteque"
database/static/password = "pasteque"
; JWT auth and origin
;--------------------
; Validity in seconds of an auth token
jwt_timeout = 600
; Set this to a superstrong password
jwt_secret = "pasteque"
; Uncomment to allow calls from everywhere ,not recommended
allowed_origin = *
; Uncomment to allow calls from a whitelist
;allowed_origin[] = http://<domain>
; Thumbnail compression
;----------------------
; Thumbnail max width in px. Comment or set to 0 to disable thumbnailing.
thumbnail/width = 128
; Thumbnail max height in px. Comment or set to 0 to disable thumbnailing.
thumbnail/height = 128
; Thumbnail output format. Comment or set to "original" to keep original format.
; original|jpeg|png
thumbnail/format = "jpeg"
; Output quality for jpeg compression.
thumbnail/jpeg/quality = 50
; Logging and debuging
;---------------------
; Log level: one of DEBUG, INFO, WARNING, ERROR
log_level = "DEBUG"
; Uncomment to add an other log directory. System log is still enabled.
log_dir = "/var/log/pasteque"
debug = false
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
db_pasteque:
restart: always
build:
context: ./db_postgres
image: postgres:9-alpine
environment:
- DB_USER=pasteque
- DB_USER_PASSWORD=pasteque
- POSTGRES_USER=pasteque
- POSTGRES_PASSWORD=pasteque
- POSTGRES_DB=pasteque
- DB_NAME=pasteque
container_name: postgres_pasteque
container_name: db_pasteque
volumes:
- postgres_data:/var/lib/postgresql/data
- ./sql:/docker-entrypoint-initdb.d
pasteque:
build:
context: ./apache-php
image: pasteque/pasteque:debug
container_name: pasteque
ports:
- "80:80"
environment:
- VIRTUAL_HOST=pasteque.docker
- WEB_DOCUMENT_ROOT=/var/www/html
- WEB_DOCUMENT_ROOT=/var/www/html/src/http/public
- WEB_DOCUMENT_INDEX=index.php
depends_on:
- db_pasteque
links:
- db_pasteque:db_pasteque
volumes:
- ./config-basic.ini:/var/www/html/config/config.ini
- ./auth:/etc/pasteque/auth
volumes:
postgres_data:
driver: local
\ No newline at end of file
driver: local
\ No newline at end of file
CREATE TABLE paymentmodes (id INT NOT NULL, reference VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, backLabel VARCHAR(255) NOT NULL, type INT NOT NULL, hasImage BOOLEAN NOT NULL, disp_order INT NOT NULL, visible BOOLEAN NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_263B9843AEA34913 ON paymentmodes (reference);
CREATE TABLE resources (label VARCHAR(255) NOT NULL, type INT NOT NULL, content BYTEA NOT NULL, PRIMARY KEY(label));
CREATE TABLE tickets (id INT NOT NULL, cashregister_id INT NOT NULL, user_id INT NOT NULL, customer_id INT DEFAULT NULL, tariffarea_id INT DEFAULT NULL, discountprofile_id INT DEFAULT NULL, sequence INT NOT NULL, number INT NOT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, custCount INT DEFAULT NULL, discountRate DOUBLE PRECISION NOT NULL, price DOUBLE PRECISION DEFAULT NULL, taxedPrice DOUBLE PRECISION DEFAULT NULL, finalPrice DOUBLE PRECISION NOT NULL, finalTaxedPrice DOUBLE PRECISION NOT NULL, custBalance DOUBLE PRECISION NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_54469DF49ED3320C ON tickets (cashregister_id);
CREATE INDEX IDX_54469DF4A76ED395 ON tickets (user_id);
CREATE INDEX IDX_54469DF49395C3F3 ON tickets (customer_id);
CREATE INDEX IDX_54469DF454EC7A8F ON tickets (tariffarea_id);
CREATE INDEX IDX_54469DF4E1BC3B58 ON tickets (discountprofile_id);
CREATE UNIQUE INDEX ticket_index ON tickets (cashregister_id, number);
CREATE TABLE floors (id INT NOT NULL, label VARCHAR(255) NOT NULL, image BYTEA DEFAULT NULL, disp_order INT NOT NULL, PRIMARY KEY(id));
CREATE TABLE compositiongroups (id INT NOT NULL, product_id INT NOT NULL, label VARCHAR(255) NOT NULL, disp_order INT NOT NULL, image BYTEA DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_C72568934584665A ON compositiongroups (product_id);
CREATE TABLE sessioncustbalances (cashsession_id INT NOT NULL, customer_id INT NOT NULL, balance DOUBLE PRECISION NOT NULL, PRIMARY KEY(cashsession_id, customer_id));
CREATE INDEX IDX_9D3CBD8BC914703E ON sessioncustbalances (cashsession_id);
CREATE INDEX IDX_9D3CBD8B9395C3F3 ON sessioncustbalances (customer_id);
CREATE TABLE options (name VARCHAR(255) NOT NULL, system BOOLEAN NOT NULL, content TEXT NOT NULL, PRIMARY KEY(name));
CREATE TABLE sessiontaxes (cashsession_id INT NOT NULL, tax_id INT NOT NULL, taxRate DOUBLE PRECISION NOT NULL, base DOUBLE PRECISION NOT NULL, basePeriod DOUBLE PRECISION NOT NULL, baseFYear DOUBLE PRECISION NOT NULL, amount DOUBLE PRECISION NOT NULL, amountPeriod DOUBLE PRECISION NOT NULL, amountFYear DOUBLE PRECISION NOT NULL, PRIMARY KEY(cashsession_id, tax_id));
CREATE INDEX IDX_59DAD7C9C914703E ON sessiontaxes (cashsession_id);
CREATE INDEX IDX_59DAD7C9B2A824D8 ON sessiontaxes (tax_id);
CREATE TABLE products (id INT NOT NULL, category_id INT NOT NULL, tax_id INT NOT NULL, reference VARCHAR(255) NOT NULL, barcode VARCHAR(255) DEFAULT NULL, label VARCHAR(255) NOT NULL, priceBuy DOUBLE PRECISION DEFAULT NULL, priceSell DOUBLE PRECISION NOT NULL, visible BOOLEAN NOT NULL, scaled BOOLEAN NOT NULL, scaleType SMALLINT NOT NULL, scaleValue DOUBLE PRECISION NOT NULL, disp_order INT NOT NULL, hasImage BOOLEAN NOT NULL, discountEnabled BOOLEAN NOT NULL, discountRate DOUBLE PRECISION NOT NULL, prepay BOOLEAN NOT NULL, composition BOOLEAN NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_B3BA5A5AAEA34913 ON products (reference);
CREATE INDEX IDX_B3BA5A5A12469DE2 ON products (category_id);
CREATE INDEX IDX_B3BA5A5AB2A824D8 ON products (tax_id);
CREATE TABLE customers (id INT NOT NULL, tax_id INT DEFAULT NULL, discountprofile_id INT DEFAULT NULL, dispName VARCHAR(255) NOT NULL, card VARCHAR(255) NOT NULL, firstName VARCHAR(255) NOT NULL, lastName VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, phone1 VARCHAR(255) NOT NULL, phone2 VARCHAR(255) NOT NULL, fax VARCHAR(255) NOT NULL, addr1 VARCHAR(255) NOT NULL, addr2 VARCHAR(255) NOT NULL, zipCode VARCHAR(255) NOT NULL, city VARCHAR(255) NOT NULL, region VARCHAR(255) NOT NULL, country VARCHAR(255) NOT NULL, balance DOUBLE PRECISION NOT NULL, maxDebt DOUBLE PRECISION NOT NULL, note TEXT NOT NULL, visible BOOLEAN NOT NULL, expireDate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, hasImage BOOLEAN NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_62534E21B2A824D8 ON customers (tax_id);
CREATE INDEX IDX_62534E21E1BC3B58 ON customers (discountprofile_id);
CREATE TABLE sessioncats (cashsession_id INT NOT NULL, reference VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, amount DOUBLE PRECISION NOT NULL, PRIMARY KEY(cashsession_id, reference));
CREATE INDEX IDX_F32F3B52C914703E ON sessioncats (cashsession_id);
CREATE TABLE paymentmodereturns (paymentmode_id INT NOT NULL, returnmode_id INT NOT NULL, minAmount DOUBLE PRECISION NOT NULL, PRIMARY KEY(paymentmode_id, minAmount));
CREATE INDEX IDX_968A92FABEEF95F ON paymentmodereturns (paymentmode_id);
CREATE INDEX IDX_968A92FCA0BF816 ON paymentmodereturns (returnmode_id);
CREATE TABLE images (model VARCHAR(255) NOT NULL, modelId VARCHAR(255) NOT NULL, mimeType VARCHAR(255) NOT NULL, image BYTEA NOT NULL, PRIMARY KEY(model, modelId));
CREATE TABLE places (id INT NOT NULL, floor_id INT NOT NULL, label VARCHAR(255) NOT NULL, x INT NOT NULL, y INT NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_FEAF6C55854679E2 ON places (floor_id);
CREATE TABLE tariffareaprices (tariffarea_id INT NOT NULL, product_id INT NOT NULL, tax_id INT DEFAULT NULL, price DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(tariffarea_id, product_id));
CREATE INDEX IDX_E1F3B96454EC7A8F ON tariffareaprices (tariffarea_id);
CREATE INDEX IDX_E1F3B9644584665A ON tariffareaprices (product_id);
CREATE INDEX IDX_E1F3B964B2A824D8 ON tariffareaprices (tax_id);
CREATE TABLE compositionproducts (compositiongroup_id INT NOT NULL, product_id INT NOT NULL, disp_order INT NOT NULL, PRIMARY KEY(compositiongroup_id, product_id));
CREATE INDEX IDX_DA85AC5F976B2F42 ON compositionproducts (compositiongroup_id);
CREATE INDEX IDX_DA85AC5F4584665A ON compositionproducts (product_id);
CREATE TABLE cashregisters (id INT NOT NULL, reference VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, nextTicketId INT NOT NULL, nextSessionId INT NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_4DC8569BAEA34913 ON cashregisters (reference);
CREATE TABLE sessionpayments (cashsession_id INT NOT NULL, paymentmode_id INT NOT NULL, currency_id INT NOT NULL, amount DOUBLE PRECISION NOT NULL, currencyAmount DOUBLE PRECISION NOT NULL, PRIMARY KEY(cashsession_id, paymentmode_id, currency_id));
CREATE INDEX IDX_342F815C914703E ON sessionpayments (cashsession_id);
CREATE INDEX IDX_342F815ABEEF95F ON sessionpayments (paymentmode_id);
CREATE INDEX IDX_342F81538248176 ON sessionpayments (currency_id);
CREATE TABLE ticketlines (ticket_id INT NOT NULL, product_id INT DEFAULT NULL, tax_id INT NOT NULL, dispOrder INT NOT NULL, productLabel VARCHAR(255) NOT NULL, unitPrice DOUBLE PRECISION DEFAULT NULL, taxedUnitPrice DOUBLE PRECISION DEFAULT NULL, quantity DOUBLE PRECISION NOT NULL, price DOUBLE PRECISION DEFAULT NULL, taxedPrice DOUBLE PRECISION NOT NULL, taxRate DOUBLE PRECISION NOT NULL, discountRate DOUBLE PRECISION NOT NULL, finalPrice DOUBLE PRECISION DEFAULT NULL, finalTaxedPrice DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(ticket_id, dispOrder));
CREATE INDEX IDX_20FFE9B5700047D2 ON ticketlines (ticket_id);
CREATE INDEX IDX_20FFE9B54584665A ON ticketlines (product_id);
CREATE INDEX IDX_20FFE9B5B2A824D8 ON ticketlines (tax_id);
CREATE TABLE sessions (id INT NOT NULL, cashregister_id INT NOT NULL, sequence INT NOT NULL, continuous BOOLEAN NOT NULL, openDate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, closeDate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, openCash DOUBLE PRECISION DEFAULT NULL, closeCash DOUBLE PRECISION DEFAULT NULL, expectedCash DOUBLE PRECISION DEFAULT NULL, ticketCount INT DEFAULT NULL, custCount INT DEFAULT NULL, cs DOUBLE PRECISION DEFAULT NULL, csPeriod DOUBLE PRECISION NOT NULL, csFYear DOUBLE PRECISION NOT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_9A609D139ED3320C ON sessions (cashregister_id);
CREATE UNIQUE INDEX session_index ON sessions (cashregister_id, sequence);
CREATE TABLE ticketpayments (ticket_id INT NOT NULL, paymentmode_id INT NOT NULL, currency_id INT NOT NULL, dispOrder INT NOT NULL, amount DOUBLE PRECISION NOT NULL, currencyAmount DOUBLE PRECISION NOT NULL, PRIMARY KEY(ticket_id, dispOrder));
CREATE INDEX IDX_1D56231D700047D2 ON ticketpayments (ticket_id);
CREATE INDEX IDX_1D56231DABEEF95F ON ticketpayments (paymentmode_id);
CREATE INDEX IDX_1D56231D38248176 ON ticketpayments (currency_id);
CREATE TABLE categories (id INT NOT NULL, parent_id INT DEFAULT NULL, reference VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, hasImage BOOLEAN NOT NULL, disp_order INT NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_3AF34668AEA34913 ON categories (reference);
CREATE INDEX IDX_3AF34668727ACA70 ON categories (parent_id);
CREATE TABLE tickettaxes (ticket_id INT NOT NULL, tax_id INT NOT NULL, taxRate DOUBLE PRECISION NOT NULL, base DOUBLE PRECISION NOT NULL, amount DOUBLE PRECISION NOT NULL, PRIMARY KEY(ticket_id, tax_id));
CREATE INDEX IDX_AD70C2DB700047D2 ON tickettaxes (ticket_id);
CREATE INDEX IDX_AD70C2DBB2A824D8 ON tickettaxes (tax_id);
CREATE TABLE discounts (id INT NOT NULL, startDate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, endDate TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, rate DOUBLE PRECISION NOT NULL, barcode VARCHAR(255) DEFAULT NULL, barcodeType INT NOT NULL, disp_order INT NOT NULL, PRIMARY KEY(id));
CREATE TABLE tariffareas (id INT NOT NULL, reference VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, disp_order INT NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_A2F17FC9AEA34913 ON tariffareas (reference);
CREATE TABLE currencies (id INT NOT NULL, reference VARCHAR(255) NOT NULL, label VARCHAR(255) NOT NULL, symbol VARCHAR(255) NOT NULL, decimalSeparator VARCHAR(255) NOT NULL, thousandsSeparator VARCHAR(255) NOT NULL, format VARCHAR(255) NOT NULL, rate DOUBLE PRECISION NOT NULL, main BOOLEAN NOT NULL, visible BOOLEAN NOT NULL, PRIMARY KEY(id));
CREATE UNIQUE INDEX UNIQ_37C44693AEA34913 ON currencies (reference);
CREATE TABLE sessioncattaxes (cashsession_id INT NOT NULL, reference VARCHAR(255) NOT NULL, tax_id INT NOT NULL, label VARCHAR(255) NOT NULL, base DOUBLE PRECISION NOT NULL, amount DOUBLE PRECISION NOT NULL, PRIMARY KEY(cashsession_id, reference, tax_id));
CREATE INDEX IDX_E4084375C914703E ON sessioncattaxes (cashsession_id);
CREATE INDEX IDX_E4084375B2A824D8 ON sessioncattaxes (tax_id);
CREATE TABLE paymentmodevalues (paymentmode_id INT NOT NULL, value DOUBLE PRECISION NOT NULL, hasImage BOOLEAN NOT NULL, PRIMARY KEY(paymentmode_id, value));
CREATE INDEX IDX_4CB607B0ABEEF95F ON paymentmodevalues (paymentmode_id);
CREATE TABLE fiscaltickets (type VARCHAR(255) NOT NULL, sequence VARCHAR(255) NOT NULL, number INT NOT NULL, date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, content TEXT NOT NULL, signature VARCHAR(255) NOT NULL, PRIMARY KEY(type, sequence, number));
CREATE TABLE discountprofiles (id INT NOT NULL, label VARCHAR(255) NOT NULL, rate DOUBLE PRECISION NOT NULL, PRIMARY KEY(id));
CREATE TABLE taxes (id INT NOT NULL, label VARCHAR(255) NOT NULL, rate DOUBLE PRECISION NOT NULL, PRIMARY KEY(id));
CREATE TABLE users (id INT NOT NULL, role_id INT NOT NULL, name VARCHAR(255) NOT NULL, password VARCHAR(255) DEFAULT NULL, active BOOLEAN NOT NULL, hasImage BOOLEAN NOT NULL, card VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id));
CREATE INDEX IDX_1483A5E9D60322AC ON users (role_id);
CREATE TABLE roles (id INT NOT NULL, name VARCHAR(255) NOT NULL, permissions TEXT NOT NULL, PRIMARY KEY(id));
CREATE SEQUENCE paymentmodes_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE tickets_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE floors_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE compositiongroups_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE products_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE customers_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE places_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE cashregisters_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE sessions_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE categories_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE discounts_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE tariffareas_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE currencies_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE discountprofiles_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE taxes_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE users_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
CREATE SEQUENCE roles_id_seq INCREMENT BY 1 MINVALUE 1 START 1;
ALTER TABLE tickets ADD CONSTRAINT FK_54469DF49ED3320C FOREIGN KEY (cashregister_id) REFERENCES cashregisters (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tickets ADD CONSTRAINT FK_54469DF4A76ED395 FOREIGN KEY (user_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tickets ADD CONSTRAINT FK_54469DF49395C3F3 FOREIGN KEY (customer_id) REFERENCES customers (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tickets ADD CONSTRAINT FK_54469DF454EC7A8F FOREIGN KEY (tariffarea_id) REFERENCES tariffareas (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tickets ADD CONSTRAINT FK_54469DF4E1BC3B58 FOREIGN KEY (discountprofile_id) REFERENCES discountprofiles (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE compositiongroups ADD CONSTRAINT FK_C72568934584665A FOREIGN KEY (product_id) REFERENCES products (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessioncustbalances ADD CONSTRAINT FK_9D3CBD8BC914703E FOREIGN KEY (cashsession_id) REFERENCES sessions (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessioncustbalances ADD CONSTRAINT FK_9D3CBD8B9395C3F3 FOREIGN KEY (customer_id) REFERENCES customers (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessiontaxes ADD CONSTRAINT FK_59DAD7C9C914703E FOREIGN KEY (cashsession_id) REFERENCES sessions (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessiontaxes ADD CONSTRAINT FK_59DAD7C9B2A824D8 FOREIGN KEY (tax_id) REFERENCES taxes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE products ADD CONSTRAINT FK_B3BA5A5A12469DE2 FOREIGN KEY (category_id) REFERENCES categories (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE products ADD CONSTRAINT FK_B3BA5A5AB2A824D8 FOREIGN KEY (tax_id) REFERENCES taxes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE customers ADD CONSTRAINT FK_62534E21B2A824D8 FOREIGN KEY (tax_id) REFERENCES taxes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE customers ADD CONSTRAINT FK_62534E21E1BC3B58 FOREIGN KEY (discountprofile_id) REFERENCES discountprofiles (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessioncats ADD CONSTRAINT FK_F32F3B52C914703E FOREIGN KEY (cashsession_id) REFERENCES sessions (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE paymentmodereturns ADD CONSTRAINT FK_968A92FABEEF95F FOREIGN KEY (paymentmode_id) REFERENCES paymentmodes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE paymentmodereturns ADD CONSTRAINT FK_968A92FCA0BF816 FOREIGN KEY (returnmode_id) REFERENCES paymentmodes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE places ADD CONSTRAINT FK_FEAF6C55854679E2 FOREIGN KEY (floor_id) REFERENCES floors (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tariffareaprices ADD CONSTRAINT FK_E1F3B96454EC7A8F FOREIGN KEY (tariffarea_id) REFERENCES tariffareas (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tariffareaprices ADD CONSTRAINT FK_E1F3B9644584665A FOREIGN KEY (product_id) REFERENCES products (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tariffareaprices ADD CONSTRAINT FK_E1F3B964B2A824D8 FOREIGN KEY (tax_id) REFERENCES taxes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE compositionproducts ADD CONSTRAINT FK_DA85AC5F976B2F42 FOREIGN KEY (compositiongroup_id) REFERENCES compositiongroups (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE compositionproducts ADD CONSTRAINT FK_DA85AC5F4584665A FOREIGN KEY (product_id) REFERENCES products (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessionpayments ADD CONSTRAINT FK_342F815C914703E FOREIGN KEY (cashsession_id) REFERENCES sessions (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessionpayments ADD CONSTRAINT FK_342F815ABEEF95F FOREIGN KEY (paymentmode_id) REFERENCES paymentmodes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessionpayments ADD CONSTRAINT FK_342F81538248176 FOREIGN KEY (currency_id) REFERENCES currencies (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE ticketlines ADD CONSTRAINT FK_20FFE9B5700047D2 FOREIGN KEY (ticket_id) REFERENCES tickets (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE ticketlines ADD CONSTRAINT FK_20FFE9B54584665A FOREIGN KEY (product_id) REFERENCES products (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE ticketlines ADD CONSTRAINT FK_20FFE9B5B2A824D8 FOREIGN KEY (tax_id) REFERENCES taxes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessions ADD CONSTRAINT FK_9A609D139ED3320C FOREIGN KEY (cashregister_id) REFERENCES cashregisters (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE ticketpayments ADD CONSTRAINT FK_1D56231D700047D2 FOREIGN KEY (ticket_id) REFERENCES tickets (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE ticketpayments ADD CONSTRAINT FK_1D56231DABEEF95F FOREIGN KEY (paymentmode_id) REFERENCES paymentmodes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE ticketpayments ADD CONSTRAINT FK_1D56231D38248176 FOREIGN KEY (currency_id) REFERENCES currencies (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE categories ADD CONSTRAINT FK_3AF34668727ACA70 FOREIGN KEY (parent_id) REFERENCES categories (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tickettaxes ADD CONSTRAINT FK_AD70C2DB700047D2 FOREIGN KEY (ticket_id) REFERENCES tickets (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE tickettaxes ADD CONSTRAINT FK_AD70C2DBB2A824D8 FOREIGN KEY (tax_id) REFERENCES taxes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessioncattaxes ADD CONSTRAINT FK_E4084375C914703E FOREIGN KEY (cashsession_id) REFERENCES sessions (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE sessioncattaxes ADD CONSTRAINT FK_E4084375B2A824D8 FOREIGN KEY (tax_id) REFERENCES taxes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE paymentmodevalues ADD CONSTRAINT FK_4CB607B0ABEEF95F FOREIGN KEY (paymentmode_id) REFERENCES paymentmodes (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
ALTER TABLE users ADD CONSTRAINT FK_1483A5E9D60322AC FOREIGN KEY (role_id) REFERENCES roles (id) NOT DEFERRABLE INITIALLY IMMEDIATE;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment