mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
chore: update port so it doesn't conflict with sso
This commit is contained in:
@@ -36,7 +36,7 @@ CREATE TABLE product_categories (
|
||||
CREATE UNIQUE INDEX product_categories_code_unique ON product_categories (code) WHERE deleted_at IS NULL;
|
||||
|
||||
-- UOM
|
||||
CREATE TABLE uom (
|
||||
CREATE TABLE uoms (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
name VARCHAR NOT NULL,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
@@ -51,11 +51,11 @@ CREATE TABLE products (
|
||||
name VARCHAR NOT NULL,
|
||||
brand VARCHAR NOT NULL,
|
||||
sku VARCHAR(100),
|
||||
uom_id BIGINT NOT NULL REFERENCES uom(id),
|
||||
uom_id BIGINT NOT NULL REFERENCES uoms(id),
|
||||
product_category_id BIGINT NOT NULL REFERENCES product_categories(id),
|
||||
product_price NUMERIC(15,2) NOT NULL,
|
||||
selling_price NUMERIC(15,2),
|
||||
tax NUMERIC(15,2),
|
||||
product_price NUMERIC(15,3) NOT NULL,
|
||||
selling_price NUMERIC(15,3),
|
||||
tax NUMERIC(15,3),
|
||||
expiry_period INT,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
@@ -134,7 +134,7 @@ CREATE TABLE customers (
|
||||
phone VARCHAR(20) NOT NULL,
|
||||
email VARCHAR NOT NULL,
|
||||
account_number VARCHAR(50) NOT NULL,
|
||||
balance NUMERIC(15,2) DEFAULT 0,
|
||||
balance NUMERIC(15,3) DEFAULT 0,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
deleted_at TIMESTAMPTZ,
|
||||
@@ -145,7 +145,7 @@ CREATE TABLE customers (
|
||||
CREATE TABLE nonstocks (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
name VARCHAR NOT NULL,
|
||||
uom_id BIGINT NOT NULL REFERENCES uom(id),
|
||||
uom_id BIGINT NOT NULL REFERENCES uoms(id),
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
deleted_at TIMESTAMPTZ,
|
||||
@@ -153,7 +153,7 @@ CREATE TABLE nonstocks (
|
||||
);
|
||||
|
||||
-- FCR
|
||||
CREATE TABLE fcr (
|
||||
CREATE TABLE fcrs (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
name VARCHAR NOT NULL,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
@@ -164,10 +164,10 @@ CREATE TABLE fcr (
|
||||
|
||||
CREATE TABLE fcr_standards (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
fcr_id BIGINT NOT NULL REFERENCES fcr(id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
weight NUMERIC(15,2) NOT NULL,
|
||||
fcr_number NUMERIC(15,2) NOT NULL,
|
||||
mortality NUMERIC(15,2) NOT NULL,
|
||||
fcr_id BIGINT NOT NULL REFERENCES fcrs(id) ON DELETE CASCADE ON UPDATE CASCADE,
|
||||
weight NUMERIC(15,3) NOT NULL,
|
||||
fcr_number NUMERIC(15,3) NOT NULL,
|
||||
mortality NUMERIC(15,3) NOT NULL,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
deleted_at TIMESTAMPTZ
|
||||
@@ -186,7 +186,7 @@ CREATE TABLE suppliers (
|
||||
address TEXT NOT NULL,
|
||||
npwp VARCHAR(50),
|
||||
account_number VARCHAR(50),
|
||||
balance NUMERIC(15,2) DEFAULT 0,
|
||||
balance NUMERIC(15,3) DEFAULT 0,
|
||||
due_date INT NOT NULL,
|
||||
created_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
updated_at TIMESTAMPTZ DEFAULT NOW(),
|
||||
|
||||
Reference in New Issue
Block a user