Fase 2: Gestión de Atributos Dinámicos (Back & Front EAV Definition)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user