17 lines
453 B
SQL
17 lines
453 B
SQL
-- SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
|
|
--
|
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
CREATE TABLE IF NOT EXISTS cqrs_inventory_category_query
|
|
(
|
|
version bigint CHECK (version >= 0) NOT NULL,
|
|
|
|
name TEXT NOT NULL,
|
|
description TEXT,
|
|
store_id UUID NOT NULL,
|
|
deleted BOOLEAN NOT NULL DEFAULT FALSE,
|
|
category_id UUID NOT NULL UNIQUE,
|
|
UNIQUE(store_id, name),
|
|
|
|
PRIMARY KEY (category_id)
|
|
);
|