vanikam/migrations/20241007085926_employee_query.sql
Aravinth Manivannan b4c9e025bc
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: impl idnetity DB adapters and View for employee aggregate
2024-10-08 16:39:10 +05:30

28 lines
665 B
SQL

-- SPDX-FileCopyrightText: 2024 Aravinth Manivannan <realaravinth@batsense.net>
--
-- SPDX-License-Identifier: AGPL-3.0-or-later
CREATE TABLE IF NOT EXISTS cqrs_identity_employee_query
(
version bigint CHECK (version >= 0) NOT NULL,
created_time timestamp with time zone DEFAULT (CURRENT_TIMESTAMP) NOT NULL,
first_name TEXT NOT NULL,
last_name TEXT NOT NULL,
emp_id UUID NOT NULL UNIQUE,
phone_number_country_code INTEGER NOT NULL,
phone_number_number BIGINT NOT NULL,
phone_verified BOOLEAN NOT NULL DEFAULT FALSE,
store_id UUID DEFAULT NULL,
deleted BOOLEAN NOT NULL DEFAULT FALSE,
PRIMARY KEY (emp_id)
);