Some checks failed
Build & Release / build (push) Failing after 1m53s
Main added 0041_app_settings, so branch migrations shift up by one. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
13 lines
482 B
SQL
13 lines
482 B
SQL
-- Named registers for POS terminals
|
|
CREATE TABLE IF NOT EXISTS register (
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
|
location_id UUID NOT NULL REFERENCES location(id),
|
|
name VARCHAR(100) NOT NULL,
|
|
is_active BOOLEAN NOT NULL DEFAULT true,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
-- Link drawer sessions to registers
|
|
ALTER TABLE drawer_session ADD COLUMN IF NOT EXISTS register_id UUID REFERENCES register(id);
|