16 lines
450 B
SQL
16 lines
450 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_kot_query
|
|
(
|
|
version bigint CHECK (version >= 0) NOT NULL,
|
|
|
|
created_time timestamp with time zone DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
|
|
order_id UUID NOT NULL,
|
|
kot_id UUID NOT NULL UNIQUE,
|
|
|
|
deleted BOOLEAN NOT NULL DEFAULT FALSE,
|
|
|
|
PRIMARY KEY (kot_id)
|
|
);
|