Fase 2: Gestión de Atributos Dinámicos (Back & Front EAV Definition)

This commit is contained in:
2025-12-17 13:25:35 -03:00
parent fae9101c63
commit b3b553495b
9 changed files with 184 additions and 0 deletions

View File

@@ -111,6 +111,18 @@ BEGIN
FOREIGN KEY (OperationId) REFERENCES Operations(Id) ON DELETE CASCADE
);
END
IF NOT EXISTS (SELECT * FROM sys.tables WHERE name = 'AttributeDefinitions')
BEGIN
CREATE TABLE AttributeDefinitions (
Id INT IDENTITY(1,1) PRIMARY KEY,
CategoryId INT NOT NULL,
Name NVARCHAR(100) NOT NULL,
DataType NVARCHAR(20) NOT NULL,
Required BIT DEFAULT 0,
FOREIGN KEY (CategoryId) REFERENCES Categories(Id) ON DELETE CASCADE
);
END
";
await connection.ExecuteAsync(schemaSql);
}