vanikam/migrations/20240723095912_cqrs_ordering_line_item_query.sql
Aravinth Manivannan e592eec19c
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
fix: link LineItem to Kot
2024-07-23 21:25:46 +05:30

25 lines
694 B
SQL

-- SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later
CREATE TABLE IF NOT EXISTS cqrs_ordering_line_item_query
(
version bigint CHECK (version >= 0) NOT NULL,
created_time timestamp with time zone DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
line_item_id UUID NOT NULL UNIQUE,
kot_id UUID NOT NULL,
product_name TEXT NOT NULL,
product_id UUID 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,
deleted BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (line_item_id)
);