Files
Stefan 10ecdfa2e4 Add Fuchs_Database SSDT project (schema source of truth)
Adds the SQL Server Data Tools project for the fuchs_fds database — tables,
table types, functions and stored procedures that the backend calls (e.g.
fds__getInvoice, fds__merge_bankingtransactions, fds__tt__bankingtransactions,
fds__admin_getReportCatalog, fis_* auth). Build/model caches (bin, obj,
*.dbmdl, *.jfm, *.user) are git-ignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 14:50:54 +02:00

24 lines
1.2 KiB
Transact-SQL

CREATE TABLE [dbo].[fuchs_planner_groups] (
[group_id] INT NOT NULL,
[code] AS ([dbo].[ott_b26]([group_id])),
[planner_id] TINYINT NOT NULL,
[sequence_order] TINYINT CONSTRAINT [DF_fuchs_planner_groups_order] DEFAULT ((0)) NOT NULL,
[parent_codes] VARCHAR (50) NULL,
[condition] VARCHAR (50) NULL,
[shortname] VARCHAR (15) NULL,
[name] VARCHAR (100) NULL,
[description] VARCHAR (MAX) NULL,
[selection_type] VARCHAR (10) NULL,
[final] BIT CONSTRAINT [DF_fuchs_planner_groups_final] DEFAULT ((0)) NOT NULL,
[hide] BIT CONSTRAINT [DF_fuchs_planner_groups_hide] DEFAULT ((0)) NOT NULL,
CONSTRAINT [PK_fuchs_planner_groups] PRIMARY KEY CLUSTERED ([group_id] ASC),
CONSTRAINT [FK_fuchs_planner_groups_fuchs_planner] FOREIGN KEY ([planner_id]) REFERENCES [dbo].[fuchs_planner] ([planner_id]),
CONSTRAINT [FK_fuchs_planner_groups_fuchs_planner_groups] FOREIGN KEY ([group_id]) REFERENCES [dbo].[fuchs_planner_groups] ([group_id])
);
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_fuchs_planner_groups]
ON [dbo].[fuchs_planner_groups]([planner_id] ASC, [sequence_order] ASC);