SET IDENTITY_INSERT DictObjectTypes ON

INSERT INTO DictObjectTypes(ID, ParentTypeID, LogicalName, PhysicalName) VALUES (1, NULL, 'Базовый объект', 'BaseObject')
INSERT INTO DictObjectTypes(ID, ParentTypeID, LogicalName, PhysicalName) VALUES (2, 1, 'Папка объектов', 'Folder')

SET IDENTITY_INSERT DictObjectTypes OFF

SET IDENTITY_INSERT Attribute ON

INSERT INTO Attribute(ID, ObjectTypeID, LogicalName, PhysicalName, IsNullable) VALUES (1, 1, 'Код объекта', 'ID', 0)
INSERT INTO Attribute(ID, ObjectTypeID, LogicalName, PhysicalName, IsNullable) VALUES (2, 1, 'Код объекта-владельца', 'ParentID', 1)
INSERT INTO Attribute(ID, ObjectTypeID, LogicalName, PhysicalName, IsNullable) VALUES (3, 1, 'Наименование', 'ObjectName', 0)
INSERT INTO Attribute(ID, ObjectTypeID, LogicalName, PhysicalName, IsNullable) VALUES (4, 1, 'Код типа объекта', 'ObjectTypeID', 0)

INSERT INTO Attribute(ID, ObjectTypeID, LogicalName, PhysicalName, IsNullable) VALUES (5, 2, 'Код папки', 'ID', 0)

SET IDENTITY_INSERT Attribute OFF

DELETE FROM Folder
DELETE FROM BaseObject

SET IDENTITY_INSERT BaseObject ON
INSERT INTO BaseObject (ID, ParentID, ObjectName, ObjectTypeID) VALUES (1, NULL, 'абстрактный объект', 1)

INSERT INTO BaseObject (ID, ParentID, ObjectName, ObjectTypeID) VALUES (2, 1, 'test-folder', 2)
INSERT INTO Folder (ID) VALUES (1)

INSERT INTO BaseObject (ID, ParentID, ObjectName, ObjectTypeID) VALUES (3, NULL, 'test-folder2', 2)
INSERT INTO Folder (ID) VALUES (3)

INSERT INTO BaseObject (ID, ParentID, ObjectName, ObjectTypeID) VALUES (4, 3, 'test-folder3', 2)
INSERT INTO Folder (ID) VALUES (4)

INSERT INTO BaseObject (ID, ParentID, ObjectName, ObjectTypeID) VALUES (5, 4, 'test-folder4', 2)
INSERT INTO Folder (ID) VALUES (5)

INSERT INTO BaseObject (ID, ParentID, ObjectName, ObjectTypeID) VALUES (6, 5, 'test-folder4', 2)
INSERT INTO Folder (ID) VALUES (6)

SET IDENTITY_INSERT BaseObject OFF
