001_InventoryStore.sql 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. CREATE TABLE InventoryFolders (
  2. ID VARCHAR(36) NOT NULL,
  3. Type SMALLINT DEFAULT NULL,
  4. Version INT DEFAULT NULL,
  5. ParentID VARCHAR(36) DEFAULT NULL,
  6. Owner VARCHAR(36) DEFAULT NULL,
  7. Name VARCHAR(64) DEFAULT NULL,
  8. PRIMARY KEY (ID)
  9. );
  10. CREATE INDEX InventoryFoldersOwnerIdIndex ON InventoryFolders (Owner);
  11. CREATE INDEX InventoryFoldersParentIdIndex ON InventoryFolders (ParentID);
  12. CREATE TABLE InventoryItems (
  13. ID VARCHAR(36) NOT NULL,
  14. InvType INT DEFAULT NULL,
  15. AssetType INT DEFAULT NULL,
  16. AssetID VARCHAR(36) DEFAULT NULL,
  17. Folder VARCHAR(36) DEFAULT NULL,
  18. Owner VARCHAR(36) DEFAULT NULL,
  19. Creator VARCHAR(36) DEFAULT NULL,
  20. Name VARCHAR(64) DEFAULT NULL,
  21. Description VARCHAR(64) DEFAULT NULL,
  22. NextPermissions INT DEFAULT NULL,
  23. CurrentPermissions INT DEFAULT NULL,
  24. BasePermissions INT DEFAULT NULL,
  25. EveryOnePermissions INT DEFAULT NULL,
  26. GroupID VARCHAR(36) DEFAULT NULL,
  27. GroupOwned BOOLEAN DEFAULT NULL,
  28. SalePrice INT DEFAULT NULL,
  29. SaleType SMALLINT DEFAULT NULL,
  30. Flags INT DEFAULT NULL,
  31. CreationDate INT DEFAULT NULL,
  32. PRIMARY KEY (ID)
  33. );
  34. CREATE INDEX InventoryItemsGroupIdIndex ON InventoryItems (GroupID);
  35. CREATE INDEX InventoryItemsOwnerIdIndex ON InventoryItems (Owner);
  36. CREATE INDEX InventoryItemsFolderIdIndex ON InventoryItems (Folder);