vanikam/migrations/20240914121604_cqrs_ordering_product_query.sql
Aravinth Manivannan cddba71eb5
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
feat: import inventory services&domain obj to implement pantry
2024-09-16 14:55:48 +05:30

29 lines
682 B
SQL

-- Add migration script here
CREATE TABLE IF NOT EXISTS cqrs_ordering_product_query
(
version bigint CHECK (version >= 0) NOT NULL,
name TEXT NOT NULL,
description TEXT,
image TEXT,
sku_able BOOLEAN NOT NULL DEFAULT FALSE,
product_id UUID NOT NULL UNIQUE,
price_minor INTEGER NOT NULL,
price_major INTEGER NOT NULL,
price_currency TEXT NOT NULL,
quantity_major_number INTEGER NOT NULL,
quantity_minor_number INTEGER NOT NULL,
quantity_major_unit TEXT NOT NULL,
quantity_minor_unit TEXT NOT NULL,
category_id UUID NOT NULL,
deleted BOOLEAN NOT NULL DEFAULT FALSE,
UNIQUE(category_id, name),
PRIMARY KEY (product_id)
)