@snolla/data 0.0.0-stage → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/actor.d.ts +28 -0
  2. package/dist/actor.js +63 -0
  3. package/dist/audit.d.ts +36 -0
  4. package/dist/audit.js +198 -0
  5. package/dist/dataProvider.d.ts +41 -0
  6. package/dist/dataProvider.js +148 -0
  7. package/dist/dataSource.d.ts +4 -0
  8. package/dist/dataSource.js +65 -0
  9. package/dist/dbProvider.d.ts +1261 -0
  10. package/dist/dbProvider.js +1898 -0
  11. package/dist/freeze.d.ts +29 -0
  12. package/dist/freeze.js +69 -0
  13. package/dist/guard.d.ts +53 -0
  14. package/dist/guard.js +397 -0
  15. package/dist/insert.d.ts +9 -0
  16. package/dist/insert.js +44 -0
  17. package/dist/migrations/siteid.d.mts +738 -0
  18. package/dist/migrations/siteid.mjs +512 -0
  19. package/dist/publish.d.ts +1 -0
  20. package/dist/publish.js +1 -0
  21. package/dist/schema/dsl.d.ts +64 -0
  22. package/dist/schema/dsl.js +28 -0
  23. package/dist/schema/generate.d.mts +14 -0
  24. package/dist/schema/generate.mjs +282 -0
  25. package/dist/schema/generated/ddl.d.ts +7 -0
  26. package/dist/schema/generated/ddl.js +11 -0
  27. package/dist/schema/generated/kysely-types.d.ts +1988 -0
  28. package/dist/schema/generated/kysely-types.js +5 -0
  29. package/dist/schema/index.d.ts +2 -0
  30. package/dist/schema/index.js +7 -0
  31. package/dist/schema/provision.d.mts +11 -0
  32. package/dist/schema/provision.mjs +111 -0
  33. package/dist/schema/tables.d.ts +2 -0
  34. package/dist/schema/tables.js +3301 -0
  35. package/dist/scripts/canon-audit.d.mts +25 -0
  36. package/dist/scripts/canon-audit.mjs +213 -0
  37. package/dist/scripts/canon-smoke.d.mts +1 -0
  38. package/dist/scripts/canon-smoke.mjs +44 -0
  39. package/dist/scripts/dialect-ddl-stand.d.mts +1 -0
  40. package/dist/scripts/dialect-ddl-stand.mjs +136 -0
  41. package/dist/scripts/owner-spec-check.d.mts +1 -0
  42. package/dist/scripts/owner-spec-check.mjs +166 -0
  43. package/dist/scripts/owners/owner-resolve-spec.json +540 -0
  44. package/dist/scripts/owners-audit.d.mts +60 -0
  45. package/dist/scripts/owners-audit.mjs +443 -0
  46. package/dist/scripts/owners-fixture.d.mts +20 -0
  47. package/dist/scripts/owners-fixture.mjs +192 -0
  48. package/dist/scripts/schema-lengths-audit.d.mts +22 -0
  49. package/dist/scripts/schema-lengths-audit.mjs +146 -0
  50. package/dist/scripts/siteid-migrate.d.mts +7 -0
  51. package/dist/scripts/siteid-migrate.mjs +260 -0
  52. package/dist/scripts/tenant-invariant-audit.d.mts +1 -0
  53. package/dist/scripts/tenant-invariant-audit.mjs +34 -0
  54. package/dist/singleMode.d.ts +5 -0
  55. package/dist/singleMode.js +23 -0
  56. package/dist/sqliteDialect.d.ts +6 -0
  57. package/dist/sqliteDialect.js +92 -0
  58. package/dist/templateDefs.d.ts +38 -0
  59. package/dist/templateDefs.js +163 -0
  60. package/dist/test/fixtures/broken-driver/index.d.ts +3 -0
  61. package/dist/test/fixtures/broken-driver/index.js +5 -0
  62. package/dist/test/support/dialect-stand.d.ts +37 -0
  63. package/dist/test/support/dialect-stand.js +162 -0
  64. package/dist/test/support/render-parity.d.ts +44 -0
  65. package/dist/test/support/render-parity.js +262 -0
  66. package/package.json +50 -5
  67. package/README.md +0 -3
@@ -0,0 +1,11 @@
1
+ // GENERATED from the canonical schema — do not edit; run schema/generate.mjs
2
+ //
3
+ // Per-dialect DDL for the whole canon. The migration runner picks the
4
+ // dialect it is connected to (plan:49 Q5); the canon version below is the
5
+ // migration version.
6
+ export const CANON_VERSION = 1;
7
+ export const postgres = "-- GENERATED from the canonical schema — do not edit; run schema/generate.mjs\n-- dialect: postgres · canon version: 1 · tables: 120\n\ncreate table \"Accounts\" (\n \"AccountId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"AccountId\")\n);\n\ncreate table \"AdministratorAccounts\" (\n \"Administrator_Id\" uuid not null,\n \"Account_Id\" uuid not null,\n primary key (\"Administrator_Id\", \"Account_Id\")\n);\n\ncreate table \"AdministratorBlogs\" (\n \"Administrator_Id\" uuid not null,\n \"Blog_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"Administrator_Id\", \"Blog_Id\")\n);\ncreate index \"AdministratorBlogs_SiteId_idx\" on \"AdministratorBlogs\" (\"SiteId\");\n\ncreate table \"AdministratorSites\" (\n \"Administrator_Id\" uuid not null,\n \"Site_Id\" uuid not null,\n primary key (\"Administrator_Id\", \"Site_Id\")\n);\n\ncreate table \"AdministratorStores\" (\n \"Administrator_Id\" uuid not null,\n \"Store_Id\" uuid not null,\n primary key (\"Administrator_Id\", \"Store_Id\")\n);\n\ncreate table \"Administrators\" (\n \"AdministratorId\" uuid not null,\n \"Username\" varchar(256) null,\n \"FirstName\" varchar(50) null,\n \"LastName\" varchar(50) null,\n \"Email\" varchar(256) null,\n \"PasswordHash\" varchar(512) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"AdministratorId\")\n);\n\ncreate table \"ApiKeys\" (\n \"ApiKeyId\" uuid not null,\n \"AdministratorId\" uuid not null,\n \"Name\" varchar(200) not null,\n \"KeyPrefix\" varchar(8) not null,\n \"KeyHash\" varchar(64) not null,\n \"Scope\" varchar(500) null,\n \"ExpiresAt\" timestamp null,\n \"RevokedAt\" timestamp null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n primary key (\"ApiKeyId\")\n);\n\ncreate table \"BlackList\" (\n \"Id\" uuid not null,\n \"SiteId\" uuid not null,\n \"IpAddress\" varchar(50) not null,\n \"Reason\" varchar(255) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"Id\")\n);\ncreate index \"BlackList_SiteId_idx\" on \"BlackList\" (\"SiteId\");\n\ncreate table \"BlogAuthors\" (\n \"AuthorId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Slug\" varchar(100) not null,\n \"BlogId\" uuid not null,\n \"AdministratorId\" uuid not null,\n \"Content\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"AuthorId\")\n);\ncreate index \"BlogAuthors_SiteId_idx\" on \"BlogAuthors\" (\"SiteId\");\n\ncreate table \"BlogCategories\" (\n \"CategoryId\" uuid not null,\n \"BlogId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Description\" varchar(256) null,\n \"Alias\" varchar(100) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"Published\" boolean null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Content\" text null,\n \"SiteId\" uuid not null,\n primary key (\"CategoryId\")\n);\ncreate index \"BlogCategories_SiteId_idx\" on \"BlogCategories\" (\"SiteId\");\n\ncreate table \"BlogCategoryPosts\" (\n \"BlogCategory_Id\" uuid not null,\n \"Post_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"BlogCategory_Id\", \"Post_Id\")\n);\ncreate index \"BlogCategoryPosts_SiteId_idx\" on \"BlogCategoryPosts\" (\"SiteId\");\n\ncreate table \"BlogPostModuleTemplates\" (\n \"TemplateId\" uuid not null,\n \"BlogId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"BlogPostModuleTemplates_SiteId_idx\" on \"BlogPostModuleTemplates\" (\"SiteId\");\n\ncreate table \"BlogPostPartTemplates\" (\n \"TemplateId\" uuid not null,\n \"BlogId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"BlogPostPartTemplates_SiteId_idx\" on \"BlogPostPartTemplates\" (\"SiteId\");\n\ncreate table \"BlogPostTemplates\" (\n \"TemplateId\" uuid not null,\n \"BlogId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"BlogPostTemplates_SiteId_idx\" on \"BlogPostTemplates\" (\"SiteId\");\n\ncreate table \"BlogTagPosts\" (\n \"BlogTag_Id\" uuid not null,\n \"Post_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"BlogTag_Id\", \"Post_Id\")\n);\ncreate index \"BlogTagPosts_SiteId_idx\" on \"BlogTagPosts\" (\"SiteId\");\n\ncreate table \"BlogTags\" (\n \"TagId\" uuid not null,\n \"BlogId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Description\" varchar(256) null,\n \"Alias\" varchar(100) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"Published\" boolean null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Content\" text null,\n \"SiteId\" uuid not null,\n primary key (\"TagId\")\n);\ncreate index \"BlogTags_SiteId_idx\" on \"BlogTags\" (\"SiteId\");\n\ncreate table \"Blogs\" (\n \"BlogId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Title\" varchar(256) not null,\n \"Alias\" varchar(256) not null,\n \"Content\" text null,\n \"Subtitle\" varchar(256) null,\n \"About\" text null,\n \"AboutType\" integer null,\n \"TemplateSuffix\" varchar(50) null,\n \"PostContent\" text null,\n \"ImageModuleContent\" text null,\n \"GalleryModuleContent\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"MaxReplyCommentsLevels\" integer not null,\n \"AllowedCommentTags\" varchar(255) null,\n \"YearFormat\" varchar(255) null,\n \"MonthFormat\" varchar(255) null,\n \"DayFormat\" varchar(255) null,\n \"PostNumberFormat\" varchar(255) null,\n \"FeedPath\" varchar(255) null,\n \"CategoriesPath\" varchar(255) null,\n \"TagsPath\" varchar(255) null,\n \"ArchivesPath\" varchar(255) null,\n \"PostPath\" varchar(255) null,\n \"AuthorsPath\" varchar(255) null,\n \"BlogLayout\" varchar(100) null,\n \"ArchiveLayout\" varchar(100) null,\n \"AuthorLayout\" varchar(100) null,\n \"CategoryLayout\" varchar(100) null,\n \"TagLayout\" varchar(100) null,\n \"ArchivesLayout\" varchar(100) null,\n \"AuthorsLayout\" varchar(100) null,\n \"CategoriesLayout\" varchar(100) null,\n \"TagsLayout\" varchar(100) null,\n \"BlogFields\" text null,\n \"CategoryFields\" text null,\n \"TagFields\" text null,\n \"AuthorFields\" text null,\n \"FeedFormat\" varchar(10) not null,\n \"FeedLayout\" varchar(100) null,\n \"LastDateUpdated\" timestamp not null,\n \"UtcLastDateUpdated\" timestamp not null,\n \"BlogLayouts\" text null,\n \"CategoryLayouts\" text null,\n \"TagLayouts\" text null,\n \"AuthorLayouts\" text null,\n \"PostLayout\" varchar(100) null,\n \"CommentsAllowed\" boolean not null,\n \"YearFields\" text null,\n \"YearLayouts\" text null,\n \"MonthFields\" text null,\n \"MonthLayouts\" text null,\n \"DayFields\" text null,\n \"DayLayouts\" text null,\n \"CommentsCaptchaEnabled\" boolean not null,\n \"RecentlyViewedEnabled\" boolean not null,\n \"RecentlyViewedStorage\" integer not null,\n \"RecentlyViewedExpires\" integer null,\n \"RecentlyViewedListCapacity\" integer not null,\n \"Path\" varchar(256) null,\n \"MonthLayout\" varchar(100) null,\n \"DayLayout\" varchar(100) null,\n \"DefaultCorsPolicy\" text null,\n primary key (\"BlogId\")\n);\ncreate index \"Blogs_SiteId_idx\" on \"Blogs\" (\"SiteId\");\n\ncreate table \"CatalogCategories\" (\n \"CategoryId\" uuid not null,\n \"CatalogId\" uuid not null,\n \"Title\" varchar(255) not null,\n \"Slug\" varchar(255) not null,\n \"Content\" text null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"CategoryId\")\n);\ncreate index \"CatalogCategories_SiteId_idx\" on \"CatalogCategories\" (\"SiteId\");\n\ncreate table \"CatalogProductModuleTemplates\" (\n \"TemplateId\" uuid not null,\n \"CatalogId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"CatalogProductModuleTemplates_SiteId_idx\" on \"CatalogProductModuleTemplates\" (\"SiteId\");\n\ncreate table \"CatalogProductPartTemplates\" (\n \"TemplateId\" uuid not null,\n \"CatalogId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"CatalogProductPartTemplates_SiteId_idx\" on \"CatalogProductPartTemplates\" (\"SiteId\");\n\ncreate table \"CatalogProductTemplates\" (\n \"TemplateId\" uuid not null,\n \"CatalogId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"CatalogProductTemplates_SiteId_idx\" on \"CatalogProductTemplates\" (\"SiteId\");\n\ncreate table \"CatalogProducts\" (\n \"ProductId\" uuid not null,\n \"CatalogId\" uuid not null,\n \"TemplateId\" uuid not null,\n \"Number\" integer not null,\n \"Title\" varchar(255) not null,\n \"Slug\" varchar(255) not null,\n \"Content\" text null,\n \"Published\" boolean not null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"ProductId\")\n);\ncreate index \"CatalogProducts_SiteId_idx\" on \"CatalogProducts\" (\"SiteId\");\n\ncreate table \"CatalogProductsCategories\" (\n \"ProductId\" uuid not null,\n \"CategoryId\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"ProductId\", \"CategoryId\")\n);\ncreate index \"CatalogProductsCategories_SiteId_idx\" on \"CatalogProductsCategories\" (\"SiteId\");\n\ncreate table \"CatalogProductsTags\" (\n \"ProductId\" uuid not null,\n \"TagId\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"ProductId\", \"TagId\")\n);\ncreate index \"CatalogProductsTags_SiteId_idx\" on \"CatalogProductsTags\" (\"SiteId\");\n\ncreate table \"CatalogTags\" (\n \"TagId\" uuid not null,\n \"CatalogId\" uuid not null,\n \"Title\" varchar(255) not null,\n \"Slug\" varchar(255) not null,\n \"Content\" text null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TagId\")\n);\ncreate index \"CatalogTags_SiteId_idx\" on \"CatalogTags\" (\"SiteId\");\n\ncreate table \"Catalogs\" (\n \"CatalogId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Title\" varchar(255) not null,\n \"Path\" varchar(255) not null,\n \"Alias\" varchar(255) not null,\n \"Content\" text null,\n \"CatalogLayout\" varchar(100) null,\n \"CatalogLayouts\" text null,\n \"CatalogFields\" text null,\n \"CategoriesLayout\" varchar(100) null,\n \"CategoryLayout\" varchar(100) null,\n \"CategoryLayouts\" text null,\n \"CategoryFields\" text null,\n \"CategoriesPath\" varchar(255) null,\n \"TagsLayout\" varchar(100) null,\n \"TagLayout\" varchar(100) null,\n \"TagLayouts\" text null,\n \"TagFields\" text null,\n \"TagsPath\" varchar(255) null,\n \"ProductLayout\" varchar(100) null,\n \"ProductPath\" varchar(255) null,\n \"ProductsPath\" varchar(255) null,\n \"ProductNumberFormat\" varchar(50) null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"RecentlyViewedEnabled\" boolean not null,\n \"RecentlyViewedStorage\" integer not null,\n \"RecentlyViewedExpires\" integer null,\n \"RecentlyViewedListCapacity\" integer not null,\n \"DefaultCorsPolicy\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"CatalogId\")\n);\ncreate index \"Catalogs_SiteId_idx\" on \"Catalogs\" (\"SiteId\");\n\ncreate table \"ContentPageItems\" (\n \"ItemId\" uuid not null,\n \"PageId\" uuid null,\n \"PostId\" uuid null,\n \"ProductId\" uuid null,\n \"ProjectId\" uuid null,\n \"ContentId\" varchar(100) not null,\n \"Content\" text null,\n \"Discriminator\" varchar(256) null,\n \"SiteId\" uuid not null,\n primary key (\"ItemId\")\n);\ncreate index \"ContentPageItems_SiteId_idx\" on \"ContentPageItems\" (\"SiteId\");\n\ncreate table \"ContentPageParts\" (\n \"PageId\" uuid not null,\n \"Alias\" varchar(256) not null,\n \"Title\" varchar(256) not null,\n \"ParentPageId\" uuid null,\n \"Index\" integer null,\n \"PartId\" varchar(100) null,\n \"TemplateName\" varchar(100) not null,\n \"SiteId\" uuid not null,\n \"MetaKeywords\" varchar(256) null,\n \"MetaDescription\" varchar(256) null,\n \"IncludeInSitemap\" boolean null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"DateCreated\" timestamp null,\n \"UtcDateCreated\" timestamp null,\n \"CreatedById\" uuid null,\n \"Discriminator\" varchar(128) not null,\n primary key (\"PageId\")\n);\ncreate index \"ContentPageParts_SiteId_idx\" on \"ContentPageParts\" (\"SiteId\");\n\ncreate table \"CustomCategories\" (\n \"CategoryId\" uuid not null,\n \"TypeId\" uuid not null,\n \"Title\" varchar(50) not null,\n \"Slug\" varchar(50) not null,\n \"Description\" varchar(256) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"Content\" text null,\n \"SiteId\" uuid not null,\n primary key (\"CategoryId\")\n);\ncreate index \"CustomCategories_SiteId_idx\" on \"CustomCategories\" (\"SiteId\");\n\ncreate table \"CustomCategoryContentPages\" (\n \"CustomCategory_Id\" uuid not null,\n \"Page_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"CustomCategory_Id\", \"Page_Id\")\n);\ncreate index \"CustomCategoryContentPages_SiteId_idx\" on \"CustomCategoryContentPages\" (\"SiteId\");\n\ncreate table \"CustomCategoryPages\" (\n \"CustomCategory_Id\" uuid not null,\n \"Page_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"CustomCategory_Id\", \"Page_Id\")\n);\ncreate index \"CustomCategoryPages_SiteId_idx\" on \"CustomCategoryPages\" (\"SiteId\");\n\ncreate table \"CustomCategoryPosts\" (\n \"CustomCategory_Id\" uuid not null,\n \"Post_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"CustomCategory_Id\", \"Post_Id\")\n);\ncreate index \"CustomCategoryPosts_SiteId_idx\" on \"CustomCategoryPosts\" (\"SiteId\");\n\ncreate table \"CustomCategoryProducts\" (\n \"CustomCategory_Id\" uuid not null,\n \"Product_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"CustomCategory_Id\", \"Product_Id\")\n);\ncreate index \"CustomCategoryProducts_SiteId_idx\" on \"CustomCategoryProducts\" (\"SiteId\");\n\ncreate table \"CustomCategoryProjects\" (\n \"CustomCategory_Id\" uuid not null,\n \"Project_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"CustomCategory_Id\", \"Project_Id\")\n);\ncreate index \"CustomCategoryProjects_SiteId_idx\" on \"CustomCategoryProjects\" (\"SiteId\");\n\ncreate table \"CustomCategoryTypes\" (\n \"TypeId\" uuid not null,\n \"SiteId\" uuid not null,\n \"BlogId\" uuid null,\n \"PortfolioId\" uuid null,\n \"StoreId\" uuid null,\n \"Seq\" integer null,\n \"Path\" varchar(100) null,\n \"Title\" varchar(50) not null,\n \"Slug\" varchar(50) not null,\n \"Description\" varchar(256) null,\n \"TemplateName\" varchar(50) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"Discriminator\" varchar(50) null,\n \"CategoryFields\" text null,\n \"Page_SiteId\" uuid null,\n \"CategoryLayouts\" text null,\n \"Alias\" varchar(100) null,\n \"CategoryLayout\" varchar(50) null,\n primary key (\"TypeId\")\n);\ncreate index \"CustomCategoryTypes_SiteId_idx\" on \"CustomCategoryTypes\" (\"SiteId\");\n\ncreate table \"Domains\" (\n \"DomainId\" uuid not null,\n \"Name\" varchar(255) not null,\n \"PrefixAction\" integer not null,\n \"Public\" boolean not null,\n \"SiteId\" uuid not null,\n \"ThemeId\" uuid null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SettingsData\" text null,\n \"RobotsTxt\" text null,\n primary key (\"DomainId\")\n);\ncreate index \"Domains_SiteId_idx\" on \"Domains\" (\"SiteId\");\n\ncreate table \"EmailTemplates\" (\n \"TemplateId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"LoweredName\" varchar(100) not null,\n \"Description\" text null,\n \"From\" varchar(255) null,\n \"To\" varchar(255) null,\n \"Subject\" varchar(255) null,\n \"HtmlEnabled\" boolean not null,\n \"PlainText\" text null,\n \"Html\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Discriminator\" varchar(255) null,\n \"BlogId\" uuid null,\n \"StoreId\" uuid null,\n \"Cc\" varchar(255) null,\n \"Bcc\" varchar(255) null,\n \"FromDisplayName\" varchar(255) null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"EmailTemplates_SiteId_idx\" on \"EmailTemplates\" (\"SiteId\");\n\ncreate table \"FeedPageParams\" (\n \"ParamId\" uuid not null,\n \"Seq\" integer not null,\n \"Name\" varchar(50) null,\n \"PageId\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"ParamId\")\n);\ncreate index \"FeedPageParams_SiteId_idx\" on \"FeedPageParams\" (\"SiteId\");\n\ncreate table \"FeedPages\" (\n \"PageId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Path\" varchar(100) null,\n \"SiteId\" uuid not null,\n \"Slug\" varchar(50) null,\n \"ParentPageId\" uuid null,\n \"FeedId\" uuid not null,\n \"TemplateName\" varchar(50) null,\n \"PageContent\" text null,\n \"PageNumberParamName\" varchar(50) null,\n \"PageSizeParamName\" varchar(50) null,\n \"PageSize\" integer null,\n \"Level\" integer not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"Discriminator\" varchar(128) null,\n \"Params\" text null,\n primary key (\"PageId\")\n);\ncreate index \"FeedPages_SiteId_idx\" on \"FeedPages\" (\"SiteId\");\n\ncreate table \"FeedParams\" (\n \"ParamId\" uuid not null,\n \"Key\" varchar(100) not null,\n \"Value\" text null,\n \"FeedId\" uuid not null,\n \"Liquidizable\" boolean not null,\n \"SiteId\" uuid not null,\n primary key (\"ParamId\")\n);\ncreate index \"FeedParams_SiteId_idx\" on \"FeedParams\" (\"SiteId\");\n\ncreate table \"Feeds\" (\n \"FeedId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"LoweredAlias\" varchar(100) not null,\n \"Content\" text null,\n \"FetchedAt\" timestamp null,\n \"UtcFetchedAt\" timestamp null,\n \"SiteId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Discriminator\" varchar(128) not null,\n \"FetchInterval\" integer null,\n primary key (\"FeedId\")\n);\ncreate index \"Feeds_SiteId_idx\" on \"Feeds\" (\"SiteId\");\n\ncreate table \"Files\" (\n \"FileId\" uuid not null,\n \"FolderId\" uuid not null,\n \"Filename\" varchar(100) not null,\n \"LoweredFilename\" varchar(100) not null,\n \"ContentType\" varchar(50) not null,\n \"Size\" integer not null,\n \"StorageClient\" varchar(50) null,\n \"StorageFilename\" varchar(256) not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"Discriminator\" varchar(128) null,\n \"Hash\" varchar(50) null,\n \"SiteId\" uuid not null,\n primary key (\"FileId\")\n);\ncreate index \"Files_SiteId_idx\" on \"Files\" (\"SiteId\");\n\ncreate table \"Folders\" (\n \"FolderId\" uuid not null,\n \"OwnerId\" uuid null,\n \"ImagesFolder_ThemeId\" uuid null,\n \"ScriptsFolder_ThemeId\" uuid null,\n \"StylesheetsFolder_ThemeId\" uuid null,\n \"Path\" varchar(256) not null,\n \"LoweredPath\" varchar(256) not null,\n \"ImageSettingsProviderType\" varchar(256) null,\n \"ImageSettingsProviderParams\" varchar(256) null,\n \"ImageSettings\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"Discriminator\" varchar(128) null,\n \"ImagesFolder_Id\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"FolderId\")\n);\ncreate index \"Folders_SiteId_idx\" on \"Folders\" (\"SiteId\");\n\ncreate table \"FormAdministrators\" (\n \"Form_Id\" uuid not null,\n \"Administrator_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"Form_Id\", \"Administrator_Id\")\n);\ncreate index \"FormAdministrators_SiteId_idx\" on \"FormAdministrators\" (\"SiteId\");\n\ncreate table \"FormRecipients\" (\n \"RecipientId\" uuid not null,\n \"FormId\" uuid not null,\n \"AdministratorId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"RecipientId\")\n);\ncreate index \"FormRecipients_SiteId_idx\" on \"FormRecipients\" (\"SiteId\");\n\ncreate table \"FormSubmissionFields\" (\n \"FieldId\" uuid not null,\n \"SubmissionId\" uuid not null,\n \"Seq\" integer not null,\n \"Title\" varchar(100) null,\n \"Value\" text null,\n \"DataType\" integer not null,\n \"Name\" varchar(100) null,\n \"SiteId\" uuid not null,\n primary key (\"FieldId\")\n);\ncreate index \"FormSubmissionFields_SiteId_idx\" on \"FormSubmissionFields\" (\"SiteId\");\n\ncreate table \"FormSubmissionFieldsOld\" (\n \"FieldId\" uuid not null,\n \"SubmissionId\" uuid not null,\n \"Seq\" integer not null,\n \"Title\" varchar(100) null,\n \"Value\" varchar(4000) null,\n \"DataType\" integer not null,\n \"Name\" varchar(100) null,\n \"SiteId\" uuid not null,\n primary key (\"FieldId\")\n);\ncreate index \"FormSubmissionFieldsOld_SiteId_idx\" on \"FormSubmissionFieldsOld\" (\"SiteId\");\n\ncreate table \"FormSubmissions\" (\n \"SubmissionId\" uuid not null,\n \"FormId\" uuid not null,\n \"Date\" timestamp not null,\n \"UtcDate\" timestamp not null,\n \"Number\" integer not null,\n \"IpAddress\" varchar(100) null,\n \"UserAgent\" varchar(256) null,\n \"IsSpam\" boolean not null,\n \"Content\" text null,\n \"SiteId\" uuid not null,\n primary key (\"SubmissionId\")\n);\ncreate index \"FormSubmissions_SiteId_idx\" on \"FormSubmissions\" (\"SiteId\");\n\ncreate table \"FormTemplates\" (\n \"TemplateId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"ConfirmationEmailTemplate\" varchar(255) null,\n \"SubmissionEmailTemplate\" varchar(255) null,\n primary key (\"TemplateId\")\n);\ncreate index \"FormTemplates_SiteId_idx\" on \"FormTemplates\" (\"SiteId\");\n\ncreate table \"Forms\" (\n \"FormId\" uuid not null,\n \"Name\" varchar(100) null,\n \"Content\" text null,\n \"SubmissionAction\" integer not null,\n \"RedirectUrl\" varchar(256) null,\n \"SuccessMessage\" varchar(256) null,\n \"SiteId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Path\" varchar(256) null,\n \"TemplateId\" uuid null,\n primary key (\"FormId\")\n);\ncreate index \"Forms_SiteId_idx\" on \"Forms\" (\"SiteId\");\n\ncreate table \"Gallery\" (\n \"IdGallery\" uuid not null,\n \"OwnerName\" varchar(50) null,\n \"IdOwner\" uuid null,\n \"Name\" varchar(100) not null,\n \"Title\" varchar(255) null,\n \"Description\" text null,\n \"OriginalFilenames\" boolean not null,\n \"MaxUploadFileSize\" integer null,\n \"ThumbnailImageSize\" varchar(20) not null,\n \"DefaultImageSize\" varchar(20) not null,\n \"SeqFilenameFormat\" varchar(50) null,\n \"TemplateId\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"IdGallery\")\n);\ncreate index \"Gallery_SiteId_idx\" on \"Gallery\" (\"SiteId\");\n\ncreate table \"GalleryImage\" (\n \"IdImage\" uuid not null,\n \"IdGallery\" uuid not null,\n \"Seq\" integer not null,\n \"Title\" varchar(255) null,\n \"Alt\" varchar(255) null,\n \"Description\" text null,\n \"Visible\" boolean not null,\n \"OriginalFilename\" varchar(255) not null,\n \"Author\" varchar(100) null,\n \"Copyright\" varchar(100) null,\n \"StorageClient\" varchar(255) not null,\n \"StorageFilename\" varchar(255) not null,\n \"MimeType\" varchar(50) not null,\n \"Width\" integer not null,\n \"Height\" integer not null,\n \"FileSize\" integer not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Content\" text null,\n \"Hash\" varchar(50) null,\n \"SiteId\" uuid not null,\n primary key (\"IdImage\")\n);\ncreate index \"GalleryImage_SiteId_idx\" on \"GalleryImage\" (\"SiteId\");\n\ncreate table \"GalleryImageFile\" (\n \"IdImage\" uuid not null,\n \"SizeLabel\" varchar(20) not null,\n \"StorageClient\" varchar(255) not null,\n \"StorageFilename\" varchar(255) not null,\n \"StaticLink\" varchar(255) null,\n \"UseStaticLink\" boolean not null,\n \"MimeType\" varchar(50) not null,\n \"Width\" integer null,\n \"Height\" integer null,\n \"FileSize\" integer null,\n \"Original\" boolean not null,\n \"SiteId\" uuid not null,\n primary key (\"IdImage\", \"SizeLabel\")\n);\ncreate index \"GalleryImageFile_SiteId_idx\" on \"GalleryImageFile\" (\"SiteId\");\n\ncreate table \"GalleryImageSize\" (\n \"IdSize\" uuid not null,\n \"IdGallery\" uuid not null,\n \"Label\" varchar(20) not null,\n \"MaxWidth\" integer not null,\n \"MaxHeight\" integer not null,\n \"Quality\" integer not null,\n \"SiteId\" uuid not null,\n primary key (\"IdSize\")\n);\ncreate index \"GalleryImageSize_SiteId_idx\" on \"GalleryImageSize\" (\"SiteId\");\n\ncreate table \"GalleryImageSizeWatermark\" (\n \"GalleryImageSize_IdSize\" uuid not null,\n \"Watermark_IdWatermark\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"GalleryImageSize_IdSize\", \"Watermark_IdWatermark\")\n);\ncreate index \"GalleryImageSizeWatermark_SiteId_idx\" on \"GalleryImageSizeWatermark\" (\"SiteId\");\n\ncreate table \"GalleryImagesTemplates\" (\n \"TemplateId\" uuid not null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"OwnerTemplateId\" uuid not null,\n \"TemplateName\" varchar(100) not null,\n \"FieldName\" varchar(100) not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Alias\" varchar(100) null,\n \"CustomDefaultLayout\" varchar(100) null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"GalleryImagesTemplates_SiteId_idx\" on \"GalleryImagesTemplates\" (\"SiteId\");\n\ncreate table \"InventoryPolicies\" (\n \"InventoryPolicyId\" integer not null,\n \"Name\" varchar(100) not null,\n \"EnumLabel\" varchar(30) null,\n primary key (\"InventoryPolicyId\")\n);\n\ncreate table \"Layouts\" (\n \"LayoutId\" uuid not null,\n \"ThemeId\" uuid not null,\n \"Name\" varchar(100) null,\n \"LoweredName\" varchar(100) null,\n \"Content\" text null,\n \"ViewEngineId\" integer not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"ContentType\" varchar(50) null,\n \"Encoding\" varchar(50) null,\n \"Hash\" varchar(50) null,\n \"SiteId\" uuid not null,\n primary key (\"LayoutId\")\n);\ncreate index \"Layouts_SiteId_idx\" on \"Layouts\" (\"SiteId\");\n\ncreate table \"LinkGroups\" (\n \"GroupId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Slug\" varchar(100) not null,\n \"SiteId\" uuid not null,\n \"TemplateId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"GroupId\")\n);\ncreate index \"LinkGroups_SiteId_idx\" on \"LinkGroups\" (\"SiteId\");\n\ncreate table \"LinkTemplates\" (\n \"TemplateId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Description\" varchar(1000) null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"SiteId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Alias\" varchar(100) null,\n \"CustomDefaultLayout\" varchar(100) null,\n primary key (\"TemplateId\")\n);\ncreate index \"LinkTemplates_SiteId_idx\" on \"LinkTemplates\" (\"SiteId\");\n\ncreate table \"Links\" (\n \"LinkId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Slug\" varchar(100) not null,\n \"Url\" varchar(1000) not null,\n \"GroupId\" uuid not null,\n \"Content\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"LinkId\")\n);\ncreate index \"Links_SiteId_idx\" on \"Links\" (\"SiteId\");\n\ncreate table \"ModuleProperties\" (\n \"PropertyId\" uuid not null,\n \"ModuleId\" uuid not null,\n \"PropertyKey\" varchar(100) not null,\n \"PropertyValue\" text null,\n \"SiteId\" uuid not null,\n primary key (\"PropertyId\")\n);\ncreate index \"ModuleProperties_SiteId_idx\" on \"ModuleProperties\" (\"SiteId\");\n\ncreate table \"Modules\" (\n \"ModuleId\" uuid not null,\n \"TemplateId\" uuid null,\n \"PostId\" uuid null,\n \"Index\" integer not null,\n \"Content\" text null,\n \"VisibleInList\" boolean not null,\n \"VisibleInDetails\" boolean not null,\n \"VisibleInFeed\" boolean not null,\n \"Discriminator\" varchar(128) null,\n \"PageId\" uuid null,\n \"Page_TemplateId\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"ModuleId\")\n);\ncreate index \"Modules_SiteId_idx\" on \"Modules\" (\"SiteId\");\n\ncreate table \"NumberingCounters\" (\n \"CounterId\" uuid not null,\n \"TaskId\" uuid not null,\n \"OwnerId\" uuid not null,\n \"Date\" timestamp not null,\n \"LastNumber\" integer not null,\n \"SiteId\" uuid not null,\n primary key (\"CounterId\")\n);\ncreate index \"NumberingCounters_SiteId_idx\" on \"NumberingCounters\" (\"SiteId\");\n\ncreate table \"NumberingTasks\" (\n \"TaskId\" uuid not null,\n \"Label\" varchar(255) not null,\n \"Name\" varchar(255) not null,\n \"Commentary\" varchar(4000) null,\n \"PeriodTypeId\" integer not null,\n \"MinNumber\" integer not null,\n \"MaxNumber\" integer not null,\n primary key (\"TaskId\")\n);\n\ncreate table \"PageModuleTemplates\" (\n \"TemplateId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"TemplateId\")\n);\ncreate index \"PageModuleTemplates_SiteId_idx\" on \"PageModuleTemplates\" (\"SiteId\");\n\ncreate table \"PagePartTemplates\" (\n \"TemplateId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"TemplateId\")\n);\ncreate index \"PagePartTemplates_SiteId_idx\" on \"PagePartTemplates\" (\"SiteId\");\n\ncreate table \"PageTemplates\" (\n \"TemplateId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"TemplateId\")\n);\ncreate index \"PageTemplates_SiteId_idx\" on \"PageTemplates\" (\"SiteId\");\n\ncreate table \"Pages\" (\n \"PageId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Path\" varchar(256) not null,\n \"Title\" varchar(256) not null,\n \"Content\" text null,\n \"TemplateId\" uuid not null,\n \"Published\" boolean not null,\n \"DatePublished\" timestamp null,\n \"UtcDatePublished\" timestamp null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"SitemapPriority\" numeric(18,2) null,\n \"FormId\" uuid null,\n \"ViewsCount\" integer not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"PageId\")\n);\ncreate index \"Pages_SiteId_idx\" on \"Pages\" (\"SiteId\");\n\ncreate table \"PostComments\" (\n \"CommentId\" uuid not null,\n \"PostId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"AuthorName\" varchar(256) not null,\n \"AuthorEmail\" varchar(256) not null,\n \"Title\" varchar(256) null,\n \"Content\" text not null,\n \"ContentType\" integer null,\n \"Published\" boolean not null,\n \"IsSpam\" boolean not null,\n \"IpAddress\" varchar(20) null,\n \"UserAgent\" varchar(256) null,\n \"AuthorUrl\" varchar(256) null,\n \"ReplyOnCommentId\" uuid null,\n \"Level\" integer not null,\n \"SiteId\" uuid not null,\n primary key (\"CommentId\")\n);\ncreate index \"PostComments_SiteId_idx\" on \"PostComments\" (\"SiteId\");\n\ncreate table \"PostModuleTemplates\" (\n \"TemplateId\" uuid not null,\n \"BlogId\" uuid not null,\n \"Name\" varchar(50) not null,\n \"Description\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Content\" text null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"PostModuleTemplates_SiteId_idx\" on \"PostModuleTemplates\" (\"SiteId\");\n\ncreate table \"PostTemplates\" (\n \"TemplateId\" uuid not null,\n \"BlogId\" uuid not null,\n \"Name\" varchar(50) not null,\n \"Description\" text null,\n \"Modules\" boolean not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Content\" text null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"PostTemplates_SiteId_idx\" on \"PostTemplates\" (\"SiteId\");\n\ncreate table \"Posts\" (\n \"PostId\" uuid not null,\n \"BlogId\" uuid not null,\n \"AuthorId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"Number\" integer not null,\n \"Title\" varchar(256) not null,\n \"Excerpt\" text null,\n \"ExcerptType\" integer null,\n \"Content\" text null,\n \"ContentType\" integer null,\n \"Alias\" varchar(256) null,\n \"Published\" boolean not null,\n \"DatePublished\" timestamp null,\n \"UtcDatePublished\" timestamp null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"ViewsCount\" integer not null,\n \"Rating\" numeric(18,2) null,\n \"VotesCount\" integer not null,\n \"CommentsAllowed\" boolean not null,\n \"CommentsCount\" integer not null,\n \"ShortUrl\" varchar(255) null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"SitemapPriority\" numeric(18,2) null,\n \"TemplateId\" uuid null,\n \"UpdatedById\" uuid null,\n \"CreatedById\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"PostId\")\n);\ncreate index \"Posts_SiteId_idx\" on \"Posts\" (\"SiteId\");\n\ncreate table \"ProductPartTemplates\" (\n \"TemplateId\" uuid not null,\n \"StoreId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"ProductPartTemplates_SiteId_idx\" on \"ProductPartTemplates\" (\"SiteId\");\n\ncreate table \"ProductProperties\" (\n \"PropertyId\" uuid not null,\n \"ProductId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Value\" text not null,\n \"ValueType\" integer not null,\n \"Description\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"PropertyId\")\n);\ncreate index \"ProductProperties_SiteId_idx\" on \"ProductProperties\" (\"SiteId\");\n\ncreate table \"ProductPropertyValues\" (\n \"ValueId\" uuid not null,\n \"ProductId\" uuid not null,\n \"PropertyId\" uuid not null,\n \"Value\" text null,\n \"Description\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"ValueId\")\n);\ncreate index \"ProductPropertyValues_SiteId_idx\" on \"ProductPropertyValues\" (\"SiteId\");\n\ncreate table \"ProductReviewRatings\" (\n \"Id\" uuid not null,\n \"ReviewId\" uuid not null,\n \"RatingId\" uuid not null,\n \"Rating\" numeric(18,1) not null,\n \"SiteId\" uuid not null,\n primary key (\"Id\")\n);\ncreate index \"ProductReviewRatings_SiteId_idx\" on \"ProductReviewRatings\" (\"SiteId\");\n\ncreate table \"ProductReviewVotes\" (\n \"VoteId\" uuid not null,\n \"ReviewId\" uuid not null,\n \"Helpful\" boolean not null,\n \"Timestamp\" timestamp not null,\n \"UtcTimestamp\" timestamp not null,\n \"IpAddress\" varchar(20) null,\n \"UserAgent\" varchar(256) null,\n \"SiteId\" uuid not null,\n primary key (\"VoteId\")\n);\ncreate index \"ProductReviewVotes_SiteId_idx\" on \"ProductReviewVotes\" (\"SiteId\");\n\ncreate table \"ProductReviews\" (\n \"ReviewId\" uuid not null,\n \"ProductId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"AuthorName\" varchar(256) not null,\n \"AuthorEmail\" varchar(256) not null,\n \"Public\" boolean not null,\n \"Rating\" numeric(18,1) null,\n \"Title\" varchar(256) null,\n \"Pros\" text not null,\n \"Cons\" text not null,\n \"Notes\" text not null,\n \"HelpfulVotesCount\" integer null,\n \"NotHelpfulVotesCount\" integer null,\n \"Published\" boolean not null,\n \"IsSpam\" boolean not null,\n \"IpAddress\" varchar(20) null,\n \"UserAgent\" varchar(256) null,\n \"SiteId\" uuid not null,\n primary key (\"ReviewId\")\n);\ncreate index \"ProductReviews_SiteId_idx\" on \"ProductReviews\" (\"SiteId\");\n\ncreate table \"ProductStoreCategories\" (\n \"Product_Id\" uuid not null,\n \"ProductCategory_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"Product_Id\", \"ProductCategory_Id\")\n);\ncreate index \"ProductStoreCategories_SiteId_idx\" on \"ProductStoreCategories\" (\"SiteId\");\n\ncreate table \"ProductStoreTags\" (\n \"Product_Id\" uuid not null,\n \"ProductTag_Id\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"Product_Id\", \"ProductTag_Id\")\n);\ncreate index \"ProductStoreTags_SiteId_idx\" on \"ProductStoreTags\" (\"SiteId\");\n\ncreate table \"ProductTypeProperties\" (\n \"PropertyId\" uuid not null,\n \"CategoryId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"ValueType\" integer not null,\n \"Description\" text null,\n \"Main\" boolean not null,\n \"DisplayEmpty\" boolean not null,\n \"Seq\" integer not null,\n \"DateCreated\" timestamp null,\n \"UtcDateCreated\" timestamp null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"PropertyId\")\n);\ncreate index \"ProductTypeProperties_SiteId_idx\" on \"ProductTypeProperties\" (\"SiteId\");\n\ncreate table \"ProductTypePropertyCategories\" (\n \"CategoryId\" uuid not null,\n \"ProductTypeId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Main\" boolean not null,\n \"DisplayEmpty\" boolean not null,\n \"Seq\" integer not null,\n \"DateCreated\" timestamp null,\n \"UtcDateCreated\" timestamp null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"CategoryId\")\n);\ncreate index \"ProductTypePropertyCategories_SiteId_idx\" on \"ProductTypePropertyCategories\" (\"SiteId\");\n\ncreate table \"ProductTypeRatings\" (\n \"RatingId\" uuid not null,\n \"ProductTypeId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Weight\" integer null,\n \"Main\" boolean not null,\n \"DisplayEmpty\" boolean not null,\n \"Seq\" integer not null,\n \"DateCreated\" timestamp null,\n \"UtcDateCreated\" timestamp null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"RatingId\")\n);\ncreate index \"ProductTypeRatings_SiteId_idx\" on \"ProductTypeRatings\" (\"SiteId\");\n\ncreate table \"ProductTypes\" (\n \"TypeId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Description\" text null,\n \"StoreId\" uuid not null,\n \"TemplateName\" varchar(100) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"IntId\" integer not null,\n \"YmlExport\" boolean not null,\n \"ProductPrefix\" varchar(50) null,\n \"Content\" text null,\n \"Properties\" text null,\n \"ListLayout\" varchar(100) null,\n \"DetailsLayout\" varchar(100) null,\n \"Layouts\" text null,\n \"VariantTemplateId\" uuid not null,\n \"Alias\" varchar(100) null,\n \"CustomDefaultLayout\" varchar(100) null,\n \"SiteId\" uuid not null,\n primary key (\"TypeId\")\n);\ncreate index \"ProductTypes_SiteId_idx\" on \"ProductTypes\" (\"SiteId\");\n\ncreate table \"ProductVariantTemplates\" (\n \"TemplateId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Description\" varchar(1000) null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"StoreId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Alias\" varchar(100) null,\n \"CustomDefaultLayout\" varchar(100) null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"ProductVariantTemplates_SiteId_idx\" on \"ProductVariantTemplates\" (\"SiteId\");\n\ncreate table \"ProductVariants\" (\n \"VariantId\" uuid not null,\n \"ProductId\" uuid not null,\n \"Position\" integer not null,\n \"Title\" varchar(255) not null,\n \"Price\" numeric(18,2) null,\n \"CompareAtPrice\" numeric(18,2) null,\n \"InventoryQuantity\" integer null,\n \"InventoryPolicyId\" integer not null,\n \"Sku\" varchar(50) null,\n \"Weight\" numeric(18,2) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"IntId\" integer not null,\n \"YmlExport\" boolean not null,\n \"Bid\" numeric(18,2) null,\n \"Cbid\" numeric(18,2) null,\n \"VendorCode\" varchar(50) null,\n \"BuyAtStore\" boolean not null,\n \"SelfDelivery\" boolean not null,\n \"Delivery\" boolean not null,\n \"DeliveryPrice\" numeric(18,2) null,\n \"TemplateId\" uuid not null,\n \"Content\" text null,\n \"SiteId\" uuid not null,\n primary key (\"VariantId\")\n);\ncreate index \"ProductVariants_SiteId_idx\" on \"ProductVariants\" (\"SiteId\");\n\ncreate table \"Products\" (\n \"ProductId\" uuid not null,\n \"Title\" varchar(256) not null,\n \"ShortDescription\" text null,\n \"ShortDescriptionType\" integer null,\n \"Description\" text null,\n \"DescriptionType\" integer null,\n \"Kit\" text null,\n \"KitType\" integer null,\n \"Slug\" varchar(256) not null,\n \"StoreId\" uuid not null,\n \"TypeId\" uuid not null,\n \"VendorId\" uuid null,\n \"Published\" boolean not null,\n \"Rating\" numeric(18,2) null,\n \"VotesCount\" integer null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"TemplateName\" varchar(100) null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"CountryOfOrigin\" varchar(50) null,\n \"Content\" text null,\n \"Number\" integer not null,\n \"SiteId\" uuid not null,\n primary key (\"ProductId\")\n);\ncreate index \"Products_SiteId_idx\" on \"Products\" (\"SiteId\");\n\ncreate table \"Redirections\" (\n \"RedirectionId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Seq\" integer not null,\n \"UrlDetection\" boolean not null,\n \"TargetUrl\" varchar(256) null,\n \"SourceType\" integer not null,\n \"Regex\" boolean not null,\n \"IgnoreCase\" boolean not null,\n \"Action\" integer not null,\n \"DestinationUrl\" varchar(256) null,\n \"Permanent\" boolean not null,\n \"ThemeId\" uuid null,\n \"SiteId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"BrowserDetection\" boolean not null,\n \"BrowserName\" varchar(100) null,\n \"BrowserVersion\" varchar(50) null,\n \"BrowserMajorVersion\" integer null,\n \"BrowserMinorVersion\" numeric(18,6) null,\n \"BrowserType\" varchar(100) null,\n \"BrowserLayoutEngine\" varchar(100) null,\n \"BrowserPlatform\" varchar(100) null,\n \"BrowserScreenPixelsWidth\" integer null,\n \"BrowserScreenPixelsHeight\" integer null,\n \"MobileDeviceDetection\" boolean not null,\n \"IsMobileDevice\" boolean not null,\n \"MobileDeviceModel\" varchar(100) null,\n \"MobileDeviceManufacturer\" varchar(100) null,\n \"DeviceTypeDetection\" boolean not null,\n \"DeviceIsDesktop\" boolean not null,\n \"DeviceIsTablet\" boolean not null,\n \"DeviceIsConsole\" boolean not null,\n \"DeviceIsTV\" boolean not null,\n \"DeviceIsMobile\" boolean not null,\n \"DeviceIsCrawler\" boolean not null,\n \"QueryStringParamName\" varchar(50) null,\n \"CookieName\" varchar(50) null,\n \"CookieExpires\" integer null,\n \"IgnoreOptions\" boolean not null,\n primary key (\"RedirectionId\")\n);\ncreate index \"Redirections_SiteId_idx\" on \"Redirections\" (\"SiteId\");\n\ncreate table \"RelatedPosts\" (\n \"PostId\" uuid not null,\n \"RelatedPostId\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"PostId\", \"RelatedPostId\")\n);\ncreate index \"RelatedPosts_SiteId_idx\" on \"RelatedPosts\" (\"SiteId\");\n\ncreate table \"ReviewItemTemplates\" (\n \"ItemTemplateId\" uuid not null,\n \"ReviewTemplateId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Type\" varchar(256) not null,\n \"Path\" varchar(256) not null,\n \"SubmissionAction\" integer not null,\n \"RedirectUrl\" varchar(256) null,\n \"SuccessMessage\" varchar(256) null,\n \"EmailRecipients\" varchar(2000) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"ItemTemplateId\")\n);\ncreate index \"ReviewItemTemplates_SiteId_idx\" on \"ReviewItemTemplates\" (\"SiteId\");\n\ncreate table \"ReviewRatingTemplates\" (\n \"TemplateId\" uuid not null,\n \"ReviewTemplateId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Weight\" integer null,\n \"Seq\" integer not null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"ReviewRatingTemplates_SiteId_idx\" on \"ReviewRatingTemplates\" (\"SiteId\");\n\ncreate table \"ReviewRatings\" (\n \"RatingId\" uuid not null,\n \"ReviewId\" uuid not null,\n \"RatingTemplateId\" uuid not null,\n \"Value\" numeric(18,2) not null,\n \"SiteId\" uuid not null,\n primary key (\"RatingId\")\n);\ncreate index \"ReviewRatings_SiteId_idx\" on \"ReviewRatings\" (\"SiteId\");\n\ncreate table \"ReviewTemplates\" (\n \"TemplateId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(100) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"TemplateId\")\n);\ncreate index \"ReviewTemplates_SiteId_idx\" on \"ReviewTemplates\" (\"SiteId\");\n\ncreate table \"ReviewVotes\" (\n \"VoteId\" uuid not null,\n \"ReviewId\" uuid not null,\n \"Helpful\" boolean not null,\n \"Timestamp\" timestamp not null,\n \"UtcTimestamp\" timestamp not null,\n \"IpAddress\" varchar(20) null,\n \"UserAgent\" varchar(256) null,\n \"Referer\" varchar(2000) null,\n \"SiteId\" uuid not null,\n primary key (\"VoteId\")\n);\ncreate index \"ReviewVotes_SiteId_idx\" on \"ReviewVotes\" (\"SiteId\");\n\ncreate table \"Reviews\" (\n \"ReviewId\" uuid not null,\n \"SiteId\" uuid not null,\n \"ItemType\" varchar(50) not null,\n \"ItemId\" uuid not null,\n \"TemplateId\" uuid not null,\n \"ReviewerName\" varchar(256) null,\n \"ReviewerEmail\" varchar(256) null,\n \"Public\" boolean not null,\n \"Rating\" numeric(18,2) null,\n \"Summary\" varchar(256) null,\n \"Details\" text null,\n \"Pros\" text null,\n \"Cons\" text null,\n \"Fields\" text null,\n \"HelpfulVotesCount\" integer null,\n \"NotHelpfulVotesCount\" integer null,\n \"Published\" boolean not null,\n \"DatePublished\" timestamp null,\n \"UtcDatePublished\" timestamp null,\n \"IsDublicate\" boolean not null,\n \"IsSpam\" boolean not null,\n \"IpAddress\" varchar(20) null,\n \"UserAgent\" varchar(256) null,\n \"Referer\" varchar(2000) null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n primary key (\"ReviewId\")\n);\ncreate index \"Reviews_SiteId_idx\" on \"Reviews\" (\"SiteId\");\n\ncreate table \"SiteSettings\" (\n \"SettingId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Key\" varchar(100) not null,\n \"Value\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n primary key (\"SettingId\")\n);\ncreate index \"SiteSettings_SiteId_idx\" on \"SiteSettings\" (\"SiteId\");\n\ncreate table \"Sites\" (\n \"SiteId\" uuid not null,\n \"AccountId\" uuid not null,\n \"Title\" varchar(100) null,\n \"Alias\" varchar(100) null,\n \"LoweredAlias\" varchar(100) null,\n \"PrimaryDomain\" varchar(100) null,\n \"TimeOffset\" varchar(100) null,\n \"Culture\" varchar(50) null,\n \"MultiCultural\" boolean not null default false,\n \"Cultures\" text null,\n \"ActiveThemeId\" uuid null,\n \"RobotsTxt\" text null,\n \"Live\" boolean not null,\n \"Production\" boolean not null,\n \"Password\" varchar(20) null,\n \"PrefixAction\" integer null,\n \"PagerSlug\" varchar(50) null,\n \"SettingsData\" text null,\n \"SettingsTemplate\" text null,\n \"DomainSettingsTemplate\" text null,\n \"DateCreated\" timestamp not null default now(),\n \"UtcDateCreated\" timestamp not null default now(),\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SearchAnalyzer\" varchar(50) null,\n \"SearchIndexCreationTimestamp\" timestamp null,\n \"DefaultContentType\" varchar(50) null,\n \"DefaultEncoding\" varchar(50) null,\n \"DefaultPageName\" varchar(50) null,\n \"DefaultExtension\" varchar(50) null,\n \"NewTemplates\" boolean not null default false,\n \"CachingOptions\" text null,\n \"EnableCors\" boolean not null default false,\n \"DefaultCorsPolicy\" text null,\n \"ContentCacheOptions\" text null,\n \"Writable\" boolean not null default true,\n primary key (\"SiteId\")\n);\n\ncreate table \"StaticPages\" (\n \"PageId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Path\" varchar(256) not null,\n \"Content\" text null,\n \"ContentType\" varchar(50) null,\n \"Encoding\" varchar(50) null,\n \"Published\" boolean not null,\n \"DatePublished\" timestamp null,\n \"UtcDatePublished\" timestamp null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"SitemapPriority\" numeric(18,2) null,\n \"ViewsCount\" integer not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"PageId\")\n);\ncreate index \"StaticPages_SiteId_idx\" on \"StaticPages\" (\"SiteId\");\n\ncreate table \"StoreAdministrators\" (\n \"StoreAdministratorId\" uuid not null,\n \"StoreId\" uuid not null,\n \"AdministratorId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"StoreAdministratorId\")\n);\ncreate index \"StoreAdministrators_SiteId_idx\" on \"StoreAdministrators\" (\"SiteId\");\n\ncreate table \"StoreCategories\" (\n \"CategoryId\" uuid not null,\n \"Title\" varchar(256) not null,\n \"Description\" text null,\n \"DescriptionType\" integer null,\n \"Slug\" varchar(256) not null,\n \"Content\" text null,\n \"StoreId\" uuid not null,\n \"DateCreated\" timestamp null,\n \"UtcDateCreated\" timestamp null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid null,\n \"UpdatedById\" uuid null,\n \"Criteria\" varchar(256) null,\n \"SortOrder\" varchar(256) null,\n \"TemplateName\" varchar(100) null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"Discriminator\" varchar(128) not null,\n \"SiteId\" uuid not null,\n primary key (\"CategoryId\")\n);\ncreate index \"StoreCategories_SiteId_idx\" on \"StoreCategories\" (\"SiteId\");\n\ncreate table \"StorePartTemplates\" (\n \"TemplateId\" uuid not null,\n \"StoreId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Alias\" varchar(100) not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" varchar(50) null,\n \"Layouts\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TemplateId\")\n);\ncreate index \"StorePartTemplates_SiteId_idx\" on \"StorePartTemplates\" (\"SiteId\");\n\ncreate table \"StoreTags\" (\n \"TagId\" uuid not null,\n \"Title\" varchar(50) not null,\n \"Slug\" varchar(50) not null,\n \"Content\" text null,\n \"StoreId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"TagId\")\n);\ncreate index \"StoreTags_SiteId_idx\" on \"StoreTags\" (\"SiteId\");\n\ncreate table \"StoreVendors\" (\n \"VendorId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Slug\" varchar(100) not null,\n \"Content\" text null,\n \"StoreId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"VendorId\")\n);\ncreate index \"StoreVendors_SiteId_idx\" on \"StoreVendors\" (\"SiteId\");\n\ncreate table \"Stores\" (\n \"StoreId\" uuid not null,\n \"Title\" varchar(256) not null,\n \"Path\" varchar(256) not null,\n \"SiteId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"IncludeInSitemap\" boolean not null,\n \"SitemapPriority\" numeric(18,2) null,\n \"SitemapLastUpdatedTime\" timestamp null,\n \"SitemapChangeFrequency\" varchar(20) null,\n \"Content\" text null,\n \"StoreLayout\" varchar(255) null,\n \"CategoryLayout\" varchar(255) null,\n \"SmartCategoryLayout\" varchar(255) null,\n \"TagLayout\" varchar(255) null,\n \"VendorLayout\" varchar(255) null,\n \"CategoriesLayout\" varchar(255) null,\n \"SmartCategoriesLayout\" varchar(255) null,\n \"TagsLayout\" varchar(255) null,\n \"VendorsLayout\" varchar(255) null,\n \"StoreFields\" text null,\n \"CategoryFields\" text null,\n \"SmartCategoryFields\" text null,\n \"TagFields\" text null,\n \"VendorFields\" text null,\n \"CategoriesPath\" varchar(255) null,\n \"TagsPath\" varchar(255) null,\n \"VendorsPath\" varchar(255) null,\n \"ProductsPath\" varchar(255) null,\n \"SettingsData\" text null,\n \"SettingsTemplate\" text null,\n \"StoreLayouts\" text null,\n \"CategoryLayouts\" text null,\n \"SmartCategoryLayouts\" text null,\n \"TagLayouts\" text null,\n \"VendorLayouts\" text null,\n \"ProductLayout\" varchar(255) null,\n \"ProductPath\" varchar(255) null,\n \"ProductNumberFormat\" varchar(50) null,\n \"RecentlyViewedEnabled\" boolean not null,\n \"RecentlyViewedStorage\" integer not null,\n \"RecentlyViewedExpires\" integer null,\n \"RecentlyViewedListCapacity\" integer not null,\n \"Alias\" varchar(100) null,\n \"DefaultCorsPolicy\" text null,\n primary key (\"StoreId\")\n);\ncreate index \"Stores_SiteId_idx\" on \"Stores\" (\"SiteId\");\n\ncreate table \"TableRecordPartTemplates\" (\n \"TemplateId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Description\" varchar(1000) null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"SiteId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Alias\" varchar(100) null,\n \"CustomDefaultLayout\" varchar(100) null,\n primary key (\"TemplateId\")\n);\ncreate index \"TableRecordPartTemplates_SiteId_idx\" on \"TableRecordPartTemplates\" (\"SiteId\");\n\ncreate table \"TableRecords\" (\n \"RecordId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Slug\" varchar(100) not null,\n \"TableId\" uuid not null,\n \"Content\" text null,\n \"Published\" boolean not null,\n \"DatePublished\" timestamp null,\n \"UtcDatePublished\" timestamp null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"SiteId\" uuid not null,\n primary key (\"RecordId\")\n);\ncreate index \"TableRecords_SiteId_idx\" on \"TableRecords\" (\"SiteId\");\n\ncreate table \"TableTemplates\" (\n \"TemplateId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Description\" varchar(1000) null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"SiteId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Alias\" varchar(100) null,\n \"CustomDefaultLayout\" varchar(100) null,\n primary key (\"TemplateId\")\n);\ncreate index \"TableTemplates_SiteId_idx\" on \"TableTemplates\" (\"SiteId\");\n\ncreate table \"Tables\" (\n \"TableId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Slug\" varchar(100) not null,\n \"SiteId\" uuid not null,\n \"TemplateId\" uuid not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n primary key (\"TableId\")\n);\ncreate index \"Tables_SiteId_idx\" on \"Tables\" (\"SiteId\");\n\ncreate table \"Themes\" (\n \"ThemeId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"ViewEngineId\" integer not null,\n \"SiteId\" uuid not null,\n \"ImageSizes\" text null,\n \"SettingsData\" text null,\n \"SettingsMarkup\" text null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"ParentThemeId\" uuid null,\n primary key (\"ThemeId\")\n);\ncreate index \"Themes_SiteId_idx\" on \"Themes\" (\"SiteId\");\n\ncreate table \"UploadCacheItems\" (\n \"ItemId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Filename\" varchar(100) not null,\n \"StorageClient\" varchar(255) not null,\n \"StorageFilename\" varchar(255) not null,\n \"MediaType\" varchar(50) not null,\n \"FileSize\" bigint not null,\n \"UtcDateCreated\" timestamp not null,\n primary key (\"ItemId\")\n);\ncreate index \"UploadCacheItems_SiteId_idx\" on \"UploadCacheItems\" (\"SiteId\");\n\ncreate table \"Urls\" (\n \"UrlId\" uuid not null,\n \"SiteId\" uuid not null,\n \"OriginalUrl\" varchar(1024) not null,\n \"ShortUrl\" varchar(1024) not null,\n primary key (\"UrlId\")\n);\ncreate index \"Urls_SiteId_idx\" on \"Urls\" (\"SiteId\");\n\ncreate table \"Votes\" (\n \"VoteId\" uuid not null,\n \"PostId\" uuid not null,\n \"Rating\" numeric(18,2) not null,\n \"Timestamp\" timestamp not null,\n \"UtcTimestamp\" timestamp not null,\n \"IpAddress\" varchar(20) null,\n \"UserAgent\" varchar(256) null,\n \"SiteId\" uuid not null,\n primary key (\"VoteId\")\n);\ncreate index \"Votes_SiteId_idx\" on \"Votes\" (\"SiteId\");\n\ncreate table \"Watermark\" (\n \"IdWatermark\" uuid not null,\n \"Name\" varchar(100) not null,\n \"HorizontalAlign\" varchar(20) null,\n \"VerticalAlign\" varchar(20) null,\n \"Opacity\" integer null,\n \"Padding\" integer null,\n \"IdGallery\" uuid not null,\n \"SiteId\" uuid not null,\n primary key (\"IdWatermark\")\n);\ncreate index \"Watermark_SiteId_idx\" on \"Watermark\" (\"SiteId\");\n\ncreate table \"Watermark_ImageWatermark\" (\n \"IdWatermark\" uuid not null,\n \"FilePath\" varchar(256) not null,\n \"Width\" integer null,\n \"Height\" integer null,\n \"SiteId\" uuid not null,\n primary key (\"IdWatermark\")\n);\ncreate index \"Watermark_ImageWatermark_SiteId_idx\" on \"Watermark_ImageWatermark\" (\"SiteId\");\n\ncreate table \"Watermark_TextWatermark\" (\n \"IdWatermark\" uuid not null,\n \"Text\" varchar(256) not null,\n \"FontColor\" varchar(20) null,\n \"FontSize\" integer null,\n \"FontStyle\" varchar(20) null,\n \"FontFamily\" varchar(50) null,\n \"SiteId\" uuid not null,\n primary key (\"IdWatermark\")\n);\ncreate index \"Watermark_TextWatermark_SiteId_idx\" on \"Watermark_TextWatermark\" (\"SiteId\");\n\ncreate table \"WidgetProperties\" (\n \"PropertyId\" uuid not null,\n \"WidgetId\" uuid not null,\n \"PropertyKey\" varchar(100) not null,\n \"PropertyValue\" text null,\n \"SiteId\" uuid not null,\n primary key (\"PropertyId\")\n);\ncreate index \"WidgetProperties_SiteId_idx\" on \"WidgetProperties\" (\"SiteId\");\n\ncreate table \"Widgets\" (\n \"WidgetId\" uuid not null,\n \"SiteId\" uuid not null,\n \"Title\" varchar(100) not null,\n \"Handle\" varchar(100) not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"Discriminator\" varchar(128) null,\n primary key (\"WidgetId\")\n);\ncreate index \"Widgets_SiteId_idx\" on \"Widgets\" (\"SiteId\");\n\ncreate table \"_Modules\" (\n \"ModuleId\" uuid not null,\n \"OwnerName\" varchar(50) not null,\n \"OwnerId\" uuid not null,\n \"Seq\" integer not null,\n \"VisibleInList\" boolean not null,\n \"VisibleInDetails\" boolean not null,\n \"VisibleInFeed\" boolean not null,\n \"CssClasses\" varchar(255) null,\n \"HtmlAttrubutes\" text null,\n \"Published\" boolean not null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"CreatedById\" uuid not null,\n \"UpdatedById\" uuid null,\n \"Discriminator\" varchar(128) null,\n \"SiteId\" uuid not null,\n primary key (\"ModuleId\")\n);\ncreate index \"_Modules_SiteId_idx\" on \"_Modules\" (\"SiteId\");\n\ncreate table \"_Templates\" (\n \"TemplateId\" uuid not null,\n \"Name\" varchar(100) not null,\n \"Content\" text null,\n \"Shared\" boolean null,\n \"SiteId\" uuid not null,\n \"FormId\" uuid null,\n \"DateCreated\" timestamp not null,\n \"UtcDateCreated\" timestamp not null,\n \"CreatedById\" uuid not null,\n \"DateUpdated\" timestamp null,\n \"UtcDateUpdated\" timestamp null,\n \"UpdatedById\" uuid null,\n \"Post_BlogId\" uuid null,\n \"Module_BlogId\" uuid null,\n \"Part_BlogId\" uuid null,\n \"Part_SiteId\" uuid null,\n \"Product_StoreId\" uuid null,\n \"Part_StoreId\" uuid null,\n \"Description\" text null,\n \"Modules\" boolean null,\n \"ListLayout\" varchar(100) null,\n \"DetailsLayout\" varchar(100) null,\n \"FeedLayout\" varchar(100) null,\n \"Discriminator\" varchar(255) null,\n \"Page_SiteId\" uuid null,\n \"PagePart_SiteId\" uuid null,\n \"Form_SiteId\" uuid null,\n \"Layouts\" text null,\n \"PageModule_SiteId\" uuid null,\n \"Alias\" varchar(100) null,\n \"CustomDefaultLayout\" varchar(100) null,\n primary key (\"TemplateId\")\n);\ncreate index \"_Templates_SiteId_idx\" on \"_Templates\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"AdministratorAccounts\" add constraint \"FK_AdministratorAccounts_Accounts_Account_Id\" foreign key (\"Account_Id\") references \"Accounts\" (\"AccountId\");\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"AdministratorBlogs\" add constraint \"FK_AdministratorBlogs_Blogs_Blog_Id\" foreign key (\"Blog_Id\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"AdministratorSites\" add constraint \"FK_AdministratorSites_Sites_Site_Id\" foreign key (\"Site_Id\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"AdministratorStores\" add constraint \"FK_AdministratorStores_Stores_Store_Id\" foreign key (\"Store_Id\") references \"Stores\" (\"StoreId\");\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"BlackList\" add constraint \"FK_BlackList_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"BlogAuthors\" add constraint \"FK_BlogAuthors_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"BlogCategories\" add constraint \"FK_BlogCategories_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"BlogCategoryPosts\" add constraint \"FK_BlogCategoryPosts_BlogCategories_BlogCategory_Id\" foreign key (\"BlogCategory_Id\") references \"BlogCategories\" (\"CategoryId\");\nalter table \"BlogCategoryPosts\" add constraint \"FK_BlogCategoryPosts_Posts_Post_Id_2\" foreign key (\"Post_Id\") references \"Posts\" (\"PostId\");\n\nalter table \"BlogPostModuleTemplates\" add constraint \"FK_BlogPostModuleTemplates_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n\nalter table \"BlogPostPartTemplates\" add constraint \"FK_BlogPostPartTemplates_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n\nalter table \"BlogPostTemplates\" add constraint \"FK_BlogPostTemplates_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n\nalter table \"BlogTagPosts\" add constraint \"FK_BlogTagPosts_BlogTags_BlogTag_Id\" foreign key (\"BlogTag_Id\") references \"BlogTags\" (\"TagId\");\nalter table \"BlogTagPosts\" add constraint \"FK_BlogTagPosts_Posts_Post_Id_2\" foreign key (\"Post_Id\") references \"Posts\" (\"PostId\");\n\nalter table \"BlogTags\" add constraint \"FK_BlogTags_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"CatalogCategories\" add constraint \"FK_CatalogCategories_Catalogs_CatalogId\" foreign key (\"CatalogId\") references \"Catalogs\" (\"CatalogId\");\n\nalter table \"CatalogProductModuleTemplates\" add constraint \"FK_CatalogProductModuleTemplates_Catalogs_CatalogId\" foreign key (\"CatalogId\") references \"Catalogs\" (\"CatalogId\");\n\nalter table \"CatalogProductPartTemplates\" add constraint \"FK_CatalogProductPartTemplates_Catalogs_CatalogId\" foreign key (\"CatalogId\") references \"Catalogs\" (\"CatalogId\");\n\nalter table \"CatalogProductTemplates\" add constraint \"FK_CatalogProductTemplates_Catalogs_CatalogId\" foreign key (\"CatalogId\") references \"Catalogs\" (\"CatalogId\");\n\nalter table \"CatalogProducts\" add constraint \"FK_CatalogProducts_CatalogProductTemplates_TemplateId\" foreign key (\"TemplateId\") references \"CatalogProductTemplates\" (\"TemplateId\");\nalter table \"CatalogProducts\" add constraint \"FK_CatalogProducts_Catalogs_CatalogId_2\" foreign key (\"CatalogId\") references \"Catalogs\" (\"CatalogId\");\n-- soft fk: [object Object].ProductId -> Products.ProductId (control-plane link, not enforced in a site database)\n\nalter table \"CatalogProductsCategories\" add constraint \"FK_CatalogProductsCategories_CatalogCategories_CategoryId\" foreign key (\"CategoryId\") references \"CatalogCategories\" (\"CategoryId\");\nalter table \"CatalogProductsCategories\" add constraint \"FK_CatalogProductsCategories_CatalogProducts_ProductId_2\" foreign key (\"ProductId\") references \"CatalogProducts\" (\"ProductId\");\n\nalter table \"CatalogProductsTags\" add constraint \"FK_CatalogProductsTags_CatalogProducts_ProductId\" foreign key (\"ProductId\") references \"CatalogProducts\" (\"ProductId\");\nalter table \"CatalogProductsTags\" add constraint \"FK_CatalogProductsTags_CatalogTags_TagId_2\" foreign key (\"TagId\") references \"CatalogTags\" (\"TagId\");\n\nalter table \"CatalogTags\" add constraint \"FK_CatalogTags_Catalogs_CatalogId\" foreign key (\"CatalogId\") references \"Catalogs\" (\"CatalogId\");\n\nalter table \"ContentPageItems\" add constraint \"FK_ContentPageItems_Posts_PostId\" foreign key (\"PostId\") references \"Posts\" (\"PostId\");\nalter table \"ContentPageItems\" add constraint \"FK_ContentPageItems_Products_ProductId_2\" foreign key (\"ProductId\") references \"Products\" (\"ProductId\");\nalter table \"ContentPageItems\" add constraint \"FK_ContentPageItems_ContentPageParts_PageId_3\" foreign key (\"PageId\") references \"ContentPageParts\" (\"PageId\");\n\nalter table \"ContentPageParts\" add constraint \"FK_ContentPageParts_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\nalter table \"ContentPageParts\" add constraint \"FK_ContentPageParts_ContentPageParts_ParentPageId_2\" foreign key (\"ParentPageId\") references \"ContentPageParts\" (\"PageId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table \"CustomCategories\" add constraint \"FK_CustomCategories_CustomCategoryTypes_TypeId\" foreign key (\"TypeId\") references \"CustomCategoryTypes\" (\"TypeId\");\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"CustomCategoryContentPages\" add constraint \"FK_CustomCategoryContentPages_ContentPageParts_Page_Id\" foreign key (\"Page_Id\") references \"ContentPageParts\" (\"PageId\");\nalter table \"CustomCategoryContentPages\" add constraint \"FK_CustomCategoryContentPages_CustomCategories_CustomCa_1awem78\" foreign key (\"CustomCategory_Id\") references \"CustomCategories\" (\"CategoryId\");\n\nalter table \"CustomCategoryPages\" add constraint \"FK_CustomCategoryPages_CustomCategories_CustomCategory_Id\" foreign key (\"CustomCategory_Id\") references \"CustomCategories\" (\"CategoryId\");\nalter table \"CustomCategoryPages\" add constraint \"FK_CustomCategoryPages_Pages_Page_Id_2\" foreign key (\"Page_Id\") references \"Pages\" (\"PageId\");\n\nalter table \"CustomCategoryPosts\" add constraint \"FK_CustomCategoryPosts_CustomCategories_CustomCategory_Id\" foreign key (\"CustomCategory_Id\") references \"CustomCategories\" (\"CategoryId\");\nalter table \"CustomCategoryPosts\" add constraint \"FK_CustomCategoryPosts_Posts_Post_Id_2\" foreign key (\"Post_Id\") references \"Posts\" (\"PostId\");\n\nalter table \"CustomCategoryProducts\" add constraint \"FK_CustomCategoryProducts_CustomCategories_CustomCategory_Id\" foreign key (\"CustomCategory_Id\") references \"CustomCategories\" (\"CategoryId\");\nalter table \"CustomCategoryProducts\" add constraint \"FK_CustomCategoryProducts_Products_Product_Id_2\" foreign key (\"Product_Id\") references \"Products\" (\"ProductId\");\n\nalter table \"CustomCategoryProjects\" add constraint \"FK_CustomCategoryProjects_CustomCategories_CustomCategory_Id\" foreign key (\"CustomCategory_Id\") references \"CustomCategories\" (\"CategoryId\");\n\nalter table \"CustomCategoryTypes\" add constraint \"FK_CustomCategoryTypes_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\nalter table \"CustomCategoryTypes\" add constraint \"FK_CustomCategoryTypes_Sites_SiteId_2\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\nalter table \"CustomCategoryTypes\" add constraint \"FK_CustomCategoryTypes_Stores_StoreId_3\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Domains\" add constraint \"FK_Domains_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\nalter table \"Domains\" add constraint \"FK_Domains_Themes_ThemeId_2\" foreign key (\"ThemeId\") references \"Themes\" (\"ThemeId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"EmailTemplates\" add constraint \"FK_EmailTemplates_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\nalter table \"EmailTemplates\" add constraint \"FK_EmailTemplates_Blogs_BlogId_2\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"FeedPageParams\" add constraint \"FK_FeedPageParams_FeedPages_PageId\" foreign key (\"PageId\") references \"FeedPages\" (\"PageId\");\n\nalter table \"FeedPages\" add constraint \"FK_FeedPages_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\nalter table \"FeedPages\" add constraint \"FK_FeedPages_Feeds_FeedId_2\" foreign key (\"FeedId\") references \"Feeds\" (\"FeedId\");\nalter table \"FeedPages\" add constraint \"FK_FeedPages_FeedPages_ParentPageId_3\" foreign key (\"ParentPageId\") references \"FeedPages\" (\"PageId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table \"FeedParams\" add constraint \"FK_FeedParams_Feeds_FeedId\" foreign key (\"FeedId\") references \"Feeds\" (\"FeedId\");\n\nalter table \"Feeds\" add constraint \"FK_Feeds_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Files\" add constraint \"FK_Files_Folders_FolderId\" foreign key (\"FolderId\") references \"Folders\" (\"FolderId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Folders\" add constraint \"FK_Folders_Themes_ImagesFolder_ThemeId\" foreign key (\"ImagesFolder_ThemeId\") references \"Themes\" (\"ThemeId\");\nalter table \"Folders\" add constraint \"FK_Folders_Themes_ScriptsFolder_ThemeId_2\" foreign key (\"ScriptsFolder_ThemeId\") references \"Themes\" (\"ThemeId\");\nalter table \"Folders\" add constraint \"FK_Folders_Themes_StylesheetsFolder_ThemeId_3\" foreign key (\"StylesheetsFolder_ThemeId\") references \"Themes\" (\"ThemeId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"FormAdministrators\" add constraint \"FK_FormAdministrators_Forms_Form_Id\" foreign key (\"Form_Id\") references \"Forms\" (\"FormId\");\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"FormRecipients\" add constraint \"FK_FormRecipients_Forms_FormId\" foreign key (\"FormId\") references \"Forms\" (\"FormId\");\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"FormSubmissionFields\" add constraint \"FK_FormSubmissionFields_FormSubmissions_SubmissionId\" foreign key (\"SubmissionId\") references \"FormSubmissions\" (\"SubmissionId\");\n\nalter table \"FormSubmissionFieldsOld\" add constraint \"FK_FormSubmissionFieldsOld_FormSubmissions_SubmissionId\" foreign key (\"SubmissionId\") references \"FormSubmissions\" (\"SubmissionId\");\n\nalter table \"FormSubmissions\" add constraint \"FK_FormSubmissions_Forms_FormId\" foreign key (\"FormId\") references \"Forms\" (\"FormId\");\n\nalter table \"FormTemplates\" add constraint \"FK_FormTemplates_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n\nalter table \"Forms\" add constraint \"FK_Forms_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Gallery\" add constraint \"FK_Gallery_GalleryImagesTemplates_TemplateId\" foreign key (\"TemplateId\") references \"GalleryImagesTemplates\" (\"TemplateId\");\n\nalter table \"GalleryImage\" add constraint \"FK_GalleryImage_Gallery_IdGallery\" foreign key (\"IdGallery\") references \"Gallery\" (\"IdGallery\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"GalleryImageFile\" add constraint \"FK_GalleryImageFile_GalleryImage_IdImage\" foreign key (\"IdImage\") references \"GalleryImage\" (\"IdImage\");\n\nalter table \"GalleryImageSize\" add constraint \"FK_GalleryImageSize_Gallery_IdGallery\" foreign key (\"IdGallery\") references \"Gallery\" (\"IdGallery\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Layouts\" add constraint \"FK_Layouts_Themes_ThemeId\" foreign key (\"ThemeId\") references \"Themes\" (\"ThemeId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"LinkGroups\" add constraint \"FK_LinkGroups_LinkTemplates_TemplateId\" foreign key (\"TemplateId\") references \"LinkTemplates\" (\"TemplateId\");\nalter table \"LinkGroups\" add constraint \"FK_LinkGroups_Sites_SiteId_2\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"LinkTemplates\" add constraint \"FK_LinkTemplates_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Links\" add constraint \"FK_Links_LinkGroups_GroupId\" foreign key (\"GroupId\") references \"LinkGroups\" (\"GroupId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ModuleProperties\" add constraint \"FK_ModuleProperties__Modules_ModuleId\" foreign key (\"ModuleId\") references \"_Modules\" (\"ModuleId\");\n\nalter table \"Modules\" add constraint \"FK_Modules_Posts_PostId\" foreign key (\"PostId\") references \"Posts\" (\"PostId\");\nalter table \"Modules\" add constraint \"FK_Modules_Modules_ModuleId_2\" foreign key (\"ModuleId\") references \"Modules\" (\"ModuleId\");\nalter table \"Modules\" add constraint \"FK_Modules_Pages_PageId_3\" foreign key (\"PageId\") references \"Pages\" (\"PageId\");\n-- soft fk: [object Object].TaskId -> NumberingTasks.TaskId (control-plane link, not enforced in a site database)\n\nalter table \"PageModuleTemplates\" add constraint \"FK_PageModuleTemplates_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n\nalter table \"PagePartTemplates\" add constraint \"FK_PagePartTemplates_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n\nalter table \"PageTemplates\" add constraint \"FK_PageTemplates_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n\nalter table \"Pages\" add constraint \"FK_Pages_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\nalter table \"Pages\" add constraint \"FK_Pages_Forms_FormId_2\" foreign key (\"FormId\") references \"Forms\" (\"FormId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"PostComments\" add constraint \"FK_PostComments_PostComments_ReplyOnCommentId\" foreign key (\"ReplyOnCommentId\") references \"PostComments\" (\"CommentId\");\nalter table \"PostComments\" add constraint \"FK_PostComments_Posts_PostId_2\" foreign key (\"PostId\") references \"Posts\" (\"PostId\");\n\nalter table \"PostModuleTemplates\" add constraint \"FK_PostModuleTemplates_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"PostTemplates\" add constraint \"FK_PostTemplates_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Posts\" add constraint \"FK_Posts_Blogs_BlogId\" foreign key (\"BlogId\") references \"Blogs\" (\"BlogId\");\nalter table \"Posts\" add constraint \"FK_Posts_BlogAuthors_AuthorId_2\" foreign key (\"AuthorId\") references \"BlogAuthors\" (\"AuthorId\");\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductPartTemplates\" add constraint \"FK_ProductPartTemplates_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n\nalter table \"ProductProperties\" add constraint \"FK_ProductProperties_Products_ProductId\" foreign key (\"ProductId\") references \"Products\" (\"ProductId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductPropertyValues\" add constraint \"FK_ProductPropertyValues_Products_ProductId\" foreign key (\"ProductId\") references \"Products\" (\"ProductId\");\nalter table \"ProductPropertyValues\" add constraint \"FK_ProductPropertyValues_ProductTypeProperties_PropertyId_2\" foreign key (\"PropertyId\") references \"ProductTypeProperties\" (\"PropertyId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductReviewRatings\" add constraint \"FK_ProductReviewRatings_ProductReviews_ReviewId\" foreign key (\"ReviewId\") references \"ProductReviews\" (\"ReviewId\");\nalter table \"ProductReviewRatings\" add constraint \"FK_ProductReviewRatings_ProductTypeRatings_RatingId_2\" foreign key (\"RatingId\") references \"ProductTypeRatings\" (\"RatingId\");\n\nalter table \"ProductReviewVotes\" add constraint \"FK_ProductReviewVotes_ProductReviews_ReviewId\" foreign key (\"ReviewId\") references \"ProductReviews\" (\"ReviewId\");\n-- soft fk: [object Object].VoteId -> Votes.VoteId (control-plane link, not enforced in a site database)\n\nalter table \"ProductReviews\" add constraint \"FK_ProductReviews_Products_ProductId\" foreign key (\"ProductId\") references \"Products\" (\"ProductId\");\n-- soft fk: [object Object].ReviewId -> Reviews.ReviewId (control-plane link, not enforced in a site database)\n\nalter table \"ProductStoreCategories\" add constraint \"FK_ProductStoreCategories_StoreCategories_ProductCategory_Id\" foreign key (\"ProductCategory_Id\") references \"StoreCategories\" (\"CategoryId\");\nalter table \"ProductStoreCategories\" add constraint \"FK_ProductStoreCategories_Products_Product_Id_2\" foreign key (\"Product_Id\") references \"Products\" (\"ProductId\");\n\nalter table \"ProductStoreTags\" add constraint \"FK_ProductStoreTags_StoreTags_ProductTag_Id\" foreign key (\"ProductTag_Id\") references \"StoreTags\" (\"TagId\");\nalter table \"ProductStoreTags\" add constraint \"FK_ProductStoreTags_Products_Product_Id_2\" foreign key (\"Product_Id\") references \"Products\" (\"ProductId\");\n\nalter table \"ProductTypeProperties\" add constraint \"FK_ProductTypeProperties_ProductTypePropertyCategories_C_pu1idu\" foreign key (\"CategoryId\") references \"ProductTypePropertyCategories\" (\"CategoryId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductTypePropertyCategories\" add constraint \"FK_ProductTypePropertyCategories_ProductTypes_ProductTypeId\" foreign key (\"ProductTypeId\") references \"ProductTypes\" (\"TypeId\");\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductTypeRatings\" add constraint \"FK_ProductTypeRatings_ProductTypes_ProductTypeId\" foreign key (\"ProductTypeId\") references \"ProductTypes\" (\"TypeId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductTypes\" add constraint \"FK_ProductTypes_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\nalter table \"ProductTypes\" add constraint \"FK_ProductTypes_ProductVariantTemplates_VariantTemplateId_2\" foreign key (\"VariantTemplateId\") references \"ProductVariantTemplates\" (\"TemplateId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductVariantTemplates\" add constraint \"FK_ProductVariantTemplates_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"ProductVariants\" add constraint \"FK_ProductVariants_Products_ProductId\" foreign key (\"ProductId\") references \"Products\" (\"ProductId\");\nalter table \"ProductVariants\" add constraint \"FK_ProductVariants_ProductVariantTemplates_TemplateId_2\" foreign key (\"TemplateId\") references \"ProductVariantTemplates\" (\"TemplateId\");\n-- soft fk: [object Object].InventoryPolicyId -> InventoryPolicies.InventoryPolicyId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Products\" add constraint \"FK_Products_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\nalter table \"Products\" add constraint \"FK_Products_StoreVendors_VendorId_2\" foreign key (\"VendorId\") references \"StoreVendors\" (\"VendorId\");\nalter table \"Products\" add constraint \"FK_Products_ProductTypes_TypeId_3\" foreign key (\"TypeId\") references \"ProductTypes\" (\"TypeId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Redirections\" add constraint \"FK_Redirections_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\nalter table \"Redirections\" add constraint \"FK_Redirections_Themes_ThemeId_2\" foreign key (\"ThemeId\") references \"Themes\" (\"ThemeId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"RelatedPosts\" add constraint \"FK_RelatedPosts_Posts_PostId\" foreign key (\"PostId\") references \"Posts\" (\"PostId\");\nalter table \"RelatedPosts\" add constraint \"FK_RelatedPosts_Posts_RelatedPostId_2\" foreign key (\"RelatedPostId\") references \"Posts\" (\"PostId\");\n\nalter table \"ReviewItemTemplates\" add constraint \"FK_ReviewItemTemplates_ReviewTemplates_ReviewTemplateId\" foreign key (\"ReviewTemplateId\") references \"ReviewTemplates\" (\"TemplateId\");\n\nalter table \"ReviewRatingTemplates\" add constraint \"FK_ReviewRatingTemplates_ReviewTemplates_ReviewTemplateId\" foreign key (\"ReviewTemplateId\") references \"ReviewTemplates\" (\"TemplateId\");\n\nalter table \"ReviewRatings\" add constraint \"FK_ReviewRatings_ReviewRatingTemplates_RatingTemplateId\" foreign key (\"RatingTemplateId\") references \"ReviewRatingTemplates\" (\"TemplateId\");\nalter table \"ReviewRatings\" add constraint \"FK_ReviewRatings_Reviews_ReviewId_2\" foreign key (\"ReviewId\") references \"Reviews\" (\"ReviewId\");\n\nalter table \"ReviewVotes\" add constraint \"FK_ReviewVotes_Reviews_ReviewId\" foreign key (\"ReviewId\") references \"Reviews\" (\"ReviewId\");\nalter table \"ReviewVotes\" add constraint \"FK_ReviewVotes_Votes_VoteId_2\" foreign key (\"VoteId\") references \"Votes\" (\"VoteId\");\n\nalter table \"Reviews\" add constraint \"FK_Reviews_ReviewTemplates_TemplateId\" foreign key (\"TemplateId\") references \"ReviewTemplates\" (\"TemplateId\");\n\nalter table \"SiteSettings\" add constraint \"FK_SiteSettings_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Sites\" add constraint \"FK_Sites_Accounts_AccountId\" foreign key (\"AccountId\") references \"Accounts\" (\"AccountId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"StaticPages\" add constraint \"FK_StaticPages_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table \"StoreAdministrators\" add constraint \"FK_StoreAdministrators_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"StoreCategories\" add constraint \"FK_StoreCategories_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"StorePartTemplates\" add constraint \"FK_StorePartTemplates_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n\nalter table \"StoreTags\" add constraint \"FK_StoreTags_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"StoreVendors\" add constraint \"FK_StoreVendors_Stores_StoreId\" foreign key (\"StoreId\") references \"Stores\" (\"StoreId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Stores\" add constraint \"FK_Stores_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"TableRecordPartTemplates\" add constraint \"FK_TableRecordPartTemplates_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"TableRecords\" add constraint \"FK_TableRecords_Tables_TableId\" foreign key (\"TableId\") references \"Tables\" (\"TableId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"TableTemplates\" add constraint \"FK_TableTemplates_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Tables\" add constraint \"FK_Tables_TableTemplates_TemplateId\" foreign key (\"TemplateId\") references \"TableTemplates\" (\"TemplateId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Themes\" add constraint \"FK_Themes_Themes_ParentThemeId\" foreign key (\"ParentThemeId\") references \"Themes\" (\"ThemeId\");\nalter table \"Themes\" add constraint \"FK_Themes_Sites_SiteId_2\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"Urls\" add constraint \"FK_Urls_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n\nalter table \"Votes\" add constraint \"FK_Votes_Posts_PostId\" foreign key (\"PostId\") references \"Posts\" (\"PostId\");\n\nalter table \"Watermark\" add constraint \"FK_Watermark_Gallery_IdGallery\" foreign key (\"IdGallery\") references \"Gallery\" (\"IdGallery\");\n\nalter table \"Watermark_ImageWatermark\" add constraint \"FK_Watermark_ImageWatermark_Watermark_IdWatermark\" foreign key (\"IdWatermark\") references \"Watermark\" (\"IdWatermark\");\n\nalter table \"Watermark_TextWatermark\" add constraint \"FK_Watermark_TextWatermark_Watermark_IdWatermark\" foreign key (\"IdWatermark\") references \"Watermark\" (\"IdWatermark\");\n\nalter table \"WidgetProperties\" add constraint \"FK_WidgetProperties_Widgets_WidgetId\" foreign key (\"WidgetId\") references \"Widgets\" (\"WidgetId\");\n\nalter table \"Widgets\" add constraint \"FK_Widgets_Sites_SiteId\" foreign key (\"SiteId\") references \"Sites\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table \"_Templates\" add constraint \"FK__Templates_Blogs_Post_BlogId\" foreign key (\"Post_BlogId\") references \"Blogs\" (\"BlogId\");\nalter table \"_Templates\" add constraint \"FK__Templates_Blogs_Module_BlogId_2\" foreign key (\"Module_BlogId\") references \"Blogs\" (\"BlogId\");\nalter table \"_Templates\" add constraint \"FK__Templates_Blogs_Part_BlogId_3\" foreign key (\"Part_BlogId\") references \"Blogs\" (\"BlogId\");\n-- soft fk: [object Object].FormId -> Forms.FormId (control-plane link, not enforced in a site database)\n";
8
+ export const mariadb = "-- GENERATED from the canonical schema — do not edit; run schema/generate.mjs\n-- dialect: mariadb · canon version: 1 · tables: 120\n\ncreate table `Accounts` (\n `AccountId` char(36) not null,\n `Title` varchar(100) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`AccountId`)\n);\n\ncreate table `AdministratorAccounts` (\n `Administrator_Id` char(36) not null,\n `Account_Id` char(36) not null,\n primary key (`Administrator_Id`, `Account_Id`)\n);\n\ncreate table `AdministratorBlogs` (\n `Administrator_Id` char(36) not null,\n `Blog_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`Administrator_Id`, `Blog_Id`)\n);\ncreate index `AdministratorBlogs_SiteId_idx` on `AdministratorBlogs` (`SiteId`);\n\ncreate table `AdministratorSites` (\n `Administrator_Id` char(36) not null,\n `Site_Id` char(36) not null,\n primary key (`Administrator_Id`, `Site_Id`)\n);\n\ncreate table `AdministratorStores` (\n `Administrator_Id` char(36) not null,\n `Store_Id` char(36) not null,\n primary key (`Administrator_Id`, `Store_Id`)\n);\n\ncreate table `Administrators` (\n `AdministratorId` char(36) not null,\n `Username` varchar(256) null,\n `FirstName` varchar(50) null,\n `LastName` varchar(50) null,\n `Email` varchar(256) null,\n `PasswordHash` varchar(512) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`AdministratorId`)\n);\n\ncreate table `ApiKeys` (\n `ApiKeyId` char(36) not null,\n `AdministratorId` char(36) not null,\n `Name` varchar(200) not null,\n `KeyPrefix` varchar(8) not null,\n `KeyHash` varchar(64) not null,\n `Scope` varchar(500) null,\n `ExpiresAt` datetime(3) null,\n `RevokedAt` datetime(3) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n primary key (`ApiKeyId`)\n);\n\ncreate table `BlackList` (\n `Id` char(36) not null,\n `SiteId` char(36) not null,\n `IpAddress` varchar(50) not null,\n `Reason` varchar(255) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`Id`)\n);\ncreate index `BlackList_SiteId_idx` on `BlackList` (`SiteId`);\n\ncreate table `BlogAuthors` (\n `AuthorId` char(36) not null,\n `Title` varchar(100) not null,\n `Slug` varchar(100) not null,\n `BlogId` char(36) not null,\n `AdministratorId` char(36) not null,\n `Content` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`AuthorId`)\n);\ncreate index `BlogAuthors_SiteId_idx` on `BlogAuthors` (`SiteId`);\n\ncreate table `BlogCategories` (\n `CategoryId` char(36) not null,\n `BlogId` char(36) not null,\n `Title` varchar(100) not null,\n `Description` varchar(256) null,\n `Alias` varchar(100) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `Published` tinyint(1) null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Content` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`CategoryId`)\n);\ncreate index `BlogCategories_SiteId_idx` on `BlogCategories` (`SiteId`);\n\ncreate table `BlogCategoryPosts` (\n `BlogCategory_Id` char(36) not null,\n `Post_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`BlogCategory_Id`, `Post_Id`)\n);\ncreate index `BlogCategoryPosts_SiteId_idx` on `BlogCategoryPosts` (`SiteId`);\n\ncreate table `BlogPostModuleTemplates` (\n `TemplateId` char(36) not null,\n `BlogId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `BlogPostModuleTemplates_SiteId_idx` on `BlogPostModuleTemplates` (`SiteId`);\n\ncreate table `BlogPostPartTemplates` (\n `TemplateId` char(36) not null,\n `BlogId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `BlogPostPartTemplates_SiteId_idx` on `BlogPostPartTemplates` (`SiteId`);\n\ncreate table `BlogPostTemplates` (\n `TemplateId` char(36) not null,\n `BlogId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `BlogPostTemplates_SiteId_idx` on `BlogPostTemplates` (`SiteId`);\n\ncreate table `BlogTagPosts` (\n `BlogTag_Id` char(36) not null,\n `Post_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`BlogTag_Id`, `Post_Id`)\n);\ncreate index `BlogTagPosts_SiteId_idx` on `BlogTagPosts` (`SiteId`);\n\ncreate table `BlogTags` (\n `TagId` char(36) not null,\n `BlogId` char(36) not null,\n `Title` varchar(100) not null,\n `Description` varchar(256) null,\n `Alias` varchar(100) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `Published` tinyint(1) null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Content` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`TagId`)\n);\ncreate index `BlogTags_SiteId_idx` on `BlogTags` (`SiteId`);\n\ncreate table `Blogs` (\n `BlogId` char(36) not null,\n `SiteId` char(36) not null,\n `Title` varchar(256) not null,\n `Alias` varchar(256) not null,\n `Content` mediumtext null,\n `Subtitle` varchar(256) null,\n `About` mediumtext null,\n `AboutType` int null,\n `TemplateSuffix` varchar(50) null,\n `PostContent` mediumtext null,\n `ImageModuleContent` mediumtext null,\n `GalleryModuleContent` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `MaxReplyCommentsLevels` int not null,\n `AllowedCommentTags` varchar(255) null,\n `YearFormat` varchar(255) null,\n `MonthFormat` varchar(255) null,\n `DayFormat` varchar(255) null,\n `PostNumberFormat` varchar(255) null,\n `FeedPath` varchar(255) null,\n `CategoriesPath` varchar(255) null,\n `TagsPath` varchar(255) null,\n `ArchivesPath` varchar(255) null,\n `PostPath` varchar(255) null,\n `AuthorsPath` varchar(255) null,\n `BlogLayout` varchar(100) null,\n `ArchiveLayout` varchar(100) null,\n `AuthorLayout` varchar(100) null,\n `CategoryLayout` varchar(100) null,\n `TagLayout` varchar(100) null,\n `ArchivesLayout` varchar(100) null,\n `AuthorsLayout` varchar(100) null,\n `CategoriesLayout` varchar(100) null,\n `TagsLayout` varchar(100) null,\n `BlogFields` mediumtext null,\n `CategoryFields` mediumtext null,\n `TagFields` mediumtext null,\n `AuthorFields` mediumtext null,\n `FeedFormat` varchar(10) not null,\n `FeedLayout` varchar(100) null,\n `LastDateUpdated` datetime(3) not null,\n `UtcLastDateUpdated` datetime(3) not null,\n `BlogLayouts` mediumtext null,\n `CategoryLayouts` mediumtext null,\n `TagLayouts` mediumtext null,\n `AuthorLayouts` mediumtext null,\n `PostLayout` varchar(100) null,\n `CommentsAllowed` tinyint(1) not null,\n `YearFields` mediumtext null,\n `YearLayouts` mediumtext null,\n `MonthFields` mediumtext null,\n `MonthLayouts` mediumtext null,\n `DayFields` mediumtext null,\n `DayLayouts` mediumtext null,\n `CommentsCaptchaEnabled` tinyint(1) not null,\n `RecentlyViewedEnabled` tinyint(1) not null,\n `RecentlyViewedStorage` int not null,\n `RecentlyViewedExpires` int null,\n `RecentlyViewedListCapacity` int not null,\n `Path` varchar(256) null,\n `MonthLayout` varchar(100) null,\n `DayLayout` varchar(100) null,\n `DefaultCorsPolicy` mediumtext null,\n primary key (`BlogId`)\n);\ncreate index `Blogs_SiteId_idx` on `Blogs` (`SiteId`);\n\ncreate table `CatalogCategories` (\n `CategoryId` char(36) not null,\n `CatalogId` char(36) not null,\n `Title` varchar(255) not null,\n `Slug` varchar(255) not null,\n `Content` mediumtext null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`CategoryId`)\n);\ncreate index `CatalogCategories_SiteId_idx` on `CatalogCategories` (`SiteId`);\n\ncreate table `CatalogProductModuleTemplates` (\n `TemplateId` char(36) not null,\n `CatalogId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `CatalogProductModuleTemplates_SiteId_idx` on `CatalogProductModuleTemplates` (`SiteId`);\n\ncreate table `CatalogProductPartTemplates` (\n `TemplateId` char(36) not null,\n `CatalogId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `CatalogProductPartTemplates_SiteId_idx` on `CatalogProductPartTemplates` (`SiteId`);\n\ncreate table `CatalogProductTemplates` (\n `TemplateId` char(36) not null,\n `CatalogId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `CatalogProductTemplates_SiteId_idx` on `CatalogProductTemplates` (`SiteId`);\n\ncreate table `CatalogProducts` (\n `ProductId` char(36) not null,\n `CatalogId` char(36) not null,\n `TemplateId` char(36) not null,\n `Number` int not null,\n `Title` varchar(255) not null,\n `Slug` varchar(255) not null,\n `Content` mediumtext null,\n `Published` tinyint(1) not null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`ProductId`)\n);\ncreate index `CatalogProducts_SiteId_idx` on `CatalogProducts` (`SiteId`);\n\ncreate table `CatalogProductsCategories` (\n `ProductId` char(36) not null,\n `CategoryId` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`ProductId`, `CategoryId`)\n);\ncreate index `CatalogProductsCategories_SiteId_idx` on `CatalogProductsCategories` (`SiteId`);\n\ncreate table `CatalogProductsTags` (\n `ProductId` char(36) not null,\n `TagId` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`ProductId`, `TagId`)\n);\ncreate index `CatalogProductsTags_SiteId_idx` on `CatalogProductsTags` (`SiteId`);\n\ncreate table `CatalogTags` (\n `TagId` char(36) not null,\n `CatalogId` char(36) not null,\n `Title` varchar(255) not null,\n `Slug` varchar(255) not null,\n `Content` mediumtext null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TagId`)\n);\ncreate index `CatalogTags_SiteId_idx` on `CatalogTags` (`SiteId`);\n\ncreate table `Catalogs` (\n `CatalogId` char(36) not null,\n `SiteId` char(36) not null,\n `Title` varchar(255) not null,\n `Path` varchar(255) not null,\n `Alias` varchar(255) not null,\n `Content` mediumtext null,\n `CatalogLayout` varchar(100) null,\n `CatalogLayouts` mediumtext null,\n `CatalogFields` mediumtext null,\n `CategoriesLayout` varchar(100) null,\n `CategoryLayout` varchar(100) null,\n `CategoryLayouts` mediumtext null,\n `CategoryFields` mediumtext null,\n `CategoriesPath` varchar(255) null,\n `TagsLayout` varchar(100) null,\n `TagLayout` varchar(100) null,\n `TagLayouts` mediumtext null,\n `TagFields` mediumtext null,\n `TagsPath` varchar(255) null,\n `ProductLayout` varchar(100) null,\n `ProductPath` varchar(255) null,\n `ProductsPath` varchar(255) null,\n `ProductNumberFormat` varchar(50) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `RecentlyViewedEnabled` tinyint(1) not null,\n `RecentlyViewedStorage` int not null,\n `RecentlyViewedExpires` int null,\n `RecentlyViewedListCapacity` int not null,\n `DefaultCorsPolicy` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`CatalogId`)\n);\ncreate index `Catalogs_SiteId_idx` on `Catalogs` (`SiteId`);\n\ncreate table `ContentPageItems` (\n `ItemId` char(36) not null,\n `PageId` char(36) null,\n `PostId` char(36) null,\n `ProductId` char(36) null,\n `ProjectId` char(36) null,\n `ContentId` varchar(100) not null,\n `Content` mediumtext null,\n `Discriminator` varchar(256) null,\n `SiteId` char(36) not null,\n primary key (`ItemId`)\n);\ncreate index `ContentPageItems_SiteId_idx` on `ContentPageItems` (`SiteId`);\n\ncreate table `ContentPageParts` (\n `PageId` char(36) not null,\n `Alias` varchar(256) not null,\n `Title` varchar(256) not null,\n `ParentPageId` char(36) null,\n `Index` int null,\n `PartId` varchar(100) null,\n `TemplateName` varchar(100) not null,\n `SiteId` char(36) not null,\n `MetaKeywords` varchar(256) null,\n `MetaDescription` varchar(256) null,\n `IncludeInSitemap` tinyint(1) null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `DateCreated` datetime(3) null,\n `UtcDateCreated` datetime(3) null,\n `CreatedById` char(36) null,\n `Discriminator` varchar(128) not null,\n primary key (`PageId`)\n);\ncreate index `ContentPageParts_SiteId_idx` on `ContentPageParts` (`SiteId`);\n\ncreate table `CustomCategories` (\n `CategoryId` char(36) not null,\n `TypeId` char(36) not null,\n `Title` varchar(50) not null,\n `Slug` varchar(50) not null,\n `Description` varchar(256) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `Content` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`CategoryId`)\n);\ncreate index `CustomCategories_SiteId_idx` on `CustomCategories` (`SiteId`);\n\ncreate table `CustomCategoryContentPages` (\n `CustomCategory_Id` char(36) not null,\n `Page_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`CustomCategory_Id`, `Page_Id`)\n);\ncreate index `CustomCategoryContentPages_SiteId_idx` on `CustomCategoryContentPages` (`SiteId`);\n\ncreate table `CustomCategoryPages` (\n `CustomCategory_Id` char(36) not null,\n `Page_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`CustomCategory_Id`, `Page_Id`)\n);\ncreate index `CustomCategoryPages_SiteId_idx` on `CustomCategoryPages` (`SiteId`);\n\ncreate table `CustomCategoryPosts` (\n `CustomCategory_Id` char(36) not null,\n `Post_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`CustomCategory_Id`, `Post_Id`)\n);\ncreate index `CustomCategoryPosts_SiteId_idx` on `CustomCategoryPosts` (`SiteId`);\n\ncreate table `CustomCategoryProducts` (\n `CustomCategory_Id` char(36) not null,\n `Product_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`CustomCategory_Id`, `Product_Id`)\n);\ncreate index `CustomCategoryProducts_SiteId_idx` on `CustomCategoryProducts` (`SiteId`);\n\ncreate table `CustomCategoryProjects` (\n `CustomCategory_Id` char(36) not null,\n `Project_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`CustomCategory_Id`, `Project_Id`)\n);\ncreate index `CustomCategoryProjects_SiteId_idx` on `CustomCategoryProjects` (`SiteId`);\n\ncreate table `CustomCategoryTypes` (\n `TypeId` char(36) not null,\n `SiteId` char(36) not null,\n `BlogId` char(36) null,\n `PortfolioId` char(36) null,\n `StoreId` char(36) null,\n `Seq` int null,\n `Path` varchar(100) null,\n `Title` varchar(50) not null,\n `Slug` varchar(50) not null,\n `Description` varchar(256) null,\n `TemplateName` varchar(50) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `Discriminator` varchar(50) null,\n `CategoryFields` mediumtext null,\n `Page_SiteId` char(36) null,\n `CategoryLayouts` mediumtext null,\n `Alias` varchar(100) null,\n `CategoryLayout` varchar(50) null,\n primary key (`TypeId`)\n);\ncreate index `CustomCategoryTypes_SiteId_idx` on `CustomCategoryTypes` (`SiteId`);\n\ncreate table `Domains` (\n `DomainId` char(36) not null,\n `Name` varchar(255) not null,\n `PrefixAction` int not null,\n `Public` tinyint(1) not null,\n `SiteId` char(36) not null,\n `ThemeId` char(36) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SettingsData` mediumtext null,\n `RobotsTxt` mediumtext null,\n primary key (`DomainId`)\n);\ncreate index `Domains_SiteId_idx` on `Domains` (`SiteId`);\n\ncreate table `EmailTemplates` (\n `TemplateId` char(36) not null,\n `Name` varchar(100) not null,\n `LoweredName` varchar(100) not null,\n `Description` mediumtext null,\n `From` varchar(255) null,\n `To` varchar(255) null,\n `Subject` varchar(255) null,\n `HtmlEnabled` tinyint(1) not null,\n `PlainText` mediumtext null,\n `Html` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Discriminator` varchar(255) null,\n `BlogId` char(36) null,\n `StoreId` char(36) null,\n `Cc` varchar(255) null,\n `Bcc` varchar(255) null,\n `FromDisplayName` varchar(255) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `EmailTemplates_SiteId_idx` on `EmailTemplates` (`SiteId`);\n\ncreate table `FeedPageParams` (\n `ParamId` char(36) not null,\n `Seq` int not null,\n `Name` varchar(50) null,\n `PageId` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`ParamId`)\n);\ncreate index `FeedPageParams_SiteId_idx` on `FeedPageParams` (`SiteId`);\n\ncreate table `FeedPages` (\n `PageId` char(36) not null,\n `Title` varchar(100) not null,\n `Path` varchar(100) null,\n `SiteId` char(36) not null,\n `Slug` varchar(50) null,\n `ParentPageId` char(36) null,\n `FeedId` char(36) not null,\n `TemplateName` varchar(50) null,\n `PageContent` mediumtext null,\n `PageNumberParamName` varchar(50) null,\n `PageSizeParamName` varchar(50) null,\n `PageSize` int null,\n `Level` int not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `Discriminator` varchar(128) null,\n `Params` mediumtext null,\n primary key (`PageId`)\n);\ncreate index `FeedPages_SiteId_idx` on `FeedPages` (`SiteId`);\n\ncreate table `FeedParams` (\n `ParamId` char(36) not null,\n `Key` varchar(100) not null,\n `Value` mediumtext null,\n `FeedId` char(36) not null,\n `Liquidizable` tinyint(1) not null,\n `SiteId` char(36) not null,\n primary key (`ParamId`)\n);\ncreate index `FeedParams_SiteId_idx` on `FeedParams` (`SiteId`);\n\ncreate table `Feeds` (\n `FeedId` char(36) not null,\n `Title` varchar(100) not null,\n `Alias` varchar(100) not null,\n `LoweredAlias` varchar(100) not null,\n `Content` mediumtext null,\n `FetchedAt` datetime(3) null,\n `UtcFetchedAt` datetime(3) null,\n `SiteId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Discriminator` varchar(128) not null,\n `FetchInterval` int null,\n primary key (`FeedId`)\n);\ncreate index `Feeds_SiteId_idx` on `Feeds` (`SiteId`);\n\ncreate table `Files` (\n `FileId` char(36) not null,\n `FolderId` char(36) not null,\n `Filename` varchar(100) not null,\n `LoweredFilename` varchar(100) not null,\n `ContentType` varchar(50) not null,\n `Size` int not null,\n `StorageClient` varchar(50) null,\n `StorageFilename` varchar(256) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `Discriminator` varchar(128) null,\n `Hash` varchar(50) null,\n `SiteId` char(36) not null,\n primary key (`FileId`)\n);\ncreate index `Files_SiteId_idx` on `Files` (`SiteId`);\n\ncreate table `Folders` (\n `FolderId` char(36) not null,\n `OwnerId` char(36) null,\n `ImagesFolder_ThemeId` char(36) null,\n `ScriptsFolder_ThemeId` char(36) null,\n `StylesheetsFolder_ThemeId` char(36) null,\n `Path` varchar(256) not null,\n `LoweredPath` varchar(256) not null,\n `ImageSettingsProviderType` varchar(256) null,\n `ImageSettingsProviderParams` varchar(256) null,\n `ImageSettings` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `Discriminator` varchar(128) null,\n `ImagesFolder_Id` char(36) null,\n `SiteId` char(36) not null,\n primary key (`FolderId`)\n);\ncreate index `Folders_SiteId_idx` on `Folders` (`SiteId`);\n\ncreate table `FormAdministrators` (\n `Form_Id` char(36) not null,\n `Administrator_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`Form_Id`, `Administrator_Id`)\n);\ncreate index `FormAdministrators_SiteId_idx` on `FormAdministrators` (`SiteId`);\n\ncreate table `FormRecipients` (\n `RecipientId` char(36) not null,\n `FormId` char(36) not null,\n `AdministratorId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`RecipientId`)\n);\ncreate index `FormRecipients_SiteId_idx` on `FormRecipients` (`SiteId`);\n\ncreate table `FormSubmissionFields` (\n `FieldId` char(36) not null,\n `SubmissionId` char(36) not null,\n `Seq` int not null,\n `Title` varchar(100) null,\n `Value` mediumtext null,\n `DataType` int not null,\n `Name` varchar(100) null,\n `SiteId` char(36) not null,\n primary key (`FieldId`)\n);\ncreate index `FormSubmissionFields_SiteId_idx` on `FormSubmissionFields` (`SiteId`);\n\ncreate table `FormSubmissionFieldsOld` (\n `FieldId` char(36) not null,\n `SubmissionId` char(36) not null,\n `Seq` int not null,\n `Title` varchar(100) null,\n `Value` varchar(4000) null,\n `DataType` int not null,\n `Name` varchar(100) null,\n `SiteId` char(36) not null,\n primary key (`FieldId`)\n);\ncreate index `FormSubmissionFieldsOld_SiteId_idx` on `FormSubmissionFieldsOld` (`SiteId`);\n\ncreate table `FormSubmissions` (\n `SubmissionId` char(36) not null,\n `FormId` char(36) not null,\n `Date` datetime(3) not null,\n `UtcDate` datetime(3) not null,\n `Number` int not null,\n `IpAddress` varchar(100) null,\n `UserAgent` varchar(256) null,\n `IsSpam` tinyint(1) not null,\n `Content` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`SubmissionId`)\n);\ncreate index `FormSubmissions_SiteId_idx` on `FormSubmissions` (`SiteId`);\n\ncreate table `FormTemplates` (\n `TemplateId` char(36) not null,\n `SiteId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `ConfirmationEmailTemplate` varchar(255) null,\n `SubmissionEmailTemplate` varchar(255) null,\n primary key (`TemplateId`)\n);\ncreate index `FormTemplates_SiteId_idx` on `FormTemplates` (`SiteId`);\n\ncreate table `Forms` (\n `FormId` char(36) not null,\n `Name` varchar(100) null,\n `Content` mediumtext null,\n `SubmissionAction` int not null,\n `RedirectUrl` varchar(256) null,\n `SuccessMessage` varchar(256) null,\n `SiteId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Path` varchar(256) null,\n `TemplateId` char(36) null,\n primary key (`FormId`)\n);\ncreate index `Forms_SiteId_idx` on `Forms` (`SiteId`);\n\ncreate table `Gallery` (\n `IdGallery` char(36) not null,\n `OwnerName` varchar(50) null,\n `IdOwner` char(36) null,\n `Name` varchar(100) not null,\n `Title` varchar(255) null,\n `Description` mediumtext null,\n `OriginalFilenames` tinyint(1) not null,\n `MaxUploadFileSize` int null,\n `ThumbnailImageSize` varchar(20) not null,\n `DefaultImageSize` varchar(20) not null,\n `SeqFilenameFormat` varchar(50) null,\n `TemplateId` char(36) null,\n `SiteId` char(36) not null,\n primary key (`IdGallery`)\n);\ncreate index `Gallery_SiteId_idx` on `Gallery` (`SiteId`);\n\ncreate table `GalleryImage` (\n `IdImage` char(36) not null,\n `IdGallery` char(36) not null,\n `Seq` int not null,\n `Title` varchar(255) null,\n `Alt` varchar(255) null,\n `Description` mediumtext null,\n `Visible` tinyint(1) not null,\n `OriginalFilename` varchar(255) not null,\n `Author` varchar(100) null,\n `Copyright` varchar(100) null,\n `StorageClient` varchar(255) not null,\n `StorageFilename` varchar(255) not null,\n `MimeType` varchar(50) not null,\n `Width` int not null,\n `Height` int not null,\n `FileSize` int not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Content` mediumtext null,\n `Hash` varchar(50) null,\n `SiteId` char(36) not null,\n primary key (`IdImage`)\n);\ncreate index `GalleryImage_SiteId_idx` on `GalleryImage` (`SiteId`);\n\ncreate table `GalleryImageFile` (\n `IdImage` char(36) not null,\n `SizeLabel` varchar(20) not null,\n `StorageClient` varchar(255) not null,\n `StorageFilename` varchar(255) not null,\n `StaticLink` varchar(255) null,\n `UseStaticLink` tinyint(1) not null,\n `MimeType` varchar(50) not null,\n `Width` int null,\n `Height` int null,\n `FileSize` int null,\n `Original` tinyint(1) not null,\n `SiteId` char(36) not null,\n primary key (`IdImage`, `SizeLabel`)\n);\ncreate index `GalleryImageFile_SiteId_idx` on `GalleryImageFile` (`SiteId`);\n\ncreate table `GalleryImageSize` (\n `IdSize` char(36) not null,\n `IdGallery` char(36) not null,\n `Label` varchar(20) not null,\n `MaxWidth` int not null,\n `MaxHeight` int not null,\n `Quality` int not null,\n `SiteId` char(36) not null,\n primary key (`IdSize`)\n);\ncreate index `GalleryImageSize_SiteId_idx` on `GalleryImageSize` (`SiteId`);\n\ncreate table `GalleryImageSizeWatermark` (\n `GalleryImageSize_IdSize` char(36) not null,\n `Watermark_IdWatermark` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`GalleryImageSize_IdSize`, `Watermark_IdWatermark`)\n);\ncreate index `GalleryImageSizeWatermark_SiteId_idx` on `GalleryImageSizeWatermark` (`SiteId`);\n\ncreate table `GalleryImagesTemplates` (\n `TemplateId` char(36) not null,\n `Content` mediumtext null,\n `Layouts` mediumtext null,\n `OwnerTemplateId` char(36) not null,\n `TemplateName` varchar(100) not null,\n `FieldName` varchar(100) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Alias` varchar(100) null,\n `CustomDefaultLayout` varchar(100) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `GalleryImagesTemplates_SiteId_idx` on `GalleryImagesTemplates` (`SiteId`);\n\ncreate table `InventoryPolicies` (\n `InventoryPolicyId` int not null,\n `Name` varchar(100) not null,\n `EnumLabel` varchar(30) null,\n primary key (`InventoryPolicyId`)\n);\n\ncreate table `Layouts` (\n `LayoutId` char(36) not null,\n `ThemeId` char(36) not null,\n `Name` varchar(100) null,\n `LoweredName` varchar(100) null,\n `Content` mediumtext null,\n `ViewEngineId` int not null,\n `UtcDateCreated` datetime(3) not null,\n `DateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `ContentType` varchar(50) null,\n `Encoding` varchar(50) null,\n `Hash` varchar(50) null,\n `SiteId` char(36) not null,\n primary key (`LayoutId`)\n);\ncreate index `Layouts_SiteId_idx` on `Layouts` (`SiteId`);\n\ncreate table `LinkGroups` (\n `GroupId` char(36) not null,\n `Title` varchar(100) not null,\n `Slug` varchar(100) not null,\n `SiteId` char(36) not null,\n `TemplateId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`GroupId`)\n);\ncreate index `LinkGroups_SiteId_idx` on `LinkGroups` (`SiteId`);\n\ncreate table `LinkTemplates` (\n `TemplateId` char(36) not null,\n `Name` varchar(100) not null,\n `Description` varchar(1000) null,\n `Content` mediumtext null,\n `Layouts` mediumtext null,\n `SiteId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Alias` varchar(100) null,\n `CustomDefaultLayout` varchar(100) null,\n primary key (`TemplateId`)\n);\ncreate index `LinkTemplates_SiteId_idx` on `LinkTemplates` (`SiteId`);\n\ncreate table `Links` (\n `LinkId` char(36) not null,\n `Title` varchar(100) not null,\n `Slug` varchar(100) not null,\n `Url` varchar(1000) not null,\n `GroupId` char(36) not null,\n `Content` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`LinkId`)\n);\ncreate index `Links_SiteId_idx` on `Links` (`SiteId`);\n\ncreate table `ModuleProperties` (\n `PropertyId` char(36) not null,\n `ModuleId` char(36) not null,\n `PropertyKey` varchar(100) not null,\n `PropertyValue` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`PropertyId`)\n);\ncreate index `ModuleProperties_SiteId_idx` on `ModuleProperties` (`SiteId`);\n\ncreate table `Modules` (\n `ModuleId` char(36) not null,\n `TemplateId` char(36) null,\n `PostId` char(36) null,\n `Index` int not null,\n `Content` mediumtext null,\n `VisibleInList` tinyint(1) not null,\n `VisibleInDetails` tinyint(1) not null,\n `VisibleInFeed` tinyint(1) not null,\n `Discriminator` varchar(128) null,\n `PageId` char(36) null,\n `Page_TemplateId` char(36) null,\n `SiteId` char(36) not null,\n primary key (`ModuleId`)\n);\ncreate index `Modules_SiteId_idx` on `Modules` (`SiteId`);\n\ncreate table `NumberingCounters` (\n `CounterId` char(36) not null,\n `TaskId` char(36) not null,\n `OwnerId` char(36) not null,\n `Date` datetime(3) not null,\n `LastNumber` int not null,\n `SiteId` char(36) not null,\n primary key (`CounterId`)\n);\ncreate index `NumberingCounters_SiteId_idx` on `NumberingCounters` (`SiteId`);\n\ncreate table `NumberingTasks` (\n `TaskId` char(36) not null,\n `Label` varchar(255) not null,\n `Name` varchar(255) not null,\n `Commentary` varchar(4000) null,\n `PeriodTypeId` int not null,\n `MinNumber` int not null,\n `MaxNumber` int not null,\n primary key (`TaskId`)\n);\n\ncreate table `PageModuleTemplates` (\n `TemplateId` char(36) not null,\n `SiteId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`TemplateId`)\n);\ncreate index `PageModuleTemplates_SiteId_idx` on `PageModuleTemplates` (`SiteId`);\n\ncreate table `PagePartTemplates` (\n `TemplateId` char(36) not null,\n `SiteId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`TemplateId`)\n);\ncreate index `PagePartTemplates_SiteId_idx` on `PagePartTemplates` (`SiteId`);\n\ncreate table `PageTemplates` (\n `TemplateId` char(36) not null,\n `SiteId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`TemplateId`)\n);\ncreate index `PageTemplates_SiteId_idx` on `PageTemplates` (`SiteId`);\n\ncreate table `Pages` (\n `PageId` char(36) not null,\n `SiteId` char(36) not null,\n `Path` varchar(256) not null,\n `Title` varchar(256) not null,\n `Content` mediumtext null,\n `TemplateId` char(36) not null,\n `Published` tinyint(1) not null,\n `DatePublished` datetime(3) null,\n `UtcDatePublished` datetime(3) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `SitemapPriority` decimal(18,2) null,\n `FormId` char(36) null,\n `ViewsCount` int not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`PageId`)\n);\ncreate index `Pages_SiteId_idx` on `Pages` (`SiteId`);\n\ncreate table `PostComments` (\n `CommentId` char(36) not null,\n `PostId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `AuthorName` varchar(256) not null,\n `AuthorEmail` varchar(256) not null,\n `Title` varchar(256) null,\n `Content` mediumtext not null,\n `ContentType` int null,\n `Published` tinyint(1) not null,\n `IsSpam` tinyint(1) not null,\n `IpAddress` varchar(20) null,\n `UserAgent` varchar(256) null,\n `AuthorUrl` varchar(256) null,\n `ReplyOnCommentId` char(36) null,\n `Level` int not null,\n `SiteId` char(36) not null,\n primary key (`CommentId`)\n);\ncreate index `PostComments_SiteId_idx` on `PostComments` (`SiteId`);\n\ncreate table `PostModuleTemplates` (\n `TemplateId` char(36) not null,\n `BlogId` char(36) not null,\n `Name` varchar(50) not null,\n `Description` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Content` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `PostModuleTemplates_SiteId_idx` on `PostModuleTemplates` (`SiteId`);\n\ncreate table `PostTemplates` (\n `TemplateId` char(36) not null,\n `BlogId` char(36) not null,\n `Name` varchar(50) not null,\n `Description` mediumtext null,\n `Modules` tinyint(1) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Content` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `PostTemplates_SiteId_idx` on `PostTemplates` (`SiteId`);\n\ncreate table `Posts` (\n `PostId` char(36) not null,\n `BlogId` char(36) not null,\n `AuthorId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `Number` int not null,\n `Title` varchar(256) not null,\n `Excerpt` mediumtext null,\n `ExcerptType` int null,\n `Content` mediumtext null,\n `ContentType` int null,\n `Alias` varchar(256) null,\n `Published` tinyint(1) not null,\n `DatePublished` datetime(3) null,\n `UtcDatePublished` datetime(3) null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `ViewsCount` int not null,\n `Rating` decimal(18,2) null,\n `VotesCount` int not null,\n `CommentsAllowed` tinyint(1) not null,\n `CommentsCount` int not null,\n `ShortUrl` varchar(255) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `SitemapPriority` decimal(18,2) null,\n `TemplateId` char(36) null,\n `UpdatedById` char(36) null,\n `CreatedById` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`PostId`)\n);\ncreate index `Posts_SiteId_idx` on `Posts` (`SiteId`);\n\ncreate table `ProductPartTemplates` (\n `TemplateId` char(36) not null,\n `StoreId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `ProductPartTemplates_SiteId_idx` on `ProductPartTemplates` (`SiteId`);\n\ncreate table `ProductProperties` (\n `PropertyId` char(36) not null,\n `ProductId` char(36) not null,\n `Name` varchar(100) not null,\n `Value` mediumtext not null,\n `ValueType` int not null,\n `Description` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`PropertyId`)\n);\ncreate index `ProductProperties_SiteId_idx` on `ProductProperties` (`SiteId`);\n\ncreate table `ProductPropertyValues` (\n `ValueId` char(36) not null,\n `ProductId` char(36) not null,\n `PropertyId` char(36) not null,\n `Value` mediumtext null,\n `Description` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`ValueId`)\n);\ncreate index `ProductPropertyValues_SiteId_idx` on `ProductPropertyValues` (`SiteId`);\n\ncreate table `ProductReviewRatings` (\n `Id` char(36) not null,\n `ReviewId` char(36) not null,\n `RatingId` char(36) not null,\n `Rating` decimal(18,1) not null,\n `SiteId` char(36) not null,\n primary key (`Id`)\n);\ncreate index `ProductReviewRatings_SiteId_idx` on `ProductReviewRatings` (`SiteId`);\n\ncreate table `ProductReviewVotes` (\n `VoteId` char(36) not null,\n `ReviewId` char(36) not null,\n `Helpful` tinyint(1) not null,\n `Timestamp` datetime(3) not null,\n `UtcTimestamp` datetime(3) not null,\n `IpAddress` varchar(20) null,\n `UserAgent` varchar(256) null,\n `SiteId` char(36) not null,\n primary key (`VoteId`)\n);\ncreate index `ProductReviewVotes_SiteId_idx` on `ProductReviewVotes` (`SiteId`);\n\ncreate table `ProductReviews` (\n `ReviewId` char(36) not null,\n `ProductId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `AuthorName` varchar(256) not null,\n `AuthorEmail` varchar(256) not null,\n `Public` tinyint(1) not null,\n `Rating` decimal(18,1) null,\n `Title` varchar(256) null,\n `Pros` mediumtext not null,\n `Cons` mediumtext not null,\n `Notes` mediumtext not null,\n `HelpfulVotesCount` int null,\n `NotHelpfulVotesCount` int null,\n `Published` tinyint(1) not null,\n `IsSpam` tinyint(1) not null,\n `IpAddress` varchar(20) null,\n `UserAgent` varchar(256) null,\n `SiteId` char(36) not null,\n primary key (`ReviewId`)\n);\ncreate index `ProductReviews_SiteId_idx` on `ProductReviews` (`SiteId`);\n\ncreate table `ProductStoreCategories` (\n `Product_Id` char(36) not null,\n `ProductCategory_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`Product_Id`, `ProductCategory_Id`)\n);\ncreate index `ProductStoreCategories_SiteId_idx` on `ProductStoreCategories` (`SiteId`);\n\ncreate table `ProductStoreTags` (\n `Product_Id` char(36) not null,\n `ProductTag_Id` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`Product_Id`, `ProductTag_Id`)\n);\ncreate index `ProductStoreTags_SiteId_idx` on `ProductStoreTags` (`SiteId`);\n\ncreate table `ProductTypeProperties` (\n `PropertyId` char(36) not null,\n `CategoryId` char(36) not null,\n `Name` varchar(100) not null,\n `ValueType` int not null,\n `Description` mediumtext null,\n `Main` tinyint(1) not null,\n `DisplayEmpty` tinyint(1) not null,\n `Seq` int not null,\n `DateCreated` datetime(3) null,\n `UtcDateCreated` datetime(3) null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`PropertyId`)\n);\ncreate index `ProductTypeProperties_SiteId_idx` on `ProductTypeProperties` (`SiteId`);\n\ncreate table `ProductTypePropertyCategories` (\n `CategoryId` char(36) not null,\n `ProductTypeId` char(36) not null,\n `Name` varchar(100) not null,\n `Main` tinyint(1) not null,\n `DisplayEmpty` tinyint(1) not null,\n `Seq` int not null,\n `DateCreated` datetime(3) null,\n `UtcDateCreated` datetime(3) null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`CategoryId`)\n);\ncreate index `ProductTypePropertyCategories_SiteId_idx` on `ProductTypePropertyCategories` (`SiteId`);\n\ncreate table `ProductTypeRatings` (\n `RatingId` char(36) not null,\n `ProductTypeId` char(36) not null,\n `Name` varchar(100) not null,\n `Weight` int null,\n `Main` tinyint(1) not null,\n `DisplayEmpty` tinyint(1) not null,\n `Seq` int not null,\n `DateCreated` datetime(3) null,\n `UtcDateCreated` datetime(3) null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`RatingId`)\n);\ncreate index `ProductTypeRatings_SiteId_idx` on `ProductTypeRatings` (`SiteId`);\n\ncreate table `ProductTypes` (\n `TypeId` char(36) not null,\n `Name` varchar(100) not null,\n `Description` mediumtext null,\n `StoreId` char(36) not null,\n `TemplateName` varchar(100) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `IntId` int not null,\n `YmlExport` tinyint(1) not null,\n `ProductPrefix` varchar(50) null,\n `Content` mediumtext null,\n `Properties` mediumtext null,\n `ListLayout` varchar(100) null,\n `DetailsLayout` varchar(100) null,\n `Layouts` mediumtext null,\n `VariantTemplateId` char(36) not null,\n `Alias` varchar(100) null,\n `CustomDefaultLayout` varchar(100) null,\n `SiteId` char(36) not null,\n primary key (`TypeId`)\n);\ncreate index `ProductTypes_SiteId_idx` on `ProductTypes` (`SiteId`);\n\ncreate table `ProductVariantTemplates` (\n `TemplateId` char(36) not null,\n `Name` varchar(100) not null,\n `Description` varchar(1000) null,\n `Content` mediumtext null,\n `Layouts` mediumtext null,\n `StoreId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Alias` varchar(100) null,\n `CustomDefaultLayout` varchar(100) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `ProductVariantTemplates_SiteId_idx` on `ProductVariantTemplates` (`SiteId`);\n\ncreate table `ProductVariants` (\n `VariantId` char(36) not null,\n `ProductId` char(36) not null,\n `Position` int not null,\n `Title` varchar(255) not null,\n `Price` decimal(18,2) null,\n `CompareAtPrice` decimal(18,2) null,\n `InventoryQuantity` int null,\n `InventoryPolicyId` int not null,\n `Sku` varchar(50) null,\n `Weight` decimal(18,2) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `IntId` int not null,\n `YmlExport` tinyint(1) not null,\n `Bid` decimal(18,2) null,\n `Cbid` decimal(18,2) null,\n `VendorCode` varchar(50) null,\n `BuyAtStore` tinyint(1) not null,\n `SelfDelivery` tinyint(1) not null,\n `Delivery` tinyint(1) not null,\n `DeliveryPrice` decimal(18,2) null,\n `TemplateId` char(36) not null,\n `Content` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`VariantId`)\n);\ncreate index `ProductVariants_SiteId_idx` on `ProductVariants` (`SiteId`);\n\ncreate table `Products` (\n `ProductId` char(36) not null,\n `Title` varchar(256) not null,\n `ShortDescription` mediumtext null,\n `ShortDescriptionType` int null,\n `Description` mediumtext null,\n `DescriptionType` int null,\n `Kit` mediumtext null,\n `KitType` int null,\n `Slug` varchar(256) not null,\n `StoreId` char(36) not null,\n `TypeId` char(36) not null,\n `VendorId` char(36) null,\n `Published` tinyint(1) not null,\n `Rating` decimal(18,2) null,\n `VotesCount` int null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `TemplateName` varchar(100) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `CountryOfOrigin` varchar(50) null,\n `Content` mediumtext null,\n `Number` int not null,\n `SiteId` char(36) not null,\n primary key (`ProductId`)\n);\ncreate index `Products_SiteId_idx` on `Products` (`SiteId`);\n\ncreate table `Redirections` (\n `RedirectionId` char(36) not null,\n `Title` varchar(100) not null,\n `Seq` int not null,\n `UrlDetection` tinyint(1) not null,\n `TargetUrl` varchar(256) null,\n `SourceType` int not null,\n `Regex` tinyint(1) not null,\n `IgnoreCase` tinyint(1) not null,\n `Action` int not null,\n `DestinationUrl` varchar(256) null,\n `Permanent` tinyint(1) not null,\n `ThemeId` char(36) null,\n `SiteId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `BrowserDetection` tinyint(1) not null,\n `BrowserName` varchar(100) null,\n `BrowserVersion` varchar(50) null,\n `BrowserMajorVersion` int null,\n `BrowserMinorVersion` decimal(18,6) null,\n `BrowserType` varchar(100) null,\n `BrowserLayoutEngine` varchar(100) null,\n `BrowserPlatform` varchar(100) null,\n `BrowserScreenPixelsWidth` int null,\n `BrowserScreenPixelsHeight` int null,\n `MobileDeviceDetection` tinyint(1) not null,\n `IsMobileDevice` tinyint(1) not null,\n `MobileDeviceModel` varchar(100) null,\n `MobileDeviceManufacturer` varchar(100) null,\n `DeviceTypeDetection` tinyint(1) not null,\n `DeviceIsDesktop` tinyint(1) not null,\n `DeviceIsTablet` tinyint(1) not null,\n `DeviceIsConsole` tinyint(1) not null,\n `DeviceIsTV` tinyint(1) not null,\n `DeviceIsMobile` tinyint(1) not null,\n `DeviceIsCrawler` tinyint(1) not null,\n `QueryStringParamName` varchar(50) null,\n `CookieName` varchar(50) null,\n `CookieExpires` int null,\n `IgnoreOptions` tinyint(1) not null,\n primary key (`RedirectionId`)\n);\ncreate index `Redirections_SiteId_idx` on `Redirections` (`SiteId`);\n\ncreate table `RelatedPosts` (\n `PostId` char(36) not null,\n `RelatedPostId` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`PostId`, `RelatedPostId`)\n);\ncreate index `RelatedPosts_SiteId_idx` on `RelatedPosts` (`SiteId`);\n\ncreate table `ReviewItemTemplates` (\n `ItemTemplateId` char(36) not null,\n `ReviewTemplateId` char(36) not null,\n `SiteId` char(36) not null,\n `Type` varchar(256) not null,\n `Path` varchar(256) not null,\n `SubmissionAction` int not null,\n `RedirectUrl` varchar(256) null,\n `SuccessMessage` varchar(256) null,\n `EmailRecipients` varchar(2000) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`ItemTemplateId`)\n);\ncreate index `ReviewItemTemplates_SiteId_idx` on `ReviewItemTemplates` (`SiteId`);\n\ncreate table `ReviewRatingTemplates` (\n `TemplateId` char(36) not null,\n `ReviewTemplateId` char(36) not null,\n `Name` varchar(100) not null,\n `Weight` int null,\n `Seq` int not null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `ReviewRatingTemplates_SiteId_idx` on `ReviewRatingTemplates` (`SiteId`);\n\ncreate table `ReviewRatings` (\n `RatingId` char(36) not null,\n `ReviewId` char(36) not null,\n `RatingTemplateId` char(36) not null,\n `Value` decimal(18,2) not null,\n `SiteId` char(36) not null,\n primary key (`RatingId`)\n);\ncreate index `ReviewRatings_SiteId_idx` on `ReviewRatings` (`SiteId`);\n\ncreate table `ReviewTemplates` (\n `TemplateId` char(36) not null,\n `SiteId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(100) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`TemplateId`)\n);\ncreate index `ReviewTemplates_SiteId_idx` on `ReviewTemplates` (`SiteId`);\n\ncreate table `ReviewVotes` (\n `VoteId` char(36) not null,\n `ReviewId` char(36) not null,\n `Helpful` tinyint(1) not null,\n `Timestamp` datetime(3) not null,\n `UtcTimestamp` datetime(3) not null,\n `IpAddress` varchar(20) null,\n `UserAgent` varchar(256) null,\n `Referer` varchar(2000) null,\n `SiteId` char(36) not null,\n primary key (`VoteId`)\n);\ncreate index `ReviewVotes_SiteId_idx` on `ReviewVotes` (`SiteId`);\n\ncreate table `Reviews` (\n `ReviewId` char(36) not null,\n `SiteId` char(36) not null,\n `ItemType` varchar(50) not null,\n `ItemId` char(36) not null,\n `TemplateId` char(36) not null,\n `ReviewerName` varchar(256) null,\n `ReviewerEmail` varchar(256) null,\n `Public` tinyint(1) not null,\n `Rating` decimal(18,2) null,\n `Summary` varchar(256) null,\n `Details` mediumtext null,\n `Pros` mediumtext null,\n `Cons` mediumtext null,\n `Fields` mediumtext null,\n `HelpfulVotesCount` int null,\n `NotHelpfulVotesCount` int null,\n `Published` tinyint(1) not null,\n `DatePublished` datetime(3) null,\n `UtcDatePublished` datetime(3) null,\n `IsDublicate` tinyint(1) not null,\n `IsSpam` tinyint(1) not null,\n `IpAddress` varchar(20) null,\n `UserAgent` varchar(256) null,\n `Referer` varchar(2000) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n primary key (`ReviewId`)\n);\ncreate index `Reviews_SiteId_idx` on `Reviews` (`SiteId`);\n\ncreate table `SiteSettings` (\n `SettingId` char(36) not null,\n `SiteId` char(36) not null,\n `Key` varchar(100) not null,\n `Value` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n primary key (`SettingId`)\n);\ncreate index `SiteSettings_SiteId_idx` on `SiteSettings` (`SiteId`);\n\ncreate table `Sites` (\n `SiteId` char(36) not null,\n `AccountId` char(36) not null,\n `Title` varchar(100) null,\n `Alias` varchar(100) null,\n `LoweredAlias` varchar(100) null,\n `PrimaryDomain` varchar(100) null,\n `TimeOffset` varchar(100) null,\n `Culture` varchar(50) null,\n `MultiCultural` tinyint(1) not null default 0,\n `Cultures` mediumtext null,\n `ActiveThemeId` char(36) null,\n `RobotsTxt` mediumtext null,\n `Live` tinyint(1) not null,\n `Production` tinyint(1) not null,\n `Password` varchar(20) null,\n `PrefixAction` int null,\n `PagerSlug` varchar(50) null,\n `SettingsData` mediumtext null,\n `SettingsTemplate` mediumtext null,\n `DomainSettingsTemplate` mediumtext null,\n `DateCreated` datetime(3) not null default current_timestamp(3),\n `UtcDateCreated` datetime(3) not null default current_timestamp(3),\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SearchAnalyzer` varchar(50) null,\n `SearchIndexCreationTimestamp` datetime(3) null,\n `DefaultContentType` varchar(50) null,\n `DefaultEncoding` varchar(50) null,\n `DefaultPageName` varchar(50) null,\n `DefaultExtension` varchar(50) null,\n `NewTemplates` tinyint(1) not null default 0,\n `CachingOptions` mediumtext null,\n `EnableCors` tinyint(1) not null default 0,\n `DefaultCorsPolicy` mediumtext null,\n `ContentCacheOptions` mediumtext null,\n `Writable` tinyint(1) not null default 1,\n primary key (`SiteId`)\n);\n\ncreate table `StaticPages` (\n `PageId` char(36) not null,\n `SiteId` char(36) not null,\n `Path` varchar(256) not null,\n `Content` mediumtext null,\n `ContentType` varchar(50) null,\n `Encoding` varchar(50) null,\n `Published` tinyint(1) not null,\n `DatePublished` datetime(3) null,\n `UtcDatePublished` datetime(3) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `SitemapPriority` decimal(18,2) null,\n `ViewsCount` int not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`PageId`)\n);\ncreate index `StaticPages_SiteId_idx` on `StaticPages` (`SiteId`);\n\ncreate table `StoreAdministrators` (\n `StoreAdministratorId` char(36) not null,\n `StoreId` char(36) not null,\n `AdministratorId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`StoreAdministratorId`)\n);\ncreate index `StoreAdministrators_SiteId_idx` on `StoreAdministrators` (`SiteId`);\n\ncreate table `StoreCategories` (\n `CategoryId` char(36) not null,\n `Title` varchar(256) not null,\n `Description` mediumtext null,\n `DescriptionType` int null,\n `Slug` varchar(256) not null,\n `Content` mediumtext null,\n `StoreId` char(36) not null,\n `DateCreated` datetime(3) null,\n `UtcDateCreated` datetime(3) null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) null,\n `UpdatedById` char(36) null,\n `Criteria` varchar(256) null,\n `SortOrder` varchar(256) null,\n `TemplateName` varchar(100) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `Discriminator` varchar(128) not null,\n `SiteId` char(36) not null,\n primary key (`CategoryId`)\n);\ncreate index `StoreCategories_SiteId_idx` on `StoreCategories` (`SiteId`);\n\ncreate table `StorePartTemplates` (\n `TemplateId` char(36) not null,\n `StoreId` char(36) not null,\n `Name` varchar(100) not null,\n `Alias` varchar(100) not null,\n `Description` mediumtext null,\n `Content` mediumtext null,\n `CustomDefaultLayout` varchar(50) null,\n `Layouts` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TemplateId`)\n);\ncreate index `StorePartTemplates_SiteId_idx` on `StorePartTemplates` (`SiteId`);\n\ncreate table `StoreTags` (\n `TagId` char(36) not null,\n `Title` varchar(50) not null,\n `Slug` varchar(50) not null,\n `Content` mediumtext null,\n `StoreId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`TagId`)\n);\ncreate index `StoreTags_SiteId_idx` on `StoreTags` (`SiteId`);\n\ncreate table `StoreVendors` (\n `VendorId` char(36) not null,\n `Title` varchar(100) not null,\n `Slug` varchar(100) not null,\n `Content` mediumtext null,\n `StoreId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`VendorId`)\n);\ncreate index `StoreVendors_SiteId_idx` on `StoreVendors` (`SiteId`);\n\ncreate table `Stores` (\n `StoreId` char(36) not null,\n `Title` varchar(256) not null,\n `Path` varchar(256) not null,\n `SiteId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `IncludeInSitemap` tinyint(1) not null,\n `SitemapPriority` decimal(18,2) null,\n `SitemapLastUpdatedTime` datetime(3) null,\n `SitemapChangeFrequency` varchar(20) null,\n `Content` mediumtext null,\n `StoreLayout` varchar(255) null,\n `CategoryLayout` varchar(255) null,\n `SmartCategoryLayout` varchar(255) null,\n `TagLayout` varchar(255) null,\n `VendorLayout` varchar(255) null,\n `CategoriesLayout` varchar(255) null,\n `SmartCategoriesLayout` varchar(255) null,\n `TagsLayout` varchar(255) null,\n `VendorsLayout` varchar(255) null,\n `StoreFields` mediumtext null,\n `CategoryFields` mediumtext null,\n `SmartCategoryFields` mediumtext null,\n `TagFields` mediumtext null,\n `VendorFields` mediumtext null,\n `CategoriesPath` varchar(255) null,\n `TagsPath` varchar(255) null,\n `VendorsPath` varchar(255) null,\n `ProductsPath` varchar(255) null,\n `SettingsData` mediumtext null,\n `SettingsTemplate` mediumtext null,\n `StoreLayouts` mediumtext null,\n `CategoryLayouts` mediumtext null,\n `SmartCategoryLayouts` mediumtext null,\n `TagLayouts` mediumtext null,\n `VendorLayouts` mediumtext null,\n `ProductLayout` varchar(255) null,\n `ProductPath` varchar(255) null,\n `ProductNumberFormat` varchar(50) null,\n `RecentlyViewedEnabled` tinyint(1) not null,\n `RecentlyViewedStorage` int not null,\n `RecentlyViewedExpires` int null,\n `RecentlyViewedListCapacity` int not null,\n `Alias` varchar(100) null,\n `DefaultCorsPolicy` mediumtext null,\n primary key (`StoreId`)\n);\ncreate index `Stores_SiteId_idx` on `Stores` (`SiteId`);\n\ncreate table `TableRecordPartTemplates` (\n `TemplateId` char(36) not null,\n `Name` varchar(100) not null,\n `Description` varchar(1000) null,\n `Content` mediumtext null,\n `Layouts` mediumtext null,\n `SiteId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Alias` varchar(100) null,\n `CustomDefaultLayout` varchar(100) null,\n primary key (`TemplateId`)\n);\ncreate index `TableRecordPartTemplates_SiteId_idx` on `TableRecordPartTemplates` (`SiteId`);\n\ncreate table `TableRecords` (\n `RecordId` char(36) not null,\n `Title` varchar(100) not null,\n `Slug` varchar(100) not null,\n `TableId` char(36) not null,\n `Content` mediumtext null,\n `Published` tinyint(1) not null,\n `DatePublished` datetime(3) null,\n `UtcDatePublished` datetime(3) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `SiteId` char(36) not null,\n primary key (`RecordId`)\n);\ncreate index `TableRecords_SiteId_idx` on `TableRecords` (`SiteId`);\n\ncreate table `TableTemplates` (\n `TemplateId` char(36) not null,\n `Name` varchar(100) not null,\n `Description` varchar(1000) null,\n `Content` mediumtext null,\n `Layouts` mediumtext null,\n `SiteId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Alias` varchar(100) null,\n `CustomDefaultLayout` varchar(100) null,\n primary key (`TemplateId`)\n);\ncreate index `TableTemplates_SiteId_idx` on `TableTemplates` (`SiteId`);\n\ncreate table `Tables` (\n `TableId` char(36) not null,\n `Title` varchar(100) not null,\n `Slug` varchar(100) not null,\n `SiteId` char(36) not null,\n `TemplateId` char(36) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n primary key (`TableId`)\n);\ncreate index `Tables_SiteId_idx` on `Tables` (`SiteId`);\n\ncreate table `Themes` (\n `ThemeId` char(36) not null,\n `Name` varchar(100) not null,\n `ViewEngineId` int not null,\n `SiteId` char(36) not null,\n `ImageSizes` mediumtext null,\n `SettingsData` mediumtext null,\n `SettingsMarkup` mediumtext null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `ParentThemeId` char(36) null,\n primary key (`ThemeId`)\n);\ncreate index `Themes_SiteId_idx` on `Themes` (`SiteId`);\n\ncreate table `UploadCacheItems` (\n `ItemId` char(36) not null,\n `SiteId` char(36) not null,\n `Filename` varchar(100) not null,\n `StorageClient` varchar(255) not null,\n `StorageFilename` varchar(255) not null,\n `MediaType` varchar(50) not null,\n `FileSize` bigint not null,\n `UtcDateCreated` datetime(3) not null,\n primary key (`ItemId`)\n);\ncreate index `UploadCacheItems_SiteId_idx` on `UploadCacheItems` (`SiteId`);\n\ncreate table `Urls` (\n `UrlId` char(36) not null,\n `SiteId` char(36) not null,\n `OriginalUrl` varchar(1024) not null,\n `ShortUrl` varchar(1024) not null,\n primary key (`UrlId`)\n);\ncreate index `Urls_SiteId_idx` on `Urls` (`SiteId`);\n\ncreate table `Votes` (\n `VoteId` char(36) not null,\n `PostId` char(36) not null,\n `Rating` decimal(18,2) not null,\n `Timestamp` datetime(3) not null,\n `UtcTimestamp` datetime(3) not null,\n `IpAddress` varchar(20) null,\n `UserAgent` varchar(256) null,\n `SiteId` char(36) not null,\n primary key (`VoteId`)\n);\ncreate index `Votes_SiteId_idx` on `Votes` (`SiteId`);\n\ncreate table `Watermark` (\n `IdWatermark` char(36) not null,\n `Name` varchar(100) not null,\n `HorizontalAlign` varchar(20) null,\n `VerticalAlign` varchar(20) null,\n `Opacity` int null,\n `Padding` int null,\n `IdGallery` char(36) not null,\n `SiteId` char(36) not null,\n primary key (`IdWatermark`)\n);\ncreate index `Watermark_SiteId_idx` on `Watermark` (`SiteId`);\n\ncreate table `Watermark_ImageWatermark` (\n `IdWatermark` char(36) not null,\n `FilePath` varchar(256) not null,\n `Width` int null,\n `Height` int null,\n `SiteId` char(36) not null,\n primary key (`IdWatermark`)\n);\ncreate index `Watermark_ImageWatermark_SiteId_idx` on `Watermark_ImageWatermark` (`SiteId`);\n\ncreate table `Watermark_TextWatermark` (\n `IdWatermark` char(36) not null,\n `Text` varchar(256) not null,\n `FontColor` varchar(20) null,\n `FontSize` int null,\n `FontStyle` varchar(20) null,\n `FontFamily` varchar(50) null,\n `SiteId` char(36) not null,\n primary key (`IdWatermark`)\n);\ncreate index `Watermark_TextWatermark_SiteId_idx` on `Watermark_TextWatermark` (`SiteId`);\n\ncreate table `WidgetProperties` (\n `PropertyId` char(36) not null,\n `WidgetId` char(36) not null,\n `PropertyKey` varchar(100) not null,\n `PropertyValue` mediumtext null,\n `SiteId` char(36) not null,\n primary key (`PropertyId`)\n);\ncreate index `WidgetProperties_SiteId_idx` on `WidgetProperties` (`SiteId`);\n\ncreate table `Widgets` (\n `WidgetId` char(36) not null,\n `SiteId` char(36) not null,\n `Title` varchar(100) not null,\n `Handle` varchar(100) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `Discriminator` varchar(128) null,\n primary key (`WidgetId`)\n);\ncreate index `Widgets_SiteId_idx` on `Widgets` (`SiteId`);\n\ncreate table `_Modules` (\n `ModuleId` char(36) not null,\n `OwnerName` varchar(50) not null,\n `OwnerId` char(36) not null,\n `Seq` int not null,\n `VisibleInList` tinyint(1) not null,\n `VisibleInDetails` tinyint(1) not null,\n `VisibleInFeed` tinyint(1) not null,\n `CssClasses` varchar(255) null,\n `HtmlAttrubutes` mediumtext null,\n `Published` tinyint(1) not null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `CreatedById` char(36) not null,\n `UpdatedById` char(36) null,\n `Discriminator` varchar(128) null,\n `SiteId` char(36) not null,\n primary key (`ModuleId`)\n);\ncreate index `_Modules_SiteId_idx` on `_Modules` (`SiteId`);\n\ncreate table `_Templates` (\n `TemplateId` char(36) not null,\n `Name` varchar(100) not null,\n `Content` mediumtext null,\n `Shared` tinyint(1) null,\n `SiteId` char(36) not null,\n `FormId` char(36) null,\n `DateCreated` datetime(3) not null,\n `UtcDateCreated` datetime(3) not null,\n `CreatedById` char(36) not null,\n `DateUpdated` datetime(3) null,\n `UtcDateUpdated` datetime(3) null,\n `UpdatedById` char(36) null,\n `Post_BlogId` char(36) null,\n `Module_BlogId` char(36) null,\n `Part_BlogId` char(36) null,\n `Part_SiteId` char(36) null,\n `Product_StoreId` char(36) null,\n `Part_StoreId` char(36) null,\n `Description` mediumtext null,\n `Modules` tinyint(1) null,\n `ListLayout` varchar(100) null,\n `DetailsLayout` varchar(100) null,\n `FeedLayout` varchar(100) null,\n `Discriminator` varchar(255) null,\n `Page_SiteId` char(36) null,\n `PagePart_SiteId` char(36) null,\n `Form_SiteId` char(36) null,\n `Layouts` mediumtext null,\n `PageModule_SiteId` char(36) null,\n `Alias` varchar(100) null,\n `CustomDefaultLayout` varchar(100) null,\n primary key (`TemplateId`)\n);\ncreate index `_Templates_SiteId_idx` on `_Templates` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `AdministratorAccounts` add constraint `FK_AdministratorAccounts_Accounts_Account_Id` foreign key (`Account_Id`) references `Accounts` (`AccountId`);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `AdministratorBlogs` add constraint `FK_AdministratorBlogs_Blogs_Blog_Id` foreign key (`Blog_Id`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `AdministratorSites` add constraint `FK_AdministratorSites_Sites_Site_Id` foreign key (`Site_Id`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `AdministratorStores` add constraint `FK_AdministratorStores_Stores_Store_Id` foreign key (`Store_Id`) references `Stores` (`StoreId`);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `BlackList` add constraint `FK_BlackList_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `BlogAuthors` add constraint `FK_BlogAuthors_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `BlogCategories` add constraint `FK_BlogCategories_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `BlogCategoryPosts` add constraint `FK_BlogCategoryPosts_BlogCategories_BlogCategory_Id` foreign key (`BlogCategory_Id`) references `BlogCategories` (`CategoryId`);\nalter table `BlogCategoryPosts` add constraint `FK_BlogCategoryPosts_Posts_Post_Id_2` foreign key (`Post_Id`) references `Posts` (`PostId`);\n\nalter table `BlogPostModuleTemplates` add constraint `FK_BlogPostModuleTemplates_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n\nalter table `BlogPostPartTemplates` add constraint `FK_BlogPostPartTemplates_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n\nalter table `BlogPostTemplates` add constraint `FK_BlogPostTemplates_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n\nalter table `BlogTagPosts` add constraint `FK_BlogTagPosts_BlogTags_BlogTag_Id` foreign key (`BlogTag_Id`) references `BlogTags` (`TagId`);\nalter table `BlogTagPosts` add constraint `FK_BlogTagPosts_Posts_Post_Id_2` foreign key (`Post_Id`) references `Posts` (`PostId`);\n\nalter table `BlogTags` add constraint `FK_BlogTags_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `CatalogCategories` add constraint `FK_CatalogCategories_Catalogs_CatalogId` foreign key (`CatalogId`) references `Catalogs` (`CatalogId`);\n\nalter table `CatalogProductModuleTemplates` add constraint `FK_CatalogProductModuleTemplates_Catalogs_CatalogId` foreign key (`CatalogId`) references `Catalogs` (`CatalogId`);\n\nalter table `CatalogProductPartTemplates` add constraint `FK_CatalogProductPartTemplates_Catalogs_CatalogId` foreign key (`CatalogId`) references `Catalogs` (`CatalogId`);\n\nalter table `CatalogProductTemplates` add constraint `FK_CatalogProductTemplates_Catalogs_CatalogId` foreign key (`CatalogId`) references `Catalogs` (`CatalogId`);\n\nalter table `CatalogProducts` add constraint `FK_CatalogProducts_CatalogProductTemplates_TemplateId` foreign key (`TemplateId`) references `CatalogProductTemplates` (`TemplateId`);\nalter table `CatalogProducts` add constraint `FK_CatalogProducts_Catalogs_CatalogId_2` foreign key (`CatalogId`) references `Catalogs` (`CatalogId`);\n-- soft fk: [object Object].ProductId -> Products.ProductId (control-plane link, not enforced in a site database)\n\nalter table `CatalogProductsCategories` add constraint `FK_CatalogProductsCategories_CatalogCategories_CategoryId` foreign key (`CategoryId`) references `CatalogCategories` (`CategoryId`);\nalter table `CatalogProductsCategories` add constraint `FK_CatalogProductsCategories_CatalogProducts_ProductId_2` foreign key (`ProductId`) references `CatalogProducts` (`ProductId`);\n\nalter table `CatalogProductsTags` add constraint `FK_CatalogProductsTags_CatalogProducts_ProductId` foreign key (`ProductId`) references `CatalogProducts` (`ProductId`);\nalter table `CatalogProductsTags` add constraint `FK_CatalogProductsTags_CatalogTags_TagId_2` foreign key (`TagId`) references `CatalogTags` (`TagId`);\n\nalter table `CatalogTags` add constraint `FK_CatalogTags_Catalogs_CatalogId` foreign key (`CatalogId`) references `Catalogs` (`CatalogId`);\n\nalter table `ContentPageItems` add constraint `FK_ContentPageItems_Posts_PostId` foreign key (`PostId`) references `Posts` (`PostId`);\nalter table `ContentPageItems` add constraint `FK_ContentPageItems_Products_ProductId_2` foreign key (`ProductId`) references `Products` (`ProductId`);\nalter table `ContentPageItems` add constraint `FK_ContentPageItems_ContentPageParts_PageId_3` foreign key (`PageId`) references `ContentPageParts` (`PageId`);\n\nalter table `ContentPageParts` add constraint `FK_ContentPageParts_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\nalter table `ContentPageParts` add constraint `FK_ContentPageParts_ContentPageParts_ParentPageId_2` foreign key (`ParentPageId`) references `ContentPageParts` (`PageId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table `CustomCategories` add constraint `FK_CustomCategories_CustomCategoryTypes_TypeId` foreign key (`TypeId`) references `CustomCategoryTypes` (`TypeId`);\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `CustomCategoryContentPages` add constraint `FK_CustomCategoryContentPages_ContentPageParts_Page_Id` foreign key (`Page_Id`) references `ContentPageParts` (`PageId`);\nalter table `CustomCategoryContentPages` add constraint `FK_CustomCategoryContentPages_CustomCategories_CustomCa_1awem78` foreign key (`CustomCategory_Id`) references `CustomCategories` (`CategoryId`);\n\nalter table `CustomCategoryPages` add constraint `FK_CustomCategoryPages_CustomCategories_CustomCategory_Id` foreign key (`CustomCategory_Id`) references `CustomCategories` (`CategoryId`);\nalter table `CustomCategoryPages` add constraint `FK_CustomCategoryPages_Pages_Page_Id_2` foreign key (`Page_Id`) references `Pages` (`PageId`);\n\nalter table `CustomCategoryPosts` add constraint `FK_CustomCategoryPosts_CustomCategories_CustomCategory_Id` foreign key (`CustomCategory_Id`) references `CustomCategories` (`CategoryId`);\nalter table `CustomCategoryPosts` add constraint `FK_CustomCategoryPosts_Posts_Post_Id_2` foreign key (`Post_Id`) references `Posts` (`PostId`);\n\nalter table `CustomCategoryProducts` add constraint `FK_CustomCategoryProducts_CustomCategories_CustomCategory_Id` foreign key (`CustomCategory_Id`) references `CustomCategories` (`CategoryId`);\nalter table `CustomCategoryProducts` add constraint `FK_CustomCategoryProducts_Products_Product_Id_2` foreign key (`Product_Id`) references `Products` (`ProductId`);\n\nalter table `CustomCategoryProjects` add constraint `FK_CustomCategoryProjects_CustomCategories_CustomCategory_Id` foreign key (`CustomCategory_Id`) references `CustomCategories` (`CategoryId`);\n\nalter table `CustomCategoryTypes` add constraint `FK_CustomCategoryTypes_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\nalter table `CustomCategoryTypes` add constraint `FK_CustomCategoryTypes_Sites_SiteId_2` foreign key (`SiteId`) references `Sites` (`SiteId`);\nalter table `CustomCategoryTypes` add constraint `FK_CustomCategoryTypes_Stores_StoreId_3` foreign key (`StoreId`) references `Stores` (`StoreId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Domains` add constraint `FK_Domains_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\nalter table `Domains` add constraint `FK_Domains_Themes_ThemeId_2` foreign key (`ThemeId`) references `Themes` (`ThemeId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `EmailTemplates` add constraint `FK_EmailTemplates_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\nalter table `EmailTemplates` add constraint `FK_EmailTemplates_Blogs_BlogId_2` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `FeedPageParams` add constraint `FK_FeedPageParams_FeedPages_PageId` foreign key (`PageId`) references `FeedPages` (`PageId`);\n\nalter table `FeedPages` add constraint `FK_FeedPages_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\nalter table `FeedPages` add constraint `FK_FeedPages_Feeds_FeedId_2` foreign key (`FeedId`) references `Feeds` (`FeedId`);\nalter table `FeedPages` add constraint `FK_FeedPages_FeedPages_ParentPageId_3` foreign key (`ParentPageId`) references `FeedPages` (`PageId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table `FeedParams` add constraint `FK_FeedParams_Feeds_FeedId` foreign key (`FeedId`) references `Feeds` (`FeedId`);\n\nalter table `Feeds` add constraint `FK_Feeds_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Files` add constraint `FK_Files_Folders_FolderId` foreign key (`FolderId`) references `Folders` (`FolderId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Folders` add constraint `FK_Folders_Themes_ImagesFolder_ThemeId` foreign key (`ImagesFolder_ThemeId`) references `Themes` (`ThemeId`);\nalter table `Folders` add constraint `FK_Folders_Themes_ScriptsFolder_ThemeId_2` foreign key (`ScriptsFolder_ThemeId`) references `Themes` (`ThemeId`);\nalter table `Folders` add constraint `FK_Folders_Themes_StylesheetsFolder_ThemeId_3` foreign key (`StylesheetsFolder_ThemeId`) references `Themes` (`ThemeId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `FormAdministrators` add constraint `FK_FormAdministrators_Forms_Form_Id` foreign key (`Form_Id`) references `Forms` (`FormId`);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `FormRecipients` add constraint `FK_FormRecipients_Forms_FormId` foreign key (`FormId`) references `Forms` (`FormId`);\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `FormSubmissionFields` add constraint `FK_FormSubmissionFields_FormSubmissions_SubmissionId` foreign key (`SubmissionId`) references `FormSubmissions` (`SubmissionId`);\n\nalter table `FormSubmissionFieldsOld` add constraint `FK_FormSubmissionFieldsOld_FormSubmissions_SubmissionId` foreign key (`SubmissionId`) references `FormSubmissions` (`SubmissionId`);\n\nalter table `FormSubmissions` add constraint `FK_FormSubmissions_Forms_FormId` foreign key (`FormId`) references `Forms` (`FormId`);\n\nalter table `FormTemplates` add constraint `FK_FormTemplates_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n\nalter table `Forms` add constraint `FK_Forms_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Gallery` add constraint `FK_Gallery_GalleryImagesTemplates_TemplateId` foreign key (`TemplateId`) references `GalleryImagesTemplates` (`TemplateId`);\n\nalter table `GalleryImage` add constraint `FK_GalleryImage_Gallery_IdGallery` foreign key (`IdGallery`) references `Gallery` (`IdGallery`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `GalleryImageFile` add constraint `FK_GalleryImageFile_GalleryImage_IdImage` foreign key (`IdImage`) references `GalleryImage` (`IdImage`);\n\nalter table `GalleryImageSize` add constraint `FK_GalleryImageSize_Gallery_IdGallery` foreign key (`IdGallery`) references `Gallery` (`IdGallery`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Layouts` add constraint `FK_Layouts_Themes_ThemeId` foreign key (`ThemeId`) references `Themes` (`ThemeId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `LinkGroups` add constraint `FK_LinkGroups_LinkTemplates_TemplateId` foreign key (`TemplateId`) references `LinkTemplates` (`TemplateId`);\nalter table `LinkGroups` add constraint `FK_LinkGroups_Sites_SiteId_2` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `LinkTemplates` add constraint `FK_LinkTemplates_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Links` add constraint `FK_Links_LinkGroups_GroupId` foreign key (`GroupId`) references `LinkGroups` (`GroupId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ModuleProperties` add constraint `FK_ModuleProperties__Modules_ModuleId` foreign key (`ModuleId`) references `_Modules` (`ModuleId`);\n\nalter table `Modules` add constraint `FK_Modules_Posts_PostId` foreign key (`PostId`) references `Posts` (`PostId`);\nalter table `Modules` add constraint `FK_Modules_Modules_ModuleId_2` foreign key (`ModuleId`) references `Modules` (`ModuleId`);\nalter table `Modules` add constraint `FK_Modules_Pages_PageId_3` foreign key (`PageId`) references `Pages` (`PageId`);\n-- soft fk: [object Object].TaskId -> NumberingTasks.TaskId (control-plane link, not enforced in a site database)\n\nalter table `PageModuleTemplates` add constraint `FK_PageModuleTemplates_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n\nalter table `PagePartTemplates` add constraint `FK_PagePartTemplates_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n\nalter table `PageTemplates` add constraint `FK_PageTemplates_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n\nalter table `Pages` add constraint `FK_Pages_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\nalter table `Pages` add constraint `FK_Pages_Forms_FormId_2` foreign key (`FormId`) references `Forms` (`FormId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `PostComments` add constraint `FK_PostComments_PostComments_ReplyOnCommentId` foreign key (`ReplyOnCommentId`) references `PostComments` (`CommentId`);\nalter table `PostComments` add constraint `FK_PostComments_Posts_PostId_2` foreign key (`PostId`) references `Posts` (`PostId`);\n\nalter table `PostModuleTemplates` add constraint `FK_PostModuleTemplates_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `PostTemplates` add constraint `FK_PostTemplates_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Posts` add constraint `FK_Posts_Blogs_BlogId` foreign key (`BlogId`) references `Blogs` (`BlogId`);\nalter table `Posts` add constraint `FK_Posts_BlogAuthors_AuthorId_2` foreign key (`AuthorId`) references `BlogAuthors` (`AuthorId`);\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductPartTemplates` add constraint `FK_ProductPartTemplates_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\n\nalter table `ProductProperties` add constraint `FK_ProductProperties_Products_ProductId` foreign key (`ProductId`) references `Products` (`ProductId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductPropertyValues` add constraint `FK_ProductPropertyValues_Products_ProductId` foreign key (`ProductId`) references `Products` (`ProductId`);\nalter table `ProductPropertyValues` add constraint `FK_ProductPropertyValues_ProductTypeProperties_PropertyId_2` foreign key (`PropertyId`) references `ProductTypeProperties` (`PropertyId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductReviewRatings` add constraint `FK_ProductReviewRatings_ProductReviews_ReviewId` foreign key (`ReviewId`) references `ProductReviews` (`ReviewId`);\nalter table `ProductReviewRatings` add constraint `FK_ProductReviewRatings_ProductTypeRatings_RatingId_2` foreign key (`RatingId`) references `ProductTypeRatings` (`RatingId`);\n\nalter table `ProductReviewVotes` add constraint `FK_ProductReviewVotes_ProductReviews_ReviewId` foreign key (`ReviewId`) references `ProductReviews` (`ReviewId`);\n-- soft fk: [object Object].VoteId -> Votes.VoteId (control-plane link, not enforced in a site database)\n\nalter table `ProductReviews` add constraint `FK_ProductReviews_Products_ProductId` foreign key (`ProductId`) references `Products` (`ProductId`);\n-- soft fk: [object Object].ReviewId -> Reviews.ReviewId (control-plane link, not enforced in a site database)\n\nalter table `ProductStoreCategories` add constraint `FK_ProductStoreCategories_StoreCategories_ProductCategory_Id` foreign key (`ProductCategory_Id`) references `StoreCategories` (`CategoryId`);\nalter table `ProductStoreCategories` add constraint `FK_ProductStoreCategories_Products_Product_Id_2` foreign key (`Product_Id`) references `Products` (`ProductId`);\n\nalter table `ProductStoreTags` add constraint `FK_ProductStoreTags_StoreTags_ProductTag_Id` foreign key (`ProductTag_Id`) references `StoreTags` (`TagId`);\nalter table `ProductStoreTags` add constraint `FK_ProductStoreTags_Products_Product_Id_2` foreign key (`Product_Id`) references `Products` (`ProductId`);\n\nalter table `ProductTypeProperties` add constraint `FK_ProductTypeProperties_ProductTypePropertyCategories_C_pu1idu` foreign key (`CategoryId`) references `ProductTypePropertyCategories` (`CategoryId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductTypePropertyCategories` add constraint `FK_ProductTypePropertyCategories_ProductTypes_ProductTypeId` foreign key (`ProductTypeId`) references `ProductTypes` (`TypeId`);\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductTypeRatings` add constraint `FK_ProductTypeRatings_ProductTypes_ProductTypeId` foreign key (`ProductTypeId`) references `ProductTypes` (`TypeId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductTypes` add constraint `FK_ProductTypes_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\nalter table `ProductTypes` add constraint `FK_ProductTypes_ProductVariantTemplates_VariantTemplateId_2` foreign key (`VariantTemplateId`) references `ProductVariantTemplates` (`TemplateId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductVariantTemplates` add constraint `FK_ProductVariantTemplates_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `ProductVariants` add constraint `FK_ProductVariants_Products_ProductId` foreign key (`ProductId`) references `Products` (`ProductId`);\nalter table `ProductVariants` add constraint `FK_ProductVariants_ProductVariantTemplates_TemplateId_2` foreign key (`TemplateId`) references `ProductVariantTemplates` (`TemplateId`);\n-- soft fk: [object Object].InventoryPolicyId -> InventoryPolicies.InventoryPolicyId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Products` add constraint `FK_Products_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\nalter table `Products` add constraint `FK_Products_StoreVendors_VendorId_2` foreign key (`VendorId`) references `StoreVendors` (`VendorId`);\nalter table `Products` add constraint `FK_Products_ProductTypes_TypeId_3` foreign key (`TypeId`) references `ProductTypes` (`TypeId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Redirections` add constraint `FK_Redirections_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\nalter table `Redirections` add constraint `FK_Redirections_Themes_ThemeId_2` foreign key (`ThemeId`) references `Themes` (`ThemeId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `RelatedPosts` add constraint `FK_RelatedPosts_Posts_PostId` foreign key (`PostId`) references `Posts` (`PostId`);\nalter table `RelatedPosts` add constraint `FK_RelatedPosts_Posts_RelatedPostId_2` foreign key (`RelatedPostId`) references `Posts` (`PostId`);\n\nalter table `ReviewItemTemplates` add constraint `FK_ReviewItemTemplates_ReviewTemplates_ReviewTemplateId` foreign key (`ReviewTemplateId`) references `ReviewTemplates` (`TemplateId`);\n\nalter table `ReviewRatingTemplates` add constraint `FK_ReviewRatingTemplates_ReviewTemplates_ReviewTemplateId` foreign key (`ReviewTemplateId`) references `ReviewTemplates` (`TemplateId`);\n\nalter table `ReviewRatings` add constraint `FK_ReviewRatings_ReviewRatingTemplates_RatingTemplateId` foreign key (`RatingTemplateId`) references `ReviewRatingTemplates` (`TemplateId`);\nalter table `ReviewRatings` add constraint `FK_ReviewRatings_Reviews_ReviewId_2` foreign key (`ReviewId`) references `Reviews` (`ReviewId`);\n\nalter table `ReviewVotes` add constraint `FK_ReviewVotes_Reviews_ReviewId` foreign key (`ReviewId`) references `Reviews` (`ReviewId`);\nalter table `ReviewVotes` add constraint `FK_ReviewVotes_Votes_VoteId_2` foreign key (`VoteId`) references `Votes` (`VoteId`);\n\nalter table `Reviews` add constraint `FK_Reviews_ReviewTemplates_TemplateId` foreign key (`TemplateId`) references `ReviewTemplates` (`TemplateId`);\n\nalter table `SiteSettings` add constraint `FK_SiteSettings_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Sites` add constraint `FK_Sites_Accounts_AccountId` foreign key (`AccountId`) references `Accounts` (`AccountId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `StaticPages` add constraint `FK_StaticPages_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table `StoreAdministrators` add constraint `FK_StoreAdministrators_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `StoreCategories` add constraint `FK_StoreCategories_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `StorePartTemplates` add constraint `FK_StorePartTemplates_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\n\nalter table `StoreTags` add constraint `FK_StoreTags_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `StoreVendors` add constraint `FK_StoreVendors_Stores_StoreId` foreign key (`StoreId`) references `Stores` (`StoreId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Stores` add constraint `FK_Stores_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `TableRecordPartTemplates` add constraint `FK_TableRecordPartTemplates_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `TableRecords` add constraint `FK_TableRecords_Tables_TableId` foreign key (`TableId`) references `Tables` (`TableId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `TableTemplates` add constraint `FK_TableTemplates_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Tables` add constraint `FK_Tables_TableTemplates_TemplateId` foreign key (`TemplateId`) references `TableTemplates` (`TemplateId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Themes` add constraint `FK_Themes_Themes_ParentThemeId` foreign key (`ParentThemeId`) references `Themes` (`ThemeId`);\nalter table `Themes` add constraint `FK_Themes_Sites_SiteId_2` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `Urls` add constraint `FK_Urls_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n\nalter table `Votes` add constraint `FK_Votes_Posts_PostId` foreign key (`PostId`) references `Posts` (`PostId`);\n\nalter table `Watermark` add constraint `FK_Watermark_Gallery_IdGallery` foreign key (`IdGallery`) references `Gallery` (`IdGallery`);\n\nalter table `Watermark_ImageWatermark` add constraint `FK_Watermark_ImageWatermark_Watermark_IdWatermark` foreign key (`IdWatermark`) references `Watermark` (`IdWatermark`);\n\nalter table `Watermark_TextWatermark` add constraint `FK_Watermark_TextWatermark_Watermark_IdWatermark` foreign key (`IdWatermark`) references `Watermark` (`IdWatermark`);\n\nalter table `WidgetProperties` add constraint `FK_WidgetProperties_Widgets_WidgetId` foreign key (`WidgetId`) references `Widgets` (`WidgetId`);\n\nalter table `Widgets` add constraint `FK_Widgets_Sites_SiteId` foreign key (`SiteId`) references `Sites` (`SiteId`);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table `_Templates` add constraint `FK__Templates_Blogs_Post_BlogId` foreign key (`Post_BlogId`) references `Blogs` (`BlogId`);\nalter table `_Templates` add constraint `FK__Templates_Blogs_Module_BlogId_2` foreign key (`Module_BlogId`) references `Blogs` (`BlogId`);\nalter table `_Templates` add constraint `FK__Templates_Blogs_Part_BlogId_3` foreign key (`Part_BlogId`) references `Blogs` (`BlogId`);\n-- soft fk: [object Object].FormId -> Forms.FormId (control-plane link, not enforced in a site database)\n";
9
+ export const sqlite = "-- GENERATED from the canonical schema — do not edit; run schema/generate.mjs\n-- dialect: sqlite · canon version: 1 · tables: 120\n-- SQLite carries foreign keys inline; run the script with foreign_keys=off,\n-- then enable the pragma once every table exists.\n\ncreate table \"Accounts\" (\n \"AccountId\" text not null,\n \"Title\" text not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"AccountId\")\n);\n\ncreate table \"AdministratorAccounts\" (\n \"Administrator_Id\" text not null,\n \"Account_Id\" text not null references \"Accounts\" (\"AccountId\"),\n primary key (\"Administrator_Id\", \"Account_Id\")\n);\n\ncreate table \"AdministratorBlogs\" (\n \"Administrator_Id\" text not null,\n \"Blog_Id\" text not null references \"Blogs\" (\"BlogId\"),\n \"SiteId\" text not null,\n primary key (\"Administrator_Id\", \"Blog_Id\")\n);\ncreate index \"AdministratorBlogs_SiteId_idx\" on \"AdministratorBlogs\" (\"SiteId\");\n\ncreate table \"AdministratorSites\" (\n \"Administrator_Id\" text not null,\n \"Site_Id\" text not null references \"Sites\" (\"SiteId\"),\n primary key (\"Administrator_Id\", \"Site_Id\")\n);\n\ncreate table \"AdministratorStores\" (\n \"Administrator_Id\" text not null,\n \"Store_Id\" text not null references \"Stores\" (\"StoreId\"),\n primary key (\"Administrator_Id\", \"Store_Id\")\n);\n\ncreate table \"Administrators\" (\n \"AdministratorId\" text not null,\n \"Username\" text null,\n \"FirstName\" text null,\n \"LastName\" text null,\n \"Email\" text null,\n \"PasswordHash\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"AdministratorId\")\n);\n\ncreate table \"ApiKeys\" (\n \"ApiKeyId\" text not null,\n \"AdministratorId\" text not null,\n \"Name\" text not null,\n \"KeyPrefix\" text not null,\n \"KeyHash\" text not null,\n \"Scope\" text null,\n \"ExpiresAt\" text null,\n \"RevokedAt\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n primary key (\"ApiKeyId\")\n);\n\ncreate table \"BlackList\" (\n \"Id\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"IpAddress\" text not null,\n \"Reason\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"Id\")\n);\ncreate index \"BlackList_SiteId_idx\" on \"BlackList\" (\"SiteId\");\n\ncreate table \"BlogAuthors\" (\n \"AuthorId\" text not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"AdministratorId\" text not null,\n \"Content\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"AuthorId\")\n);\ncreate index \"BlogAuthors_SiteId_idx\" on \"BlogAuthors\" (\"SiteId\");\n\ncreate table \"BlogCategories\" (\n \"CategoryId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"Title\" text not null,\n \"Description\" text null,\n \"Alias\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"Published\" integer null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Content\" text null,\n \"SiteId\" text not null,\n primary key (\"CategoryId\")\n);\ncreate index \"BlogCategories_SiteId_idx\" on \"BlogCategories\" (\"SiteId\");\n\ncreate table \"BlogCategoryPosts\" (\n \"BlogCategory_Id\" text not null references \"BlogCategories\" (\"CategoryId\"),\n \"Post_Id\" text not null references \"Posts\" (\"PostId\"),\n \"SiteId\" text not null,\n primary key (\"BlogCategory_Id\", \"Post_Id\")\n);\ncreate index \"BlogCategoryPosts_SiteId_idx\" on \"BlogCategoryPosts\" (\"SiteId\");\n\ncreate table \"BlogPostModuleTemplates\" (\n \"TemplateId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"BlogPostModuleTemplates_SiteId_idx\" on \"BlogPostModuleTemplates\" (\"SiteId\");\n\ncreate table \"BlogPostPartTemplates\" (\n \"TemplateId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"BlogPostPartTemplates_SiteId_idx\" on \"BlogPostPartTemplates\" (\"SiteId\");\n\ncreate table \"BlogPostTemplates\" (\n \"TemplateId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"BlogPostTemplates_SiteId_idx\" on \"BlogPostTemplates\" (\"SiteId\");\n\ncreate table \"BlogTagPosts\" (\n \"BlogTag_Id\" text not null references \"BlogTags\" (\"TagId\"),\n \"Post_Id\" text not null references \"Posts\" (\"PostId\"),\n \"SiteId\" text not null,\n primary key (\"BlogTag_Id\", \"Post_Id\")\n);\ncreate index \"BlogTagPosts_SiteId_idx\" on \"BlogTagPosts\" (\"SiteId\");\n\ncreate table \"BlogTags\" (\n \"TagId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"Title\" text not null,\n \"Description\" text null,\n \"Alias\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"Published\" integer null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Content\" text null,\n \"SiteId\" text not null,\n primary key (\"TagId\")\n);\ncreate index \"BlogTags_SiteId_idx\" on \"BlogTags\" (\"SiteId\");\n\ncreate table \"Blogs\" (\n \"BlogId\" text not null,\n \"SiteId\" text not null,\n \"Title\" text not null,\n \"Alias\" text not null,\n \"Content\" text null,\n \"Subtitle\" text null,\n \"About\" text null,\n \"AboutType\" integer null,\n \"TemplateSuffix\" text null,\n \"PostContent\" text null,\n \"ImageModuleContent\" text null,\n \"GalleryModuleContent\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"MaxReplyCommentsLevels\" integer not null,\n \"AllowedCommentTags\" text null,\n \"YearFormat\" text null,\n \"MonthFormat\" text null,\n \"DayFormat\" text null,\n \"PostNumberFormat\" text null,\n \"FeedPath\" text null,\n \"CategoriesPath\" text null,\n \"TagsPath\" text null,\n \"ArchivesPath\" text null,\n \"PostPath\" text null,\n \"AuthorsPath\" text null,\n \"BlogLayout\" text null,\n \"ArchiveLayout\" text null,\n \"AuthorLayout\" text null,\n \"CategoryLayout\" text null,\n \"TagLayout\" text null,\n \"ArchivesLayout\" text null,\n \"AuthorsLayout\" text null,\n \"CategoriesLayout\" text null,\n \"TagsLayout\" text null,\n \"BlogFields\" text null,\n \"CategoryFields\" text null,\n \"TagFields\" text null,\n \"AuthorFields\" text null,\n \"FeedFormat\" text not null,\n \"FeedLayout\" text null,\n \"LastDateUpdated\" text not null,\n \"UtcLastDateUpdated\" text not null,\n \"BlogLayouts\" text null,\n \"CategoryLayouts\" text null,\n \"TagLayouts\" text null,\n \"AuthorLayouts\" text null,\n \"PostLayout\" text null,\n \"CommentsAllowed\" integer not null,\n \"YearFields\" text null,\n \"YearLayouts\" text null,\n \"MonthFields\" text null,\n \"MonthLayouts\" text null,\n \"DayFields\" text null,\n \"DayLayouts\" text null,\n \"CommentsCaptchaEnabled\" integer not null,\n \"RecentlyViewedEnabled\" integer not null,\n \"RecentlyViewedStorage\" integer not null,\n \"RecentlyViewedExpires\" integer null,\n \"RecentlyViewedListCapacity\" integer not null,\n \"Path\" text null,\n \"MonthLayout\" text null,\n \"DayLayout\" text null,\n \"DefaultCorsPolicy\" text null,\n primary key (\"BlogId\")\n);\ncreate index \"Blogs_SiteId_idx\" on \"Blogs\" (\"SiteId\");\n\ncreate table \"CatalogCategories\" (\n \"CategoryId\" text not null,\n \"CatalogId\" text not null references \"Catalogs\" (\"CatalogId\"),\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Content\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"CategoryId\")\n);\ncreate index \"CatalogCategories_SiteId_idx\" on \"CatalogCategories\" (\"SiteId\");\n\ncreate table \"CatalogProductModuleTemplates\" (\n \"TemplateId\" text not null,\n \"CatalogId\" text not null references \"Catalogs\" (\"CatalogId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"CatalogProductModuleTemplates_SiteId_idx\" on \"CatalogProductModuleTemplates\" (\"SiteId\");\n\ncreate table \"CatalogProductPartTemplates\" (\n \"TemplateId\" text not null,\n \"CatalogId\" text not null references \"Catalogs\" (\"CatalogId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"CatalogProductPartTemplates_SiteId_idx\" on \"CatalogProductPartTemplates\" (\"SiteId\");\n\ncreate table \"CatalogProductTemplates\" (\n \"TemplateId\" text not null,\n \"CatalogId\" text not null references \"Catalogs\" (\"CatalogId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"CatalogProductTemplates_SiteId_idx\" on \"CatalogProductTemplates\" (\"SiteId\");\n\ncreate table \"CatalogProducts\" (\n \"ProductId\" text not null,\n \"CatalogId\" text not null references \"Catalogs\" (\"CatalogId\"),\n \"TemplateId\" text not null references \"CatalogProductTemplates\" (\"TemplateId\"),\n \"Number\" integer not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Content\" text null,\n \"Published\" integer not null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"ProductId\")\n);\ncreate index \"CatalogProducts_SiteId_idx\" on \"CatalogProducts\" (\"SiteId\");\n\ncreate table \"CatalogProductsCategories\" (\n \"ProductId\" text not null references \"CatalogProducts\" (\"ProductId\"),\n \"CategoryId\" text not null references \"CatalogCategories\" (\"CategoryId\"),\n \"SiteId\" text not null,\n primary key (\"ProductId\", \"CategoryId\")\n);\ncreate index \"CatalogProductsCategories_SiteId_idx\" on \"CatalogProductsCategories\" (\"SiteId\");\n\ncreate table \"CatalogProductsTags\" (\n \"ProductId\" text not null references \"CatalogProducts\" (\"ProductId\"),\n \"TagId\" text not null references \"CatalogTags\" (\"TagId\"),\n \"SiteId\" text not null,\n primary key (\"ProductId\", \"TagId\")\n);\ncreate index \"CatalogProductsTags_SiteId_idx\" on \"CatalogProductsTags\" (\"SiteId\");\n\ncreate table \"CatalogTags\" (\n \"TagId\" text not null,\n \"CatalogId\" text not null references \"Catalogs\" (\"CatalogId\"),\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Content\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TagId\")\n);\ncreate index \"CatalogTags_SiteId_idx\" on \"CatalogTags\" (\"SiteId\");\n\ncreate table \"Catalogs\" (\n \"CatalogId\" text not null,\n \"SiteId\" text not null,\n \"Title\" text not null,\n \"Path\" text not null,\n \"Alias\" text not null,\n \"Content\" text null,\n \"CatalogLayout\" text null,\n \"CatalogLayouts\" text null,\n \"CatalogFields\" text null,\n \"CategoriesLayout\" text null,\n \"CategoryLayout\" text null,\n \"CategoryLayouts\" text null,\n \"CategoryFields\" text null,\n \"CategoriesPath\" text null,\n \"TagsLayout\" text null,\n \"TagLayout\" text null,\n \"TagLayouts\" text null,\n \"TagFields\" text null,\n \"TagsPath\" text null,\n \"ProductLayout\" text null,\n \"ProductPath\" text null,\n \"ProductsPath\" text null,\n \"ProductNumberFormat\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"RecentlyViewedEnabled\" integer not null,\n \"RecentlyViewedStorage\" integer not null,\n \"RecentlyViewedExpires\" integer null,\n \"RecentlyViewedListCapacity\" integer not null,\n \"DefaultCorsPolicy\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"CatalogId\")\n);\ncreate index \"Catalogs_SiteId_idx\" on \"Catalogs\" (\"SiteId\");\n\ncreate table \"ContentPageItems\" (\n \"ItemId\" text not null,\n \"PageId\" text null references \"ContentPageParts\" (\"PageId\"),\n \"PostId\" text null references \"Posts\" (\"PostId\"),\n \"ProductId\" text null references \"Products\" (\"ProductId\"),\n \"ProjectId\" text null,\n \"ContentId\" text not null,\n \"Content\" text null,\n \"Discriminator\" text null,\n \"SiteId\" text not null,\n primary key (\"ItemId\")\n);\ncreate index \"ContentPageItems_SiteId_idx\" on \"ContentPageItems\" (\"SiteId\");\n\ncreate table \"ContentPageParts\" (\n \"PageId\" text not null,\n \"Alias\" text not null,\n \"Title\" text not null,\n \"ParentPageId\" text null references \"ContentPageParts\" (\"PageId\"),\n \"Index\" integer null,\n \"PartId\" text null,\n \"TemplateName\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"MetaKeywords\" text null,\n \"MetaDescription\" text null,\n \"IncludeInSitemap\" integer null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"DateCreated\" text null,\n \"UtcDateCreated\" text null,\n \"CreatedById\" text null,\n \"Discriminator\" text not null,\n primary key (\"PageId\")\n);\ncreate index \"ContentPageParts_SiteId_idx\" on \"ContentPageParts\" (\"SiteId\");\n\ncreate table \"CustomCategories\" (\n \"CategoryId\" text not null,\n \"TypeId\" text not null references \"CustomCategoryTypes\" (\"TypeId\"),\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Description\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"Content\" text null,\n \"SiteId\" text not null,\n primary key (\"CategoryId\")\n);\ncreate index \"CustomCategories_SiteId_idx\" on \"CustomCategories\" (\"SiteId\");\n\ncreate table \"CustomCategoryContentPages\" (\n \"CustomCategory_Id\" text not null references \"CustomCategories\" (\"CategoryId\"),\n \"Page_Id\" text not null references \"ContentPageParts\" (\"PageId\"),\n \"SiteId\" text not null,\n primary key (\"CustomCategory_Id\", \"Page_Id\")\n);\ncreate index \"CustomCategoryContentPages_SiteId_idx\" on \"CustomCategoryContentPages\" (\"SiteId\");\n\ncreate table \"CustomCategoryPages\" (\n \"CustomCategory_Id\" text not null references \"CustomCategories\" (\"CategoryId\"),\n \"Page_Id\" text not null references \"Pages\" (\"PageId\"),\n \"SiteId\" text not null,\n primary key (\"CustomCategory_Id\", \"Page_Id\")\n);\ncreate index \"CustomCategoryPages_SiteId_idx\" on \"CustomCategoryPages\" (\"SiteId\");\n\ncreate table \"CustomCategoryPosts\" (\n \"CustomCategory_Id\" text not null references \"CustomCategories\" (\"CategoryId\"),\n \"Post_Id\" text not null references \"Posts\" (\"PostId\"),\n \"SiteId\" text not null,\n primary key (\"CustomCategory_Id\", \"Post_Id\")\n);\ncreate index \"CustomCategoryPosts_SiteId_idx\" on \"CustomCategoryPosts\" (\"SiteId\");\n\ncreate table \"CustomCategoryProducts\" (\n \"CustomCategory_Id\" text not null references \"CustomCategories\" (\"CategoryId\"),\n \"Product_Id\" text not null references \"Products\" (\"ProductId\"),\n \"SiteId\" text not null,\n primary key (\"CustomCategory_Id\", \"Product_Id\")\n);\ncreate index \"CustomCategoryProducts_SiteId_idx\" on \"CustomCategoryProducts\" (\"SiteId\");\n\ncreate table \"CustomCategoryProjects\" (\n \"CustomCategory_Id\" text not null references \"CustomCategories\" (\"CategoryId\"),\n \"Project_Id\" text not null,\n \"SiteId\" text not null,\n primary key (\"CustomCategory_Id\", \"Project_Id\")\n);\ncreate index \"CustomCategoryProjects_SiteId_idx\" on \"CustomCategoryProjects\" (\"SiteId\");\n\ncreate table \"CustomCategoryTypes\" (\n \"TypeId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"BlogId\" text null references \"Blogs\" (\"BlogId\"),\n \"PortfolioId\" text null,\n \"StoreId\" text null references \"Stores\" (\"StoreId\"),\n \"Seq\" integer null,\n \"Path\" text null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Description\" text null,\n \"TemplateName\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"Discriminator\" text null,\n \"CategoryFields\" text null,\n \"Page_SiteId\" text null,\n \"CategoryLayouts\" text null,\n \"Alias\" text null,\n \"CategoryLayout\" text null,\n primary key (\"TypeId\")\n);\ncreate index \"CustomCategoryTypes_SiteId_idx\" on \"CustomCategoryTypes\" (\"SiteId\");\n\ncreate table \"Domains\" (\n \"DomainId\" text not null,\n \"Name\" text not null,\n \"PrefixAction\" integer not null,\n \"Public\" integer not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"ThemeId\" text null references \"Themes\" (\"ThemeId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SettingsData\" text null,\n \"RobotsTxt\" text null,\n primary key (\"DomainId\")\n);\ncreate index \"Domains_SiteId_idx\" on \"Domains\" (\"SiteId\");\n\ncreate table \"EmailTemplates\" (\n \"TemplateId\" text not null,\n \"Name\" text not null,\n \"LoweredName\" text not null,\n \"Description\" text null,\n \"From\" text null,\n \"To\" text null,\n \"Subject\" text null,\n \"HtmlEnabled\" integer not null,\n \"PlainText\" text null,\n \"Html\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Discriminator\" text null,\n \"BlogId\" text null references \"Blogs\" (\"BlogId\"),\n \"StoreId\" text null references \"Stores\" (\"StoreId\"),\n \"Cc\" text null,\n \"Bcc\" text null,\n \"FromDisplayName\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"EmailTemplates_SiteId_idx\" on \"EmailTemplates\" (\"SiteId\");\n\ncreate table \"FeedPageParams\" (\n \"ParamId\" text not null,\n \"Seq\" integer not null,\n \"Name\" text null,\n \"PageId\" text not null references \"FeedPages\" (\"PageId\"),\n \"SiteId\" text not null,\n primary key (\"ParamId\")\n);\ncreate index \"FeedPageParams_SiteId_idx\" on \"FeedPageParams\" (\"SiteId\");\n\ncreate table \"FeedPages\" (\n \"PageId\" text not null,\n \"Title\" text not null,\n \"Path\" text null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Slug\" text null,\n \"ParentPageId\" text null references \"FeedPages\" (\"PageId\"),\n \"FeedId\" text not null references \"Feeds\" (\"FeedId\"),\n \"TemplateName\" text null,\n \"PageContent\" text null,\n \"PageNumberParamName\" text null,\n \"PageSizeParamName\" text null,\n \"PageSize\" integer null,\n \"Level\" integer not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"Discriminator\" text null,\n \"Params\" text null,\n primary key (\"PageId\")\n);\ncreate index \"FeedPages_SiteId_idx\" on \"FeedPages\" (\"SiteId\");\n\ncreate table \"FeedParams\" (\n \"ParamId\" text not null,\n \"Key\" text not null,\n \"Value\" text null,\n \"FeedId\" text not null references \"Feeds\" (\"FeedId\"),\n \"Liquidizable\" integer not null,\n \"SiteId\" text not null,\n primary key (\"ParamId\")\n);\ncreate index \"FeedParams_SiteId_idx\" on \"FeedParams\" (\"SiteId\");\n\ncreate table \"Feeds\" (\n \"FeedId\" text not null,\n \"Title\" text not null,\n \"Alias\" text not null,\n \"LoweredAlias\" text not null,\n \"Content\" text null,\n \"FetchedAt\" text null,\n \"UtcFetchedAt\" text null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Discriminator\" text not null,\n \"FetchInterval\" integer null,\n primary key (\"FeedId\")\n);\ncreate index \"Feeds_SiteId_idx\" on \"Feeds\" (\"SiteId\");\n\ncreate table \"Files\" (\n \"FileId\" text not null,\n \"FolderId\" text not null references \"Folders\" (\"FolderId\"),\n \"Filename\" text not null,\n \"LoweredFilename\" text not null,\n \"ContentType\" text not null,\n \"Size\" integer not null,\n \"StorageClient\" text null,\n \"StorageFilename\" text not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"Discriminator\" text null,\n \"Hash\" text null,\n \"SiteId\" text not null,\n primary key (\"FileId\")\n);\ncreate index \"Files_SiteId_idx\" on \"Files\" (\"SiteId\");\n\ncreate table \"Folders\" (\n \"FolderId\" text not null,\n \"OwnerId\" text null,\n \"ImagesFolder_ThemeId\" text null references \"Themes\" (\"ThemeId\"),\n \"ScriptsFolder_ThemeId\" text null references \"Themes\" (\"ThemeId\"),\n \"StylesheetsFolder_ThemeId\" text null references \"Themes\" (\"ThemeId\"),\n \"Path\" text not null,\n \"LoweredPath\" text not null,\n \"ImageSettingsProviderType\" text null,\n \"ImageSettingsProviderParams\" text null,\n \"ImageSettings\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"Discriminator\" text null,\n \"ImagesFolder_Id\" text null,\n \"SiteId\" text not null,\n primary key (\"FolderId\")\n);\ncreate index \"Folders_SiteId_idx\" on \"Folders\" (\"SiteId\");\n\ncreate table \"FormAdministrators\" (\n \"Form_Id\" text not null references \"Forms\" (\"FormId\"),\n \"Administrator_Id\" text not null,\n \"SiteId\" text not null,\n primary key (\"Form_Id\", \"Administrator_Id\")\n);\ncreate index \"FormAdministrators_SiteId_idx\" on \"FormAdministrators\" (\"SiteId\");\n\ncreate table \"FormRecipients\" (\n \"RecipientId\" text not null,\n \"FormId\" text not null references \"Forms\" (\"FormId\"),\n \"AdministratorId\" text not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"RecipientId\")\n);\ncreate index \"FormRecipients_SiteId_idx\" on \"FormRecipients\" (\"SiteId\");\n\ncreate table \"FormSubmissionFields\" (\n \"FieldId\" text not null,\n \"SubmissionId\" text not null references \"FormSubmissions\" (\"SubmissionId\"),\n \"Seq\" integer not null,\n \"Title\" text null,\n \"Value\" text null,\n \"DataType\" integer not null,\n \"Name\" text null,\n \"SiteId\" text not null,\n primary key (\"FieldId\")\n);\ncreate index \"FormSubmissionFields_SiteId_idx\" on \"FormSubmissionFields\" (\"SiteId\");\n\ncreate table \"FormSubmissionFieldsOld\" (\n \"FieldId\" text not null,\n \"SubmissionId\" text not null references \"FormSubmissions\" (\"SubmissionId\"),\n \"Seq\" integer not null,\n \"Title\" text null,\n \"Value\" text null,\n \"DataType\" integer not null,\n \"Name\" text null,\n \"SiteId\" text not null,\n primary key (\"FieldId\")\n);\ncreate index \"FormSubmissionFieldsOld_SiteId_idx\" on \"FormSubmissionFieldsOld\" (\"SiteId\");\n\ncreate table \"FormSubmissions\" (\n \"SubmissionId\" text not null,\n \"FormId\" text not null references \"Forms\" (\"FormId\"),\n \"Date\" text not null,\n \"UtcDate\" text not null,\n \"Number\" integer not null,\n \"IpAddress\" text null,\n \"UserAgent\" text null,\n \"IsSpam\" integer not null,\n \"Content\" text null,\n \"SiteId\" text not null,\n primary key (\"SubmissionId\")\n);\ncreate index \"FormSubmissions_SiteId_idx\" on \"FormSubmissions\" (\"SiteId\");\n\ncreate table \"FormTemplates\" (\n \"TemplateId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"ConfirmationEmailTemplate\" text null,\n \"SubmissionEmailTemplate\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"FormTemplates_SiteId_idx\" on \"FormTemplates\" (\"SiteId\");\n\ncreate table \"Forms\" (\n \"FormId\" text not null,\n \"Name\" text null,\n \"Content\" text null,\n \"SubmissionAction\" integer not null,\n \"RedirectUrl\" text null,\n \"SuccessMessage\" text null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Path\" text null,\n \"TemplateId\" text null,\n primary key (\"FormId\")\n);\ncreate index \"Forms_SiteId_idx\" on \"Forms\" (\"SiteId\");\n\ncreate table \"Gallery\" (\n \"IdGallery\" text not null,\n \"OwnerName\" text null,\n \"IdOwner\" text null,\n \"Name\" text not null,\n \"Title\" text null,\n \"Description\" text null,\n \"OriginalFilenames\" integer not null,\n \"MaxUploadFileSize\" integer null,\n \"ThumbnailImageSize\" text not null,\n \"DefaultImageSize\" text not null,\n \"SeqFilenameFormat\" text null,\n \"TemplateId\" text null references \"GalleryImagesTemplates\" (\"TemplateId\"),\n \"SiteId\" text not null,\n primary key (\"IdGallery\")\n);\ncreate index \"Gallery_SiteId_idx\" on \"Gallery\" (\"SiteId\");\n\ncreate table \"GalleryImage\" (\n \"IdImage\" text not null,\n \"IdGallery\" text not null references \"Gallery\" (\"IdGallery\"),\n \"Seq\" integer not null,\n \"Title\" text null,\n \"Alt\" text null,\n \"Description\" text null,\n \"Visible\" integer not null,\n \"OriginalFilename\" text not null,\n \"Author\" text null,\n \"Copyright\" text null,\n \"StorageClient\" text not null,\n \"StorageFilename\" text not null,\n \"MimeType\" text not null,\n \"Width\" integer not null,\n \"Height\" integer not null,\n \"FileSize\" integer not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Content\" text null,\n \"Hash\" text null,\n \"SiteId\" text not null,\n primary key (\"IdImage\")\n);\ncreate index \"GalleryImage_SiteId_idx\" on \"GalleryImage\" (\"SiteId\");\n\ncreate table \"GalleryImageFile\" (\n \"IdImage\" text not null references \"GalleryImage\" (\"IdImage\"),\n \"SizeLabel\" text not null,\n \"StorageClient\" text not null,\n \"StorageFilename\" text not null,\n \"StaticLink\" text null,\n \"UseStaticLink\" integer not null,\n \"MimeType\" text not null,\n \"Width\" integer null,\n \"Height\" integer null,\n \"FileSize\" integer null,\n \"Original\" integer not null,\n \"SiteId\" text not null,\n primary key (\"IdImage\", \"SizeLabel\")\n);\ncreate index \"GalleryImageFile_SiteId_idx\" on \"GalleryImageFile\" (\"SiteId\");\n\ncreate table \"GalleryImageSize\" (\n \"IdSize\" text not null,\n \"IdGallery\" text not null references \"Gallery\" (\"IdGallery\"),\n \"Label\" text not null,\n \"MaxWidth\" integer not null,\n \"MaxHeight\" integer not null,\n \"Quality\" integer not null,\n \"SiteId\" text not null,\n primary key (\"IdSize\")\n);\ncreate index \"GalleryImageSize_SiteId_idx\" on \"GalleryImageSize\" (\"SiteId\");\n\ncreate table \"GalleryImageSizeWatermark\" (\n \"GalleryImageSize_IdSize\" text not null,\n \"Watermark_IdWatermark\" text not null,\n \"SiteId\" text not null,\n primary key (\"GalleryImageSize_IdSize\", \"Watermark_IdWatermark\")\n);\ncreate index \"GalleryImageSizeWatermark_SiteId_idx\" on \"GalleryImageSizeWatermark\" (\"SiteId\");\n\ncreate table \"GalleryImagesTemplates\" (\n \"TemplateId\" text not null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"OwnerTemplateId\" text not null,\n \"TemplateName\" text not null,\n \"FieldName\" text not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Alias\" text null,\n \"CustomDefaultLayout\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"GalleryImagesTemplates_SiteId_idx\" on \"GalleryImagesTemplates\" (\"SiteId\");\n\ncreate table \"InventoryPolicies\" (\n \"InventoryPolicyId\" integer not null,\n \"Name\" text not null,\n \"EnumLabel\" text null,\n primary key (\"InventoryPolicyId\")\n);\n\ncreate table \"Layouts\" (\n \"LayoutId\" text not null,\n \"ThemeId\" text not null references \"Themes\" (\"ThemeId\"),\n \"Name\" text null,\n \"LoweredName\" text null,\n \"Content\" text null,\n \"ViewEngineId\" integer not null,\n \"UtcDateCreated\" text not null,\n \"DateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"ContentType\" text null,\n \"Encoding\" text null,\n \"Hash\" text null,\n \"SiteId\" text not null,\n primary key (\"LayoutId\")\n);\ncreate index \"Layouts_SiteId_idx\" on \"Layouts\" (\"SiteId\");\n\ncreate table \"LinkGroups\" (\n \"GroupId\" text not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"TemplateId\" text not null references \"LinkTemplates\" (\"TemplateId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"GroupId\")\n);\ncreate index \"LinkGroups_SiteId_idx\" on \"LinkGroups\" (\"SiteId\");\n\ncreate table \"LinkTemplates\" (\n \"TemplateId\" text not null,\n \"Name\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Alias\" text null,\n \"CustomDefaultLayout\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"LinkTemplates_SiteId_idx\" on \"LinkTemplates\" (\"SiteId\");\n\ncreate table \"Links\" (\n \"LinkId\" text not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Url\" text not null,\n \"GroupId\" text not null references \"LinkGroups\" (\"GroupId\"),\n \"Content\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"LinkId\")\n);\ncreate index \"Links_SiteId_idx\" on \"Links\" (\"SiteId\");\n\ncreate table \"ModuleProperties\" (\n \"PropertyId\" text not null,\n \"ModuleId\" text not null references \"_Modules\" (\"ModuleId\"),\n \"PropertyKey\" text not null,\n \"PropertyValue\" text null,\n \"SiteId\" text not null,\n primary key (\"PropertyId\")\n);\ncreate index \"ModuleProperties_SiteId_idx\" on \"ModuleProperties\" (\"SiteId\");\n\ncreate table \"Modules\" (\n \"ModuleId\" text not null references \"Modules\" (\"ModuleId\"),\n \"TemplateId\" text null,\n \"PostId\" text null references \"Posts\" (\"PostId\"),\n \"Index\" integer not null,\n \"Content\" text null,\n \"VisibleInList\" integer not null,\n \"VisibleInDetails\" integer not null,\n \"VisibleInFeed\" integer not null,\n \"Discriminator\" text null,\n \"PageId\" text null references \"Pages\" (\"PageId\"),\n \"Page_TemplateId\" text null,\n \"SiteId\" text not null,\n primary key (\"ModuleId\")\n);\ncreate index \"Modules_SiteId_idx\" on \"Modules\" (\"SiteId\");\n\ncreate table \"NumberingCounters\" (\n \"CounterId\" text not null,\n \"TaskId\" text not null,\n \"OwnerId\" text not null,\n \"Date\" text not null,\n \"LastNumber\" integer not null,\n \"SiteId\" text not null,\n primary key (\"CounterId\")\n);\ncreate index \"NumberingCounters_SiteId_idx\" on \"NumberingCounters\" (\"SiteId\");\n\ncreate table \"NumberingTasks\" (\n \"TaskId\" text not null,\n \"Label\" text not null,\n \"Name\" text not null,\n \"Commentary\" text null,\n \"PeriodTypeId\" integer not null,\n \"MinNumber\" integer not null,\n \"MaxNumber\" integer not null,\n primary key (\"TaskId\")\n);\n\ncreate table \"PageModuleTemplates\" (\n \"TemplateId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"PageModuleTemplates_SiteId_idx\" on \"PageModuleTemplates\" (\"SiteId\");\n\ncreate table \"PagePartTemplates\" (\n \"TemplateId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"PagePartTemplates_SiteId_idx\" on \"PagePartTemplates\" (\"SiteId\");\n\ncreate table \"PageTemplates\" (\n \"TemplateId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"PageTemplates_SiteId_idx\" on \"PageTemplates\" (\"SiteId\");\n\ncreate table \"Pages\" (\n \"PageId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Path\" text not null,\n \"Title\" text not null,\n \"Content\" text null,\n \"TemplateId\" text not null,\n \"Published\" integer not null,\n \"DatePublished\" text null,\n \"UtcDatePublished\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"SitemapPriority\" text null,\n \"FormId\" text null references \"Forms\" (\"FormId\"),\n \"ViewsCount\" integer not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"PageId\")\n);\ncreate index \"Pages_SiteId_idx\" on \"Pages\" (\"SiteId\");\n\ncreate table \"PostComments\" (\n \"CommentId\" text not null,\n \"PostId\" text not null references \"Posts\" (\"PostId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"AuthorName\" text not null,\n \"AuthorEmail\" text not null,\n \"Title\" text null,\n \"Content\" text not null,\n \"ContentType\" integer null,\n \"Published\" integer not null,\n \"IsSpam\" integer not null,\n \"IpAddress\" text null,\n \"UserAgent\" text null,\n \"AuthorUrl\" text null,\n \"ReplyOnCommentId\" text null references \"PostComments\" (\"CommentId\"),\n \"Level\" integer not null,\n \"SiteId\" text not null,\n primary key (\"CommentId\")\n);\ncreate index \"PostComments_SiteId_idx\" on \"PostComments\" (\"SiteId\");\n\ncreate table \"PostModuleTemplates\" (\n \"TemplateId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"Name\" text not null,\n \"Description\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Content\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"PostModuleTemplates_SiteId_idx\" on \"PostModuleTemplates\" (\"SiteId\");\n\ncreate table \"PostTemplates\" (\n \"TemplateId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"Name\" text not null,\n \"Description\" text null,\n \"Modules\" integer not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Content\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"PostTemplates_SiteId_idx\" on \"PostTemplates\" (\"SiteId\");\n\ncreate table \"Posts\" (\n \"PostId\" text not null,\n \"BlogId\" text not null references \"Blogs\" (\"BlogId\"),\n \"AuthorId\" text not null references \"BlogAuthors\" (\"AuthorId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"Number\" integer not null,\n \"Title\" text not null,\n \"Excerpt\" text null,\n \"ExcerptType\" integer null,\n \"Content\" text null,\n \"ContentType\" integer null,\n \"Alias\" text null,\n \"Published\" integer not null,\n \"DatePublished\" text null,\n \"UtcDatePublished\" text null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"ViewsCount\" integer not null,\n \"Rating\" text null,\n \"VotesCount\" integer not null,\n \"CommentsAllowed\" integer not null,\n \"CommentsCount\" integer not null,\n \"ShortUrl\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"SitemapPriority\" text null,\n \"TemplateId\" text null,\n \"UpdatedById\" text null,\n \"CreatedById\" text not null,\n \"SiteId\" text not null,\n primary key (\"PostId\")\n);\ncreate index \"Posts_SiteId_idx\" on \"Posts\" (\"SiteId\");\n\ncreate table \"ProductPartTemplates\" (\n \"TemplateId\" text not null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"ProductPartTemplates_SiteId_idx\" on \"ProductPartTemplates\" (\"SiteId\");\n\ncreate table \"ProductProperties\" (\n \"PropertyId\" text not null,\n \"ProductId\" text not null references \"Products\" (\"ProductId\"),\n \"Name\" text not null,\n \"Value\" text not null,\n \"ValueType\" integer not null,\n \"Description\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"PropertyId\")\n);\ncreate index \"ProductProperties_SiteId_idx\" on \"ProductProperties\" (\"SiteId\");\n\ncreate table \"ProductPropertyValues\" (\n \"ValueId\" text not null,\n \"ProductId\" text not null references \"Products\" (\"ProductId\"),\n \"PropertyId\" text not null references \"ProductTypeProperties\" (\"PropertyId\"),\n \"Value\" text null,\n \"Description\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"ValueId\")\n);\ncreate index \"ProductPropertyValues_SiteId_idx\" on \"ProductPropertyValues\" (\"SiteId\");\n\ncreate table \"ProductReviewRatings\" (\n \"Id\" text not null,\n \"ReviewId\" text not null references \"ProductReviews\" (\"ReviewId\"),\n \"RatingId\" text not null references \"ProductTypeRatings\" (\"RatingId\"),\n \"Rating\" text not null,\n \"SiteId\" text not null,\n primary key (\"Id\")\n);\ncreate index \"ProductReviewRatings_SiteId_idx\" on \"ProductReviewRatings\" (\"SiteId\");\n\ncreate table \"ProductReviewVotes\" (\n \"VoteId\" text not null,\n \"ReviewId\" text not null references \"ProductReviews\" (\"ReviewId\"),\n \"Helpful\" integer not null,\n \"Timestamp\" text not null,\n \"UtcTimestamp\" text not null,\n \"IpAddress\" text null,\n \"UserAgent\" text null,\n \"SiteId\" text not null,\n primary key (\"VoteId\")\n);\ncreate index \"ProductReviewVotes_SiteId_idx\" on \"ProductReviewVotes\" (\"SiteId\");\n\ncreate table \"ProductReviews\" (\n \"ReviewId\" text not null,\n \"ProductId\" text not null references \"Products\" (\"ProductId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"AuthorName\" text not null,\n \"AuthorEmail\" text not null,\n \"Public\" integer not null,\n \"Rating\" text null,\n \"Title\" text null,\n \"Pros\" text not null,\n \"Cons\" text not null,\n \"Notes\" text not null,\n \"HelpfulVotesCount\" integer null,\n \"NotHelpfulVotesCount\" integer null,\n \"Published\" integer not null,\n \"IsSpam\" integer not null,\n \"IpAddress\" text null,\n \"UserAgent\" text null,\n \"SiteId\" text not null,\n primary key (\"ReviewId\")\n);\ncreate index \"ProductReviews_SiteId_idx\" on \"ProductReviews\" (\"SiteId\");\n\ncreate table \"ProductStoreCategories\" (\n \"Product_Id\" text not null references \"Products\" (\"ProductId\"),\n \"ProductCategory_Id\" text not null references \"StoreCategories\" (\"CategoryId\"),\n \"SiteId\" text not null,\n primary key (\"Product_Id\", \"ProductCategory_Id\")\n);\ncreate index \"ProductStoreCategories_SiteId_idx\" on \"ProductStoreCategories\" (\"SiteId\");\n\ncreate table \"ProductStoreTags\" (\n \"Product_Id\" text not null references \"Products\" (\"ProductId\"),\n \"ProductTag_Id\" text not null references \"StoreTags\" (\"TagId\"),\n \"SiteId\" text not null,\n primary key (\"Product_Id\", \"ProductTag_Id\")\n);\ncreate index \"ProductStoreTags_SiteId_idx\" on \"ProductStoreTags\" (\"SiteId\");\n\ncreate table \"ProductTypeProperties\" (\n \"PropertyId\" text not null,\n \"CategoryId\" text not null references \"ProductTypePropertyCategories\" (\"CategoryId\"),\n \"Name\" text not null,\n \"ValueType\" integer not null,\n \"Description\" text null,\n \"Main\" integer not null,\n \"DisplayEmpty\" integer not null,\n \"Seq\" integer not null,\n \"DateCreated\" text null,\n \"UtcDateCreated\" text null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"PropertyId\")\n);\ncreate index \"ProductTypeProperties_SiteId_idx\" on \"ProductTypeProperties\" (\"SiteId\");\n\ncreate table \"ProductTypePropertyCategories\" (\n \"CategoryId\" text not null,\n \"ProductTypeId\" text not null references \"ProductTypes\" (\"TypeId\"),\n \"Name\" text not null,\n \"Main\" integer not null,\n \"DisplayEmpty\" integer not null,\n \"Seq\" integer not null,\n \"DateCreated\" text null,\n \"UtcDateCreated\" text null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"CategoryId\")\n);\ncreate index \"ProductTypePropertyCategories_SiteId_idx\" on \"ProductTypePropertyCategories\" (\"SiteId\");\n\ncreate table \"ProductTypeRatings\" (\n \"RatingId\" text not null,\n \"ProductTypeId\" text not null references \"ProductTypes\" (\"TypeId\"),\n \"Name\" text not null,\n \"Weight\" integer null,\n \"Main\" integer not null,\n \"DisplayEmpty\" integer not null,\n \"Seq\" integer not null,\n \"DateCreated\" text null,\n \"UtcDateCreated\" text null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"RatingId\")\n);\ncreate index \"ProductTypeRatings_SiteId_idx\" on \"ProductTypeRatings\" (\"SiteId\");\n\ncreate table \"ProductTypes\" (\n \"TypeId\" text not null,\n \"Name\" text not null,\n \"Description\" text null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"TemplateName\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"IntId\" integer not null,\n \"YmlExport\" integer not null,\n \"ProductPrefix\" text null,\n \"Content\" text null,\n \"Properties\" text null,\n \"ListLayout\" text null,\n \"DetailsLayout\" text null,\n \"Layouts\" text null,\n \"VariantTemplateId\" text not null references \"ProductVariantTemplates\" (\"TemplateId\"),\n \"Alias\" text null,\n \"CustomDefaultLayout\" text null,\n \"SiteId\" text not null,\n primary key (\"TypeId\")\n);\ncreate index \"ProductTypes_SiteId_idx\" on \"ProductTypes\" (\"SiteId\");\n\ncreate table \"ProductVariantTemplates\" (\n \"TemplateId\" text not null,\n \"Name\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Alias\" text null,\n \"CustomDefaultLayout\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"ProductVariantTemplates_SiteId_idx\" on \"ProductVariantTemplates\" (\"SiteId\");\n\ncreate table \"ProductVariants\" (\n \"VariantId\" text not null,\n \"ProductId\" text not null references \"Products\" (\"ProductId\"),\n \"Position\" integer not null,\n \"Title\" text not null,\n \"Price\" text null,\n \"CompareAtPrice\" text null,\n \"InventoryQuantity\" integer null,\n \"InventoryPolicyId\" integer not null,\n \"Sku\" text null,\n \"Weight\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"IntId\" integer not null,\n \"YmlExport\" integer not null,\n \"Bid\" text null,\n \"Cbid\" text null,\n \"VendorCode\" text null,\n \"BuyAtStore\" integer not null,\n \"SelfDelivery\" integer not null,\n \"Delivery\" integer not null,\n \"DeliveryPrice\" text null,\n \"TemplateId\" text not null references \"ProductVariantTemplates\" (\"TemplateId\"),\n \"Content\" text null,\n \"SiteId\" text not null,\n primary key (\"VariantId\")\n);\ncreate index \"ProductVariants_SiteId_idx\" on \"ProductVariants\" (\"SiteId\");\n\ncreate table \"Products\" (\n \"ProductId\" text not null,\n \"Title\" text not null,\n \"ShortDescription\" text null,\n \"ShortDescriptionType\" integer null,\n \"Description\" text null,\n \"DescriptionType\" integer null,\n \"Kit\" text null,\n \"KitType\" integer null,\n \"Slug\" text not null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"TypeId\" text not null references \"ProductTypes\" (\"TypeId\"),\n \"VendorId\" text null references \"StoreVendors\" (\"VendorId\"),\n \"Published\" integer not null,\n \"Rating\" text null,\n \"VotesCount\" integer null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"TemplateName\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"CountryOfOrigin\" text null,\n \"Content\" text null,\n \"Number\" integer not null,\n \"SiteId\" text not null,\n primary key (\"ProductId\")\n);\ncreate index \"Products_SiteId_idx\" on \"Products\" (\"SiteId\");\n\ncreate table \"Redirections\" (\n \"RedirectionId\" text not null,\n \"Title\" text not null,\n \"Seq\" integer not null,\n \"UrlDetection\" integer not null,\n \"TargetUrl\" text null,\n \"SourceType\" integer not null,\n \"Regex\" integer not null,\n \"IgnoreCase\" integer not null,\n \"Action\" integer not null,\n \"DestinationUrl\" text null,\n \"Permanent\" integer not null,\n \"ThemeId\" text null references \"Themes\" (\"ThemeId\"),\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"BrowserDetection\" integer not null,\n \"BrowserName\" text null,\n \"BrowserVersion\" text null,\n \"BrowserMajorVersion\" integer null,\n \"BrowserMinorVersion\" text null,\n \"BrowserType\" text null,\n \"BrowserLayoutEngine\" text null,\n \"BrowserPlatform\" text null,\n \"BrowserScreenPixelsWidth\" integer null,\n \"BrowserScreenPixelsHeight\" integer null,\n \"MobileDeviceDetection\" integer not null,\n \"IsMobileDevice\" integer not null,\n \"MobileDeviceModel\" text null,\n \"MobileDeviceManufacturer\" text null,\n \"DeviceTypeDetection\" integer not null,\n \"DeviceIsDesktop\" integer not null,\n \"DeviceIsTablet\" integer not null,\n \"DeviceIsConsole\" integer not null,\n \"DeviceIsTV\" integer not null,\n \"DeviceIsMobile\" integer not null,\n \"DeviceIsCrawler\" integer not null,\n \"QueryStringParamName\" text null,\n \"CookieName\" text null,\n \"CookieExpires\" integer null,\n \"IgnoreOptions\" integer not null,\n primary key (\"RedirectionId\")\n);\ncreate index \"Redirections_SiteId_idx\" on \"Redirections\" (\"SiteId\");\n\ncreate table \"RelatedPosts\" (\n \"PostId\" text not null references \"Posts\" (\"PostId\"),\n \"RelatedPostId\" text not null references \"Posts\" (\"PostId\"),\n \"SiteId\" text not null,\n primary key (\"PostId\", \"RelatedPostId\")\n);\ncreate index \"RelatedPosts_SiteId_idx\" on \"RelatedPosts\" (\"SiteId\");\n\ncreate table \"ReviewItemTemplates\" (\n \"ItemTemplateId\" text not null,\n \"ReviewTemplateId\" text not null references \"ReviewTemplates\" (\"TemplateId\"),\n \"SiteId\" text not null,\n \"Type\" text not null,\n \"Path\" text not null,\n \"SubmissionAction\" integer not null,\n \"RedirectUrl\" text null,\n \"SuccessMessage\" text null,\n \"EmailRecipients\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"ItemTemplateId\")\n);\ncreate index \"ReviewItemTemplates_SiteId_idx\" on \"ReviewItemTemplates\" (\"SiteId\");\n\ncreate table \"ReviewRatingTemplates\" (\n \"TemplateId\" text not null,\n \"ReviewTemplateId\" text not null references \"ReviewTemplates\" (\"TemplateId\"),\n \"Name\" text not null,\n \"Weight\" integer null,\n \"Seq\" integer not null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"ReviewRatingTemplates_SiteId_idx\" on \"ReviewRatingTemplates\" (\"SiteId\");\n\ncreate table \"ReviewRatings\" (\n \"RatingId\" text not null,\n \"ReviewId\" text not null references \"Reviews\" (\"ReviewId\"),\n \"RatingTemplateId\" text not null references \"ReviewRatingTemplates\" (\"TemplateId\"),\n \"Value\" text not null,\n \"SiteId\" text not null,\n primary key (\"RatingId\")\n);\ncreate index \"ReviewRatings_SiteId_idx\" on \"ReviewRatings\" (\"SiteId\");\n\ncreate table \"ReviewTemplates\" (\n \"TemplateId\" text not null,\n \"SiteId\" text not null,\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"ReviewTemplates_SiteId_idx\" on \"ReviewTemplates\" (\"SiteId\");\n\ncreate table \"ReviewVotes\" (\n \"VoteId\" text not null references \"Votes\" (\"VoteId\"),\n \"ReviewId\" text not null references \"Reviews\" (\"ReviewId\"),\n \"Helpful\" integer not null,\n \"Timestamp\" text not null,\n \"UtcTimestamp\" text not null,\n \"IpAddress\" text null,\n \"UserAgent\" text null,\n \"Referer\" text null,\n \"SiteId\" text not null,\n primary key (\"VoteId\")\n);\ncreate index \"ReviewVotes_SiteId_idx\" on \"ReviewVotes\" (\"SiteId\");\n\ncreate table \"Reviews\" (\n \"ReviewId\" text not null,\n \"SiteId\" text not null,\n \"ItemType\" text not null,\n \"ItemId\" text not null,\n \"TemplateId\" text not null references \"ReviewTemplates\" (\"TemplateId\"),\n \"ReviewerName\" text null,\n \"ReviewerEmail\" text null,\n \"Public\" integer not null,\n \"Rating\" text null,\n \"Summary\" text null,\n \"Details\" text null,\n \"Pros\" text null,\n \"Cons\" text null,\n \"Fields\" text null,\n \"HelpfulVotesCount\" integer null,\n \"NotHelpfulVotesCount\" integer null,\n \"Published\" integer not null,\n \"DatePublished\" text null,\n \"UtcDatePublished\" text null,\n \"IsDublicate\" integer not null,\n \"IsSpam\" integer not null,\n \"IpAddress\" text null,\n \"UserAgent\" text null,\n \"Referer\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n primary key (\"ReviewId\")\n);\ncreate index \"Reviews_SiteId_idx\" on \"Reviews\" (\"SiteId\");\n\ncreate table \"SiteSettings\" (\n \"SettingId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Key\" text not null,\n \"Value\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n primary key (\"SettingId\")\n);\ncreate index \"SiteSettings_SiteId_idx\" on \"SiteSettings\" (\"SiteId\");\n\ncreate table \"Sites\" (\n \"SiteId\" text not null,\n \"AccountId\" text not null references \"Accounts\" (\"AccountId\"),\n \"Title\" text null,\n \"Alias\" text null,\n \"LoweredAlias\" text null,\n \"PrimaryDomain\" text null,\n \"TimeOffset\" text null,\n \"Culture\" text null,\n \"MultiCultural\" integer not null default 0,\n \"Cultures\" text null,\n \"ActiveThemeId\" text null,\n \"RobotsTxt\" text null,\n \"Live\" integer not null,\n \"Production\" integer not null,\n \"Password\" text null,\n \"PrefixAction\" integer null,\n \"PagerSlug\" text null,\n \"SettingsData\" text null,\n \"SettingsTemplate\" text null,\n \"DomainSettingsTemplate\" text null,\n \"DateCreated\" text not null default (datetime('now')),\n \"UtcDateCreated\" text not null default (datetime('now')),\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SearchAnalyzer\" text null,\n \"SearchIndexCreationTimestamp\" text null,\n \"DefaultContentType\" text null,\n \"DefaultEncoding\" text null,\n \"DefaultPageName\" text null,\n \"DefaultExtension\" text null,\n \"NewTemplates\" integer not null default 0,\n \"CachingOptions\" text null,\n \"EnableCors\" integer not null default 0,\n \"DefaultCorsPolicy\" text null,\n \"ContentCacheOptions\" text null,\n \"Writable\" integer not null default 1,\n primary key (\"SiteId\")\n);\n\ncreate table \"StaticPages\" (\n \"PageId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Path\" text not null,\n \"Content\" text null,\n \"ContentType\" text null,\n \"Encoding\" text null,\n \"Published\" integer not null,\n \"DatePublished\" text null,\n \"UtcDatePublished\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"SitemapPriority\" text null,\n \"ViewsCount\" integer not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"PageId\")\n);\ncreate index \"StaticPages_SiteId_idx\" on \"StaticPages\" (\"SiteId\");\n\ncreate table \"StoreAdministrators\" (\n \"StoreAdministratorId\" text not null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"AdministratorId\" text not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"StoreAdministratorId\")\n);\ncreate index \"StoreAdministrators_SiteId_idx\" on \"StoreAdministrators\" (\"SiteId\");\n\ncreate table \"StoreCategories\" (\n \"CategoryId\" text not null,\n \"Title\" text not null,\n \"Description\" text null,\n \"DescriptionType\" integer null,\n \"Slug\" text not null,\n \"Content\" text null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"DateCreated\" text null,\n \"UtcDateCreated\" text null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text null,\n \"UpdatedById\" text null,\n \"Criteria\" text null,\n \"SortOrder\" text null,\n \"TemplateName\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"Discriminator\" text not null,\n \"SiteId\" text not null,\n primary key (\"CategoryId\")\n);\ncreate index \"StoreCategories_SiteId_idx\" on \"StoreCategories\" (\"SiteId\");\n\ncreate table \"StorePartTemplates\" (\n \"TemplateId\" text not null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"Name\" text not null,\n \"Alias\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"CustomDefaultLayout\" text null,\n \"Layouts\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TemplateId\")\n);\ncreate index \"StorePartTemplates_SiteId_idx\" on \"StorePartTemplates\" (\"SiteId\");\n\ncreate table \"StoreTags\" (\n \"TagId\" text not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Content\" text null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"TagId\")\n);\ncreate index \"StoreTags_SiteId_idx\" on \"StoreTags\" (\"SiteId\");\n\ncreate table \"StoreVendors\" (\n \"VendorId\" text not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"Content\" text null,\n \"StoreId\" text not null references \"Stores\" (\"StoreId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"VendorId\")\n);\ncreate index \"StoreVendors_SiteId_idx\" on \"StoreVendors\" (\"SiteId\");\n\ncreate table \"Stores\" (\n \"StoreId\" text not null,\n \"Title\" text not null,\n \"Path\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"IncludeInSitemap\" integer not null,\n \"SitemapPriority\" text null,\n \"SitemapLastUpdatedTime\" text null,\n \"SitemapChangeFrequency\" text null,\n \"Content\" text null,\n \"StoreLayout\" text null,\n \"CategoryLayout\" text null,\n \"SmartCategoryLayout\" text null,\n \"TagLayout\" text null,\n \"VendorLayout\" text null,\n \"CategoriesLayout\" text null,\n \"SmartCategoriesLayout\" text null,\n \"TagsLayout\" text null,\n \"VendorsLayout\" text null,\n \"StoreFields\" text null,\n \"CategoryFields\" text null,\n \"SmartCategoryFields\" text null,\n \"TagFields\" text null,\n \"VendorFields\" text null,\n \"CategoriesPath\" text null,\n \"TagsPath\" text null,\n \"VendorsPath\" text null,\n \"ProductsPath\" text null,\n \"SettingsData\" text null,\n \"SettingsTemplate\" text null,\n \"StoreLayouts\" text null,\n \"CategoryLayouts\" text null,\n \"SmartCategoryLayouts\" text null,\n \"TagLayouts\" text null,\n \"VendorLayouts\" text null,\n \"ProductLayout\" text null,\n \"ProductPath\" text null,\n \"ProductNumberFormat\" text null,\n \"RecentlyViewedEnabled\" integer not null,\n \"RecentlyViewedStorage\" integer not null,\n \"RecentlyViewedExpires\" integer null,\n \"RecentlyViewedListCapacity\" integer not null,\n \"Alias\" text null,\n \"DefaultCorsPolicy\" text null,\n primary key (\"StoreId\")\n);\ncreate index \"Stores_SiteId_idx\" on \"Stores\" (\"SiteId\");\n\ncreate table \"TableRecordPartTemplates\" (\n \"TemplateId\" text not null,\n \"Name\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Alias\" text null,\n \"CustomDefaultLayout\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"TableRecordPartTemplates_SiteId_idx\" on \"TableRecordPartTemplates\" (\"SiteId\");\n\ncreate table \"TableRecords\" (\n \"RecordId\" text not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"TableId\" text not null references \"Tables\" (\"TableId\"),\n \"Content\" text null,\n \"Published\" integer not null,\n \"DatePublished\" text null,\n \"UtcDatePublished\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"SiteId\" text not null,\n primary key (\"RecordId\")\n);\ncreate index \"TableRecords_SiteId_idx\" on \"TableRecords\" (\"SiteId\");\n\ncreate table \"TableTemplates\" (\n \"TemplateId\" text not null,\n \"Name\" text not null,\n \"Description\" text null,\n \"Content\" text null,\n \"Layouts\" text null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Alias\" text null,\n \"CustomDefaultLayout\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"TableTemplates_SiteId_idx\" on \"TableTemplates\" (\"SiteId\");\n\ncreate table \"Tables\" (\n \"TableId\" text not null,\n \"Title\" text not null,\n \"Slug\" text not null,\n \"SiteId\" text not null,\n \"TemplateId\" text not null references \"TableTemplates\" (\"TemplateId\"),\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n primary key (\"TableId\")\n);\ncreate index \"Tables_SiteId_idx\" on \"Tables\" (\"SiteId\");\n\ncreate table \"Themes\" (\n \"ThemeId\" text not null,\n \"Name\" text not null,\n \"ViewEngineId\" integer not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"ImageSizes\" text null,\n \"SettingsData\" text null,\n \"SettingsMarkup\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"ParentThemeId\" text null references \"Themes\" (\"ThemeId\"),\n primary key (\"ThemeId\")\n);\ncreate index \"Themes_SiteId_idx\" on \"Themes\" (\"SiteId\");\n\ncreate table \"UploadCacheItems\" (\n \"ItemId\" text not null,\n \"SiteId\" text not null,\n \"Filename\" text not null,\n \"StorageClient\" text not null,\n \"StorageFilename\" text not null,\n \"MediaType\" text not null,\n \"FileSize\" integer not null,\n \"UtcDateCreated\" text not null,\n primary key (\"ItemId\")\n);\ncreate index \"UploadCacheItems_SiteId_idx\" on \"UploadCacheItems\" (\"SiteId\");\n\ncreate table \"Urls\" (\n \"UrlId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"OriginalUrl\" text not null,\n \"ShortUrl\" text not null,\n primary key (\"UrlId\")\n);\ncreate index \"Urls_SiteId_idx\" on \"Urls\" (\"SiteId\");\n\ncreate table \"Votes\" (\n \"VoteId\" text not null,\n \"PostId\" text not null references \"Posts\" (\"PostId\"),\n \"Rating\" text not null,\n \"Timestamp\" text not null,\n \"UtcTimestamp\" text not null,\n \"IpAddress\" text null,\n \"UserAgent\" text null,\n \"SiteId\" text not null,\n primary key (\"VoteId\")\n);\ncreate index \"Votes_SiteId_idx\" on \"Votes\" (\"SiteId\");\n\ncreate table \"Watermark\" (\n \"IdWatermark\" text not null,\n \"Name\" text not null,\n \"HorizontalAlign\" text null,\n \"VerticalAlign\" text null,\n \"Opacity\" integer null,\n \"Padding\" integer null,\n \"IdGallery\" text not null references \"Gallery\" (\"IdGallery\"),\n \"SiteId\" text not null,\n primary key (\"IdWatermark\")\n);\ncreate index \"Watermark_SiteId_idx\" on \"Watermark\" (\"SiteId\");\n\ncreate table \"Watermark_ImageWatermark\" (\n \"IdWatermark\" text not null references \"Watermark\" (\"IdWatermark\"),\n \"FilePath\" text not null,\n \"Width\" integer null,\n \"Height\" integer null,\n \"SiteId\" text not null,\n primary key (\"IdWatermark\")\n);\ncreate index \"Watermark_ImageWatermark_SiteId_idx\" on \"Watermark_ImageWatermark\" (\"SiteId\");\n\ncreate table \"Watermark_TextWatermark\" (\n \"IdWatermark\" text not null references \"Watermark\" (\"IdWatermark\"),\n \"Text\" text not null,\n \"FontColor\" text null,\n \"FontSize\" integer null,\n \"FontStyle\" text null,\n \"FontFamily\" text null,\n \"SiteId\" text not null,\n primary key (\"IdWatermark\")\n);\ncreate index \"Watermark_TextWatermark_SiteId_idx\" on \"Watermark_TextWatermark\" (\"SiteId\");\n\ncreate table \"WidgetProperties\" (\n \"PropertyId\" text not null,\n \"WidgetId\" text not null references \"Widgets\" (\"WidgetId\"),\n \"PropertyKey\" text not null,\n \"PropertyValue\" text null,\n \"SiteId\" text not null,\n primary key (\"PropertyId\")\n);\ncreate index \"WidgetProperties_SiteId_idx\" on \"WidgetProperties\" (\"SiteId\");\n\ncreate table \"Widgets\" (\n \"WidgetId\" text not null,\n \"SiteId\" text not null references \"Sites\" (\"SiteId\"),\n \"Title\" text not null,\n \"Handle\" text not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"Discriminator\" text null,\n primary key (\"WidgetId\")\n);\ncreate index \"Widgets_SiteId_idx\" on \"Widgets\" (\"SiteId\");\n\ncreate table \"_Modules\" (\n \"ModuleId\" text not null,\n \"OwnerName\" text not null,\n \"OwnerId\" text not null,\n \"Seq\" integer not null,\n \"VisibleInList\" integer not null,\n \"VisibleInDetails\" integer not null,\n \"VisibleInFeed\" integer not null,\n \"CssClasses\" text null,\n \"HtmlAttrubutes\" text null,\n \"Published\" integer not null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"CreatedById\" text not null,\n \"UpdatedById\" text null,\n \"Discriminator\" text null,\n \"SiteId\" text not null,\n primary key (\"ModuleId\")\n);\ncreate index \"_Modules_SiteId_idx\" on \"_Modules\" (\"SiteId\");\n\ncreate table \"_Templates\" (\n \"TemplateId\" text not null,\n \"Name\" text not null,\n \"Content\" text null,\n \"Shared\" integer null,\n \"SiteId\" text not null,\n \"FormId\" text null,\n \"DateCreated\" text not null,\n \"UtcDateCreated\" text not null,\n \"CreatedById\" text not null,\n \"DateUpdated\" text null,\n \"UtcDateUpdated\" text null,\n \"UpdatedById\" text null,\n \"Post_BlogId\" text null references \"Blogs\" (\"BlogId\"),\n \"Module_BlogId\" text null references \"Blogs\" (\"BlogId\"),\n \"Part_BlogId\" text null references \"Blogs\" (\"BlogId\"),\n \"Part_SiteId\" text null,\n \"Product_StoreId\" text null,\n \"Part_StoreId\" text null,\n \"Description\" text null,\n \"Modules\" integer null,\n \"ListLayout\" text null,\n \"DetailsLayout\" text null,\n \"FeedLayout\" text null,\n \"Discriminator\" text null,\n \"Page_SiteId\" text null,\n \"PagePart_SiteId\" text null,\n \"Form_SiteId\" text null,\n \"Layouts\" text null,\n \"PageModule_SiteId\" text null,\n \"Alias\" text null,\n \"CustomDefaultLayout\" text null,\n primary key (\"TemplateId\")\n);\ncreate index \"_Templates_SiteId_idx\" on \"_Templates\" (\"SiteId\");\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].ProductId -> Products.ProductId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].TaskId -> NumberingTasks.TaskId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].VoteId -> Votes.VoteId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].ReviewId -> Reviews.ReviewId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].InventoryPolicyId -> InventoryPolicies.InventoryPolicyId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].FormId -> Forms.FormId (control-plane link, not enforced in a site database)\n";
10
+ export const mssql = "-- GENERATED from the canonical schema — do not edit; run schema/generate.mjs\n-- dialect: mssql · canon version: 1 · tables: 120\n\ncreate table [Accounts] (\n [AccountId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([AccountId])\n);\n\ncreate table [AdministratorAccounts] (\n [Administrator_Id] uniqueidentifier not null,\n [Account_Id] uniqueidentifier not null,\n primary key ([Administrator_Id], [Account_Id])\n);\n\ncreate table [AdministratorBlogs] (\n [Administrator_Id] uniqueidentifier not null,\n [Blog_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([Administrator_Id], [Blog_Id])\n);\ncreate index [AdministratorBlogs_SiteId_idx] on [AdministratorBlogs] ([SiteId]);\n\ncreate table [AdministratorSites] (\n [Administrator_Id] uniqueidentifier not null,\n [Site_Id] uniqueidentifier not null,\n primary key ([Administrator_Id], [Site_Id])\n);\n\ncreate table [AdministratorStores] (\n [Administrator_Id] uniqueidentifier not null,\n [Store_Id] uniqueidentifier not null,\n primary key ([Administrator_Id], [Store_Id])\n);\n\ncreate table [Administrators] (\n [AdministratorId] uniqueidentifier not null,\n [Username] nvarchar(256) null,\n [FirstName] nvarchar(50) null,\n [LastName] nvarchar(50) null,\n [Email] nvarchar(256) null,\n [PasswordHash] nvarchar(512) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([AdministratorId])\n);\n\ncreate table [ApiKeys] (\n [ApiKeyId] uniqueidentifier not null,\n [AdministratorId] uniqueidentifier not null,\n [Name] nvarchar(200) not null,\n [KeyPrefix] nvarchar(8) not null,\n [KeyHash] nvarchar(64) not null,\n [Scope] nvarchar(500) null,\n [ExpiresAt] datetime2(3) null,\n [RevokedAt] datetime2(3) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n primary key ([ApiKeyId])\n);\n\ncreate table [BlackList] (\n [Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [IpAddress] nvarchar(50) not null,\n [Reason] nvarchar(255) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([Id])\n);\ncreate index [BlackList_SiteId_idx] on [BlackList] ([SiteId]);\n\ncreate table [BlogAuthors] (\n [AuthorId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Slug] nvarchar(100) not null,\n [BlogId] uniqueidentifier not null,\n [AdministratorId] uniqueidentifier not null,\n [Content] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([AuthorId])\n);\ncreate index [BlogAuthors_SiteId_idx] on [BlogAuthors] ([SiteId]);\n\ncreate table [BlogCategories] (\n [CategoryId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Description] nvarchar(256) null,\n [Alias] nvarchar(100) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [Published] bit null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Content] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([CategoryId])\n);\ncreate index [BlogCategories_SiteId_idx] on [BlogCategories] ([SiteId]);\n\ncreate table [BlogCategoryPosts] (\n [BlogCategory_Id] uniqueidentifier not null,\n [Post_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([BlogCategory_Id], [Post_Id])\n);\ncreate index [BlogCategoryPosts_SiteId_idx] on [BlogCategoryPosts] ([SiteId]);\n\ncreate table [BlogPostModuleTemplates] (\n [TemplateId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [BlogPostModuleTemplates_SiteId_idx] on [BlogPostModuleTemplates] ([SiteId]);\n\ncreate table [BlogPostPartTemplates] (\n [TemplateId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [BlogPostPartTemplates_SiteId_idx] on [BlogPostPartTemplates] ([SiteId]);\n\ncreate table [BlogPostTemplates] (\n [TemplateId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [BlogPostTemplates_SiteId_idx] on [BlogPostTemplates] ([SiteId]);\n\ncreate table [BlogTagPosts] (\n [BlogTag_Id] uniqueidentifier not null,\n [Post_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([BlogTag_Id], [Post_Id])\n);\ncreate index [BlogTagPosts_SiteId_idx] on [BlogTagPosts] ([SiteId]);\n\ncreate table [BlogTags] (\n [TagId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Description] nvarchar(256) null,\n [Alias] nvarchar(100) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [Published] bit null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Content] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([TagId])\n);\ncreate index [BlogTags_SiteId_idx] on [BlogTags] ([SiteId]);\n\ncreate table [Blogs] (\n [BlogId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Title] nvarchar(256) not null,\n [Alias] nvarchar(256) not null,\n [Content] nvarchar(max) null,\n [Subtitle] nvarchar(256) null,\n [About] nvarchar(max) null,\n [AboutType] int null,\n [TemplateSuffix] nvarchar(50) null,\n [PostContent] nvarchar(max) null,\n [ImageModuleContent] nvarchar(max) null,\n [GalleryModuleContent] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [MaxReplyCommentsLevels] int not null,\n [AllowedCommentTags] nvarchar(255) null,\n [YearFormat] nvarchar(255) null,\n [MonthFormat] nvarchar(255) null,\n [DayFormat] nvarchar(255) null,\n [PostNumberFormat] nvarchar(255) null,\n [FeedPath] nvarchar(255) null,\n [CategoriesPath] nvarchar(255) null,\n [TagsPath] nvarchar(255) null,\n [ArchivesPath] nvarchar(255) null,\n [PostPath] nvarchar(255) null,\n [AuthorsPath] nvarchar(255) null,\n [BlogLayout] nvarchar(100) null,\n [ArchiveLayout] nvarchar(100) null,\n [AuthorLayout] nvarchar(100) null,\n [CategoryLayout] nvarchar(100) null,\n [TagLayout] nvarchar(100) null,\n [ArchivesLayout] nvarchar(100) null,\n [AuthorsLayout] nvarchar(100) null,\n [CategoriesLayout] nvarchar(100) null,\n [TagsLayout] nvarchar(100) null,\n [BlogFields] nvarchar(max) null,\n [CategoryFields] nvarchar(max) null,\n [TagFields] nvarchar(max) null,\n [AuthorFields] nvarchar(max) null,\n [FeedFormat] nvarchar(10) not null,\n [FeedLayout] nvarchar(100) null,\n [LastDateUpdated] datetime2(3) not null,\n [UtcLastDateUpdated] datetime2(3) not null,\n [BlogLayouts] nvarchar(max) null,\n [CategoryLayouts] nvarchar(max) null,\n [TagLayouts] nvarchar(max) null,\n [AuthorLayouts] nvarchar(max) null,\n [PostLayout] nvarchar(100) null,\n [CommentsAllowed] bit not null,\n [YearFields] nvarchar(max) null,\n [YearLayouts] nvarchar(max) null,\n [MonthFields] nvarchar(max) null,\n [MonthLayouts] nvarchar(max) null,\n [DayFields] nvarchar(max) null,\n [DayLayouts] nvarchar(max) null,\n [CommentsCaptchaEnabled] bit not null,\n [RecentlyViewedEnabled] bit not null,\n [RecentlyViewedStorage] int not null,\n [RecentlyViewedExpires] int null,\n [RecentlyViewedListCapacity] int not null,\n [Path] nvarchar(256) null,\n [MonthLayout] nvarchar(100) null,\n [DayLayout] nvarchar(100) null,\n [DefaultCorsPolicy] nvarchar(max) null,\n primary key ([BlogId])\n);\ncreate index [Blogs_SiteId_idx] on [Blogs] ([SiteId]);\n\ncreate table [CatalogCategories] (\n [CategoryId] uniqueidentifier not null,\n [CatalogId] uniqueidentifier not null,\n [Title] nvarchar(255) not null,\n [Slug] nvarchar(255) not null,\n [Content] nvarchar(max) null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([CategoryId])\n);\ncreate index [CatalogCategories_SiteId_idx] on [CatalogCategories] ([SiteId]);\n\ncreate table [CatalogProductModuleTemplates] (\n [TemplateId] uniqueidentifier not null,\n [CatalogId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [CatalogProductModuleTemplates_SiteId_idx] on [CatalogProductModuleTemplates] ([SiteId]);\n\ncreate table [CatalogProductPartTemplates] (\n [TemplateId] uniqueidentifier not null,\n [CatalogId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [CatalogProductPartTemplates_SiteId_idx] on [CatalogProductPartTemplates] ([SiteId]);\n\ncreate table [CatalogProductTemplates] (\n [TemplateId] uniqueidentifier not null,\n [CatalogId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [CatalogProductTemplates_SiteId_idx] on [CatalogProductTemplates] ([SiteId]);\n\ncreate table [CatalogProducts] (\n [ProductId] uniqueidentifier not null,\n [CatalogId] uniqueidentifier not null,\n [TemplateId] uniqueidentifier not null,\n [Number] int not null,\n [Title] nvarchar(255) not null,\n [Slug] nvarchar(255) not null,\n [Content] nvarchar(max) null,\n [Published] bit not null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([ProductId])\n);\ncreate index [CatalogProducts_SiteId_idx] on [CatalogProducts] ([SiteId]);\n\ncreate table [CatalogProductsCategories] (\n [ProductId] uniqueidentifier not null,\n [CategoryId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([ProductId], [CategoryId])\n);\ncreate index [CatalogProductsCategories_SiteId_idx] on [CatalogProductsCategories] ([SiteId]);\n\ncreate table [CatalogProductsTags] (\n [ProductId] uniqueidentifier not null,\n [TagId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([ProductId], [TagId])\n);\ncreate index [CatalogProductsTags_SiteId_idx] on [CatalogProductsTags] ([SiteId]);\n\ncreate table [CatalogTags] (\n [TagId] uniqueidentifier not null,\n [CatalogId] uniqueidentifier not null,\n [Title] nvarchar(255) not null,\n [Slug] nvarchar(255) not null,\n [Content] nvarchar(max) null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TagId])\n);\ncreate index [CatalogTags_SiteId_idx] on [CatalogTags] ([SiteId]);\n\ncreate table [Catalogs] (\n [CatalogId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Title] nvarchar(255) not null,\n [Path] nvarchar(255) not null,\n [Alias] nvarchar(255) not null,\n [Content] nvarchar(max) null,\n [CatalogLayout] nvarchar(100) null,\n [CatalogLayouts] nvarchar(max) null,\n [CatalogFields] nvarchar(max) null,\n [CategoriesLayout] nvarchar(100) null,\n [CategoryLayout] nvarchar(100) null,\n [CategoryLayouts] nvarchar(max) null,\n [CategoryFields] nvarchar(max) null,\n [CategoriesPath] nvarchar(255) null,\n [TagsLayout] nvarchar(100) null,\n [TagLayout] nvarchar(100) null,\n [TagLayouts] nvarchar(max) null,\n [TagFields] nvarchar(max) null,\n [TagsPath] nvarchar(255) null,\n [ProductLayout] nvarchar(100) null,\n [ProductPath] nvarchar(255) null,\n [ProductsPath] nvarchar(255) null,\n [ProductNumberFormat] nvarchar(50) null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [RecentlyViewedEnabled] bit not null,\n [RecentlyViewedStorage] int not null,\n [RecentlyViewedExpires] int null,\n [RecentlyViewedListCapacity] int not null,\n [DefaultCorsPolicy] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([CatalogId])\n);\ncreate index [Catalogs_SiteId_idx] on [Catalogs] ([SiteId]);\n\ncreate table [ContentPageItems] (\n [ItemId] uniqueidentifier not null,\n [PageId] uniqueidentifier null,\n [PostId] uniqueidentifier null,\n [ProductId] uniqueidentifier null,\n [ProjectId] uniqueidentifier null,\n [ContentId] nvarchar(100) not null,\n [Content] nvarchar(max) null,\n [Discriminator] nvarchar(256) null,\n [SiteId] uniqueidentifier not null,\n primary key ([ItemId])\n);\ncreate index [ContentPageItems_SiteId_idx] on [ContentPageItems] ([SiteId]);\n\ncreate table [ContentPageParts] (\n [PageId] uniqueidentifier not null,\n [Alias] nvarchar(256) not null,\n [Title] nvarchar(256) not null,\n [ParentPageId] uniqueidentifier null,\n [Index] int null,\n [PartId] nvarchar(100) null,\n [TemplateName] nvarchar(100) not null,\n [SiteId] uniqueidentifier not null,\n [MetaKeywords] nvarchar(256) null,\n [MetaDescription] nvarchar(256) null,\n [IncludeInSitemap] bit null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [DateCreated] datetime2(3) null,\n [UtcDateCreated] datetime2(3) null,\n [CreatedById] uniqueidentifier null,\n [Discriminator] nvarchar(128) not null,\n primary key ([PageId])\n);\ncreate index [ContentPageParts_SiteId_idx] on [ContentPageParts] ([SiteId]);\n\ncreate table [CustomCategories] (\n [CategoryId] uniqueidentifier not null,\n [TypeId] uniqueidentifier not null,\n [Title] nvarchar(50) not null,\n [Slug] nvarchar(50) not null,\n [Description] nvarchar(256) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [Content] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([CategoryId])\n);\ncreate index [CustomCategories_SiteId_idx] on [CustomCategories] ([SiteId]);\n\ncreate table [CustomCategoryContentPages] (\n [CustomCategory_Id] uniqueidentifier not null,\n [Page_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CustomCategory_Id], [Page_Id])\n);\ncreate index [CustomCategoryContentPages_SiteId_idx] on [CustomCategoryContentPages] ([SiteId]);\n\ncreate table [CustomCategoryPages] (\n [CustomCategory_Id] uniqueidentifier not null,\n [Page_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CustomCategory_Id], [Page_Id])\n);\ncreate index [CustomCategoryPages_SiteId_idx] on [CustomCategoryPages] ([SiteId]);\n\ncreate table [CustomCategoryPosts] (\n [CustomCategory_Id] uniqueidentifier not null,\n [Post_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CustomCategory_Id], [Post_Id])\n);\ncreate index [CustomCategoryPosts_SiteId_idx] on [CustomCategoryPosts] ([SiteId]);\n\ncreate table [CustomCategoryProducts] (\n [CustomCategory_Id] uniqueidentifier not null,\n [Product_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CustomCategory_Id], [Product_Id])\n);\ncreate index [CustomCategoryProducts_SiteId_idx] on [CustomCategoryProducts] ([SiteId]);\n\ncreate table [CustomCategoryProjects] (\n [CustomCategory_Id] uniqueidentifier not null,\n [Project_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CustomCategory_Id], [Project_Id])\n);\ncreate index [CustomCategoryProjects_SiteId_idx] on [CustomCategoryProjects] ([SiteId]);\n\ncreate table [CustomCategoryTypes] (\n [TypeId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [BlogId] uniqueidentifier null,\n [PortfolioId] uniqueidentifier null,\n [StoreId] uniqueidentifier null,\n [Seq] int null,\n [Path] nvarchar(100) null,\n [Title] nvarchar(50) not null,\n [Slug] nvarchar(50) not null,\n [Description] nvarchar(256) null,\n [TemplateName] nvarchar(50) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [Discriminator] nvarchar(50) null,\n [CategoryFields] nvarchar(max) null,\n [Page_SiteId] uniqueidentifier null,\n [CategoryLayouts] nvarchar(max) null,\n [Alias] nvarchar(100) null,\n [CategoryLayout] nvarchar(50) null,\n primary key ([TypeId])\n);\ncreate index [CustomCategoryTypes_SiteId_idx] on [CustomCategoryTypes] ([SiteId]);\n\ncreate table [Domains] (\n [DomainId] uniqueidentifier not null,\n [Name] nvarchar(255) not null,\n [PrefixAction] int not null,\n [Public] bit not null,\n [SiteId] uniqueidentifier not null,\n [ThemeId] uniqueidentifier null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SettingsData] nvarchar(max) null,\n [RobotsTxt] nvarchar(max) null,\n primary key ([DomainId])\n);\ncreate index [Domains_SiteId_idx] on [Domains] ([SiteId]);\n\ncreate table [EmailTemplates] (\n [TemplateId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [LoweredName] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [From] nvarchar(255) null,\n [To] nvarchar(255) null,\n [Subject] nvarchar(255) null,\n [HtmlEnabled] bit not null,\n [PlainText] nvarchar(max) null,\n [Html] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Discriminator] nvarchar(255) null,\n [BlogId] uniqueidentifier null,\n [StoreId] uniqueidentifier null,\n [Cc] nvarchar(255) null,\n [Bcc] nvarchar(255) null,\n [FromDisplayName] nvarchar(255) null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [EmailTemplates_SiteId_idx] on [EmailTemplates] ([SiteId]);\n\ncreate table [FeedPageParams] (\n [ParamId] uniqueidentifier not null,\n [Seq] int not null,\n [Name] nvarchar(50) null,\n [PageId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([ParamId])\n);\ncreate index [FeedPageParams_SiteId_idx] on [FeedPageParams] ([SiteId]);\n\ncreate table [FeedPages] (\n [PageId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Path] nvarchar(100) null,\n [SiteId] uniqueidentifier not null,\n [Slug] nvarchar(50) null,\n [ParentPageId] uniqueidentifier null,\n [FeedId] uniqueidentifier not null,\n [TemplateName] nvarchar(50) null,\n [PageContent] nvarchar(max) null,\n [PageNumberParamName] nvarchar(50) null,\n [PageSizeParamName] nvarchar(50) null,\n [PageSize] int null,\n [Level] int not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [Discriminator] nvarchar(128) null,\n [Params] nvarchar(max) null,\n primary key ([PageId])\n);\ncreate index [FeedPages_SiteId_idx] on [FeedPages] ([SiteId]);\n\ncreate table [FeedParams] (\n [ParamId] uniqueidentifier not null,\n [Key] nvarchar(100) not null,\n [Value] nvarchar(max) null,\n [FeedId] uniqueidentifier not null,\n [Liquidizable] bit not null,\n [SiteId] uniqueidentifier not null,\n primary key ([ParamId])\n);\ncreate index [FeedParams_SiteId_idx] on [FeedParams] ([SiteId]);\n\ncreate table [Feeds] (\n [FeedId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [LoweredAlias] nvarchar(100) not null,\n [Content] nvarchar(max) null,\n [FetchedAt] datetime2(3) null,\n [UtcFetchedAt] datetime2(3) null,\n [SiteId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Discriminator] nvarchar(128) not null,\n [FetchInterval] int null,\n primary key ([FeedId])\n);\ncreate index [Feeds_SiteId_idx] on [Feeds] ([SiteId]);\n\ncreate table [Files] (\n [FileId] uniqueidentifier not null,\n [FolderId] uniqueidentifier not null,\n [Filename] nvarchar(100) not null,\n [LoweredFilename] nvarchar(100) not null,\n [ContentType] nvarchar(50) not null,\n [Size] int not null,\n [StorageClient] nvarchar(50) null,\n [StorageFilename] nvarchar(256) not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [Discriminator] nvarchar(128) null,\n [Hash] nvarchar(50) null,\n [SiteId] uniqueidentifier not null,\n primary key ([FileId])\n);\ncreate index [Files_SiteId_idx] on [Files] ([SiteId]);\n\ncreate table [Folders] (\n [FolderId] uniqueidentifier not null,\n [OwnerId] uniqueidentifier null,\n [ImagesFolder_ThemeId] uniqueidentifier null,\n [ScriptsFolder_ThemeId] uniqueidentifier null,\n [StylesheetsFolder_ThemeId] uniqueidentifier null,\n [Path] nvarchar(256) not null,\n [LoweredPath] nvarchar(256) not null,\n [ImageSettingsProviderType] nvarchar(256) null,\n [ImageSettingsProviderParams] nvarchar(256) null,\n [ImageSettings] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [Discriminator] nvarchar(128) null,\n [ImagesFolder_Id] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([FolderId])\n);\ncreate index [Folders_SiteId_idx] on [Folders] ([SiteId]);\n\ncreate table [FormAdministrators] (\n [Form_Id] uniqueidentifier not null,\n [Administrator_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([Form_Id], [Administrator_Id])\n);\ncreate index [FormAdministrators_SiteId_idx] on [FormAdministrators] ([SiteId]);\n\ncreate table [FormRecipients] (\n [RecipientId] uniqueidentifier not null,\n [FormId] uniqueidentifier not null,\n [AdministratorId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([RecipientId])\n);\ncreate index [FormRecipients_SiteId_idx] on [FormRecipients] ([SiteId]);\n\ncreate table [FormSubmissionFields] (\n [FieldId] uniqueidentifier not null,\n [SubmissionId] uniqueidentifier not null,\n [Seq] int not null,\n [Title] nvarchar(100) null,\n [Value] nvarchar(max) null,\n [DataType] int not null,\n [Name] nvarchar(100) null,\n [SiteId] uniqueidentifier not null,\n primary key ([FieldId])\n);\ncreate index [FormSubmissionFields_SiteId_idx] on [FormSubmissionFields] ([SiteId]);\n\ncreate table [FormSubmissionFieldsOld] (\n [FieldId] uniqueidentifier not null,\n [SubmissionId] uniqueidentifier not null,\n [Seq] int not null,\n [Title] nvarchar(100) null,\n [Value] nvarchar(4000) null,\n [DataType] int not null,\n [Name] nvarchar(100) null,\n [SiteId] uniqueidentifier not null,\n primary key ([FieldId])\n);\ncreate index [FormSubmissionFieldsOld_SiteId_idx] on [FormSubmissionFieldsOld] ([SiteId]);\n\ncreate table [FormSubmissions] (\n [SubmissionId] uniqueidentifier not null,\n [FormId] uniqueidentifier not null,\n [Date] datetime2(3) not null,\n [UtcDate] datetime2(3) not null,\n [Number] int not null,\n [IpAddress] nvarchar(100) null,\n [UserAgent] nvarchar(256) null,\n [IsSpam] bit not null,\n [Content] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([SubmissionId])\n);\ncreate index [FormSubmissions_SiteId_idx] on [FormSubmissions] ([SiteId]);\n\ncreate table [FormTemplates] (\n [TemplateId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [ConfirmationEmailTemplate] nvarchar(255) null,\n [SubmissionEmailTemplate] nvarchar(255) null,\n primary key ([TemplateId])\n);\ncreate index [FormTemplates_SiteId_idx] on [FormTemplates] ([SiteId]);\n\ncreate table [Forms] (\n [FormId] uniqueidentifier not null,\n [Name] nvarchar(100) null,\n [Content] nvarchar(max) null,\n [SubmissionAction] int not null,\n [RedirectUrl] nvarchar(256) null,\n [SuccessMessage] nvarchar(256) null,\n [SiteId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Path] nvarchar(256) null,\n [TemplateId] uniqueidentifier null,\n primary key ([FormId])\n);\ncreate index [Forms_SiteId_idx] on [Forms] ([SiteId]);\n\ncreate table [Gallery] (\n [IdGallery] uniqueidentifier not null,\n [OwnerName] nvarchar(50) null,\n [IdOwner] uniqueidentifier null,\n [Name] nvarchar(100) not null,\n [Title] nvarchar(255) null,\n [Description] nvarchar(max) null,\n [OriginalFilenames] bit not null,\n [MaxUploadFileSize] int null,\n [ThumbnailImageSize] nvarchar(20) not null,\n [DefaultImageSize] nvarchar(20) not null,\n [SeqFilenameFormat] nvarchar(50) null,\n [TemplateId] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([IdGallery])\n);\ncreate index [Gallery_SiteId_idx] on [Gallery] ([SiteId]);\n\ncreate table [GalleryImage] (\n [IdImage] uniqueidentifier not null,\n [IdGallery] uniqueidentifier not null,\n [Seq] int not null,\n [Title] nvarchar(255) null,\n [Alt] nvarchar(255) null,\n [Description] nvarchar(max) null,\n [Visible] bit not null,\n [OriginalFilename] nvarchar(255) not null,\n [Author] nvarchar(100) null,\n [Copyright] nvarchar(100) null,\n [StorageClient] nvarchar(255) not null,\n [StorageFilename] nvarchar(255) not null,\n [MimeType] nvarchar(50) not null,\n [Width] int not null,\n [Height] int not null,\n [FileSize] int not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Content] nvarchar(max) null,\n [Hash] nvarchar(50) null,\n [SiteId] uniqueidentifier not null,\n primary key ([IdImage])\n);\ncreate index [GalleryImage_SiteId_idx] on [GalleryImage] ([SiteId]);\n\ncreate table [GalleryImageFile] (\n [IdImage] uniqueidentifier not null,\n [SizeLabel] nvarchar(20) not null,\n [StorageClient] nvarchar(255) not null,\n [StorageFilename] nvarchar(255) not null,\n [StaticLink] nvarchar(255) null,\n [UseStaticLink] bit not null,\n [MimeType] nvarchar(50) not null,\n [Width] int null,\n [Height] int null,\n [FileSize] int null,\n [Original] bit not null,\n [SiteId] uniqueidentifier not null,\n primary key ([IdImage], [SizeLabel])\n);\ncreate index [GalleryImageFile_SiteId_idx] on [GalleryImageFile] ([SiteId]);\n\ncreate table [GalleryImageSize] (\n [IdSize] uniqueidentifier not null,\n [IdGallery] uniqueidentifier not null,\n [Label] nvarchar(20) not null,\n [MaxWidth] int not null,\n [MaxHeight] int not null,\n [Quality] int not null,\n [SiteId] uniqueidentifier not null,\n primary key ([IdSize])\n);\ncreate index [GalleryImageSize_SiteId_idx] on [GalleryImageSize] ([SiteId]);\n\ncreate table [GalleryImageSizeWatermark] (\n [GalleryImageSize_IdSize] uniqueidentifier not null,\n [Watermark_IdWatermark] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([GalleryImageSize_IdSize], [Watermark_IdWatermark])\n);\ncreate index [GalleryImageSizeWatermark_SiteId_idx] on [GalleryImageSizeWatermark] ([SiteId]);\n\ncreate table [GalleryImagesTemplates] (\n [TemplateId] uniqueidentifier not null,\n [Content] nvarchar(max) null,\n [Layouts] nvarchar(max) null,\n [OwnerTemplateId] uniqueidentifier not null,\n [TemplateName] nvarchar(100) not null,\n [FieldName] nvarchar(100) not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Alias] nvarchar(100) null,\n [CustomDefaultLayout] nvarchar(100) null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [GalleryImagesTemplates_SiteId_idx] on [GalleryImagesTemplates] ([SiteId]);\n\ncreate table [InventoryPolicies] (\n [InventoryPolicyId] int not null,\n [Name] nvarchar(100) not null,\n [EnumLabel] nvarchar(30) null,\n primary key ([InventoryPolicyId])\n);\n\ncreate table [Layouts] (\n [LayoutId] uniqueidentifier not null,\n [ThemeId] uniqueidentifier not null,\n [Name] nvarchar(100) null,\n [LoweredName] nvarchar(100) null,\n [Content] nvarchar(max) null,\n [ViewEngineId] int not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [ContentType] nvarchar(50) null,\n [Encoding] nvarchar(50) null,\n [Hash] nvarchar(50) null,\n [SiteId] uniqueidentifier not null,\n primary key ([LayoutId])\n);\ncreate index [Layouts_SiteId_idx] on [Layouts] ([SiteId]);\n\ncreate table [LinkGroups] (\n [GroupId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Slug] nvarchar(100) not null,\n [SiteId] uniqueidentifier not null,\n [TemplateId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([GroupId])\n);\ncreate index [LinkGroups_SiteId_idx] on [LinkGroups] ([SiteId]);\n\ncreate table [LinkTemplates] (\n [TemplateId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Description] nvarchar(1000) null,\n [Content] nvarchar(max) null,\n [Layouts] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Alias] nvarchar(100) null,\n [CustomDefaultLayout] nvarchar(100) null,\n primary key ([TemplateId])\n);\ncreate index [LinkTemplates_SiteId_idx] on [LinkTemplates] ([SiteId]);\n\ncreate table [Links] (\n [LinkId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Slug] nvarchar(100) not null,\n [Url] nvarchar(1000) not null,\n [GroupId] uniqueidentifier not null,\n [Content] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([LinkId])\n);\ncreate index [Links_SiteId_idx] on [Links] ([SiteId]);\n\ncreate table [ModuleProperties] (\n [PropertyId] uniqueidentifier not null,\n [ModuleId] uniqueidentifier not null,\n [PropertyKey] nvarchar(100) not null,\n [PropertyValue] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([PropertyId])\n);\ncreate index [ModuleProperties_SiteId_idx] on [ModuleProperties] ([SiteId]);\n\ncreate table [Modules] (\n [ModuleId] uniqueidentifier not null,\n [TemplateId] uniqueidentifier null,\n [PostId] uniqueidentifier null,\n [Index] int not null,\n [Content] nvarchar(max) null,\n [VisibleInList] bit not null,\n [VisibleInDetails] bit not null,\n [VisibleInFeed] bit not null,\n [Discriminator] nvarchar(128) null,\n [PageId] uniqueidentifier null,\n [Page_TemplateId] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([ModuleId])\n);\ncreate index [Modules_SiteId_idx] on [Modules] ([SiteId]);\n\ncreate table [NumberingCounters] (\n [CounterId] uniqueidentifier not null,\n [TaskId] uniqueidentifier not null,\n [OwnerId] uniqueidentifier not null,\n [Date] datetime2(3) not null,\n [LastNumber] int not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CounterId])\n);\ncreate index [NumberingCounters_SiteId_idx] on [NumberingCounters] ([SiteId]);\n\ncreate table [NumberingTasks] (\n [TaskId] uniqueidentifier not null,\n [Label] nvarchar(255) not null,\n [Name] nvarchar(255) not null,\n [Commentary] nvarchar(4000) null,\n [PeriodTypeId] int not null,\n [MinNumber] int not null,\n [MaxNumber] int not null,\n primary key ([TaskId])\n);\n\ncreate table [PageModuleTemplates] (\n [TemplateId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([TemplateId])\n);\ncreate index [PageModuleTemplates_SiteId_idx] on [PageModuleTemplates] ([SiteId]);\n\ncreate table [PagePartTemplates] (\n [TemplateId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([TemplateId])\n);\ncreate index [PagePartTemplates_SiteId_idx] on [PagePartTemplates] ([SiteId]);\n\ncreate table [PageTemplates] (\n [TemplateId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([TemplateId])\n);\ncreate index [PageTemplates_SiteId_idx] on [PageTemplates] ([SiteId]);\n\ncreate table [Pages] (\n [PageId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Path] nvarchar(256) not null,\n [Title] nvarchar(256) not null,\n [Content] nvarchar(max) null,\n [TemplateId] uniqueidentifier not null,\n [Published] bit not null,\n [DatePublished] datetime2(3) null,\n [UtcDatePublished] datetime2(3) null,\n [IncludeInSitemap] bit not null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [SitemapPriority] decimal(18,2) null,\n [FormId] uniqueidentifier null,\n [ViewsCount] int not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([PageId])\n);\ncreate index [Pages_SiteId_idx] on [Pages] ([SiteId]);\n\ncreate table [PostComments] (\n [CommentId] uniqueidentifier not null,\n [PostId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [AuthorName] nvarchar(256) not null,\n [AuthorEmail] nvarchar(256) not null,\n [Title] nvarchar(256) null,\n [Content] nvarchar(max) not null,\n [ContentType] int null,\n [Published] bit not null,\n [IsSpam] bit not null,\n [IpAddress] nvarchar(20) null,\n [UserAgent] nvarchar(256) null,\n [AuthorUrl] nvarchar(256) null,\n [ReplyOnCommentId] uniqueidentifier null,\n [Level] int not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CommentId])\n);\ncreate index [PostComments_SiteId_idx] on [PostComments] ([SiteId]);\n\ncreate table [PostModuleTemplates] (\n [TemplateId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [Name] nvarchar(50) not null,\n [Description] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Content] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [PostModuleTemplates_SiteId_idx] on [PostModuleTemplates] ([SiteId]);\n\ncreate table [PostTemplates] (\n [TemplateId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [Name] nvarchar(50) not null,\n [Description] nvarchar(max) null,\n [Modules] bit not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Content] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [PostTemplates_SiteId_idx] on [PostTemplates] ([SiteId]);\n\ncreate table [Posts] (\n [PostId] uniqueidentifier not null,\n [BlogId] uniqueidentifier not null,\n [AuthorId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [Number] int not null,\n [Title] nvarchar(256) not null,\n [Excerpt] nvarchar(max) null,\n [ExcerptType] int null,\n [Content] nvarchar(max) null,\n [ContentType] int null,\n [Alias] nvarchar(256) null,\n [Published] bit not null,\n [DatePublished] datetime2(3) null,\n [UtcDatePublished] datetime2(3) null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [ViewsCount] int not null,\n [Rating] decimal(18,2) null,\n [VotesCount] int not null,\n [CommentsAllowed] bit not null,\n [CommentsCount] int not null,\n [ShortUrl] nvarchar(255) null,\n [IncludeInSitemap] bit not null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [SitemapPriority] decimal(18,2) null,\n [TemplateId] uniqueidentifier null,\n [UpdatedById] uniqueidentifier null,\n [CreatedById] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([PostId])\n);\ncreate index [Posts_SiteId_idx] on [Posts] ([SiteId]);\n\ncreate table [ProductPartTemplates] (\n [TemplateId] uniqueidentifier not null,\n [StoreId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [ProductPartTemplates_SiteId_idx] on [ProductPartTemplates] ([SiteId]);\n\ncreate table [ProductProperties] (\n [PropertyId] uniqueidentifier not null,\n [ProductId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Value] nvarchar(max) not null,\n [ValueType] int not null,\n [Description] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([PropertyId])\n);\ncreate index [ProductProperties_SiteId_idx] on [ProductProperties] ([SiteId]);\n\ncreate table [ProductPropertyValues] (\n [ValueId] uniqueidentifier not null,\n [ProductId] uniqueidentifier not null,\n [PropertyId] uniqueidentifier not null,\n [Value] nvarchar(max) null,\n [Description] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([ValueId])\n);\ncreate index [ProductPropertyValues_SiteId_idx] on [ProductPropertyValues] ([SiteId]);\n\ncreate table [ProductReviewRatings] (\n [Id] uniqueidentifier not null,\n [ReviewId] uniqueidentifier not null,\n [RatingId] uniqueidentifier not null,\n [Rating] decimal(18,1) not null,\n [SiteId] uniqueidentifier not null,\n primary key ([Id])\n);\ncreate index [ProductReviewRatings_SiteId_idx] on [ProductReviewRatings] ([SiteId]);\n\ncreate table [ProductReviewVotes] (\n [VoteId] uniqueidentifier not null,\n [ReviewId] uniqueidentifier not null,\n [Helpful] bit not null,\n [Timestamp] datetime2(3) not null,\n [UtcTimestamp] datetime2(3) not null,\n [IpAddress] nvarchar(20) null,\n [UserAgent] nvarchar(256) null,\n [SiteId] uniqueidentifier not null,\n primary key ([VoteId])\n);\ncreate index [ProductReviewVotes_SiteId_idx] on [ProductReviewVotes] ([SiteId]);\n\ncreate table [ProductReviews] (\n [ReviewId] uniqueidentifier not null,\n [ProductId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [AuthorName] nvarchar(256) not null,\n [AuthorEmail] nvarchar(256) not null,\n [Public] bit not null,\n [Rating] decimal(18,1) null,\n [Title] nvarchar(256) null,\n [Pros] nvarchar(max) not null,\n [Cons] nvarchar(max) not null,\n [Notes] nvarchar(max) not null,\n [HelpfulVotesCount] int null,\n [NotHelpfulVotesCount] int null,\n [Published] bit not null,\n [IsSpam] bit not null,\n [IpAddress] nvarchar(20) null,\n [UserAgent] nvarchar(256) null,\n [SiteId] uniqueidentifier not null,\n primary key ([ReviewId])\n);\ncreate index [ProductReviews_SiteId_idx] on [ProductReviews] ([SiteId]);\n\ncreate table [ProductStoreCategories] (\n [Product_Id] uniqueidentifier not null,\n [ProductCategory_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([Product_Id], [ProductCategory_Id])\n);\ncreate index [ProductStoreCategories_SiteId_idx] on [ProductStoreCategories] ([SiteId]);\n\ncreate table [ProductStoreTags] (\n [Product_Id] uniqueidentifier not null,\n [ProductTag_Id] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([Product_Id], [ProductTag_Id])\n);\ncreate index [ProductStoreTags_SiteId_idx] on [ProductStoreTags] ([SiteId]);\n\ncreate table [ProductTypeProperties] (\n [PropertyId] uniqueidentifier not null,\n [CategoryId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [ValueType] int not null,\n [Description] nvarchar(max) null,\n [Main] bit not null,\n [DisplayEmpty] bit not null,\n [Seq] int not null,\n [DateCreated] datetime2(3) null,\n [UtcDateCreated] datetime2(3) null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([PropertyId])\n);\ncreate index [ProductTypeProperties_SiteId_idx] on [ProductTypeProperties] ([SiteId]);\n\ncreate table [ProductTypePropertyCategories] (\n [CategoryId] uniqueidentifier not null,\n [ProductTypeId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Main] bit not null,\n [DisplayEmpty] bit not null,\n [Seq] int not null,\n [DateCreated] datetime2(3) null,\n [UtcDateCreated] datetime2(3) null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([CategoryId])\n);\ncreate index [ProductTypePropertyCategories_SiteId_idx] on [ProductTypePropertyCategories] ([SiteId]);\n\ncreate table [ProductTypeRatings] (\n [RatingId] uniqueidentifier not null,\n [ProductTypeId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Weight] int null,\n [Main] bit not null,\n [DisplayEmpty] bit not null,\n [Seq] int not null,\n [DateCreated] datetime2(3) null,\n [UtcDateCreated] datetime2(3) null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([RatingId])\n);\ncreate index [ProductTypeRatings_SiteId_idx] on [ProductTypeRatings] ([SiteId]);\n\ncreate table [ProductTypes] (\n [TypeId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [StoreId] uniqueidentifier not null,\n [TemplateName] nvarchar(100) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [IntId] int not null,\n [YmlExport] bit not null,\n [ProductPrefix] nvarchar(50) null,\n [Content] nvarchar(max) null,\n [Properties] nvarchar(max) null,\n [ListLayout] nvarchar(100) null,\n [DetailsLayout] nvarchar(100) null,\n [Layouts] nvarchar(max) null,\n [VariantTemplateId] uniqueidentifier not null,\n [Alias] nvarchar(100) null,\n [CustomDefaultLayout] nvarchar(100) null,\n [SiteId] uniqueidentifier not null,\n primary key ([TypeId])\n);\ncreate index [ProductTypes_SiteId_idx] on [ProductTypes] ([SiteId]);\n\ncreate table [ProductVariantTemplates] (\n [TemplateId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Description] nvarchar(1000) null,\n [Content] nvarchar(max) null,\n [Layouts] nvarchar(max) null,\n [StoreId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Alias] nvarchar(100) null,\n [CustomDefaultLayout] nvarchar(100) null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [ProductVariantTemplates_SiteId_idx] on [ProductVariantTemplates] ([SiteId]);\n\ncreate table [ProductVariants] (\n [VariantId] uniqueidentifier not null,\n [ProductId] uniqueidentifier not null,\n [Position] int not null,\n [Title] nvarchar(255) not null,\n [Price] decimal(18,2) null,\n [CompareAtPrice] decimal(18,2) null,\n [InventoryQuantity] int null,\n [InventoryPolicyId] int not null,\n [Sku] nvarchar(50) null,\n [Weight] decimal(18,2) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [IntId] int not null,\n [YmlExport] bit not null,\n [Bid] decimal(18,2) null,\n [Cbid] decimal(18,2) null,\n [VendorCode] nvarchar(50) null,\n [BuyAtStore] bit not null,\n [SelfDelivery] bit not null,\n [Delivery] bit not null,\n [DeliveryPrice] decimal(18,2) null,\n [TemplateId] uniqueidentifier not null,\n [Content] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([VariantId])\n);\ncreate index [ProductVariants_SiteId_idx] on [ProductVariants] ([SiteId]);\n\ncreate table [Products] (\n [ProductId] uniqueidentifier not null,\n [Title] nvarchar(256) not null,\n [ShortDescription] nvarchar(max) null,\n [ShortDescriptionType] int null,\n [Description] nvarchar(max) null,\n [DescriptionType] int null,\n [Kit] nvarchar(max) null,\n [KitType] int null,\n [Slug] nvarchar(256) not null,\n [StoreId] uniqueidentifier not null,\n [TypeId] uniqueidentifier not null,\n [VendorId] uniqueidentifier null,\n [Published] bit not null,\n [Rating] decimal(18,2) null,\n [VotesCount] int null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [TemplateName] nvarchar(100) null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [CountryOfOrigin] nvarchar(50) null,\n [Content] nvarchar(max) null,\n [Number] int not null,\n [SiteId] uniqueidentifier not null,\n primary key ([ProductId])\n);\ncreate index [Products_SiteId_idx] on [Products] ([SiteId]);\n\ncreate table [Redirections] (\n [RedirectionId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Seq] int not null,\n [UrlDetection] bit not null,\n [TargetUrl] nvarchar(256) null,\n [SourceType] int not null,\n [Regex] bit not null,\n [IgnoreCase] bit not null,\n [Action] int not null,\n [DestinationUrl] nvarchar(256) null,\n [Permanent] bit not null,\n [ThemeId] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [BrowserDetection] bit not null,\n [BrowserName] nvarchar(100) null,\n [BrowserVersion] nvarchar(50) null,\n [BrowserMajorVersion] int null,\n [BrowserMinorVersion] decimal(18,6) null,\n [BrowserType] nvarchar(100) null,\n [BrowserLayoutEngine] nvarchar(100) null,\n [BrowserPlatform] nvarchar(100) null,\n [BrowserScreenPixelsWidth] int null,\n [BrowserScreenPixelsHeight] int null,\n [MobileDeviceDetection] bit not null,\n [IsMobileDevice] bit not null,\n [MobileDeviceModel] nvarchar(100) null,\n [MobileDeviceManufacturer] nvarchar(100) null,\n [DeviceTypeDetection] bit not null,\n [DeviceIsDesktop] bit not null,\n [DeviceIsTablet] bit not null,\n [DeviceIsConsole] bit not null,\n [DeviceIsTV] bit not null,\n [DeviceIsMobile] bit not null,\n [DeviceIsCrawler] bit not null,\n [QueryStringParamName] nvarchar(50) null,\n [CookieName] nvarchar(50) null,\n [CookieExpires] int null,\n [IgnoreOptions] bit not null,\n primary key ([RedirectionId])\n);\ncreate index [Redirections_SiteId_idx] on [Redirections] ([SiteId]);\n\ncreate table [RelatedPosts] (\n [PostId] uniqueidentifier not null,\n [RelatedPostId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([PostId], [RelatedPostId])\n);\ncreate index [RelatedPosts_SiteId_idx] on [RelatedPosts] ([SiteId]);\n\ncreate table [ReviewItemTemplates] (\n [ItemTemplateId] uniqueidentifier not null,\n [ReviewTemplateId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Type] nvarchar(256) not null,\n [Path] nvarchar(256) not null,\n [SubmissionAction] int not null,\n [RedirectUrl] nvarchar(256) null,\n [SuccessMessage] nvarchar(256) null,\n [EmailRecipients] nvarchar(2000) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([ItemTemplateId])\n);\ncreate index [ReviewItemTemplates_SiteId_idx] on [ReviewItemTemplates] ([SiteId]);\n\ncreate table [ReviewRatingTemplates] (\n [TemplateId] uniqueidentifier not null,\n [ReviewTemplateId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Weight] int null,\n [Seq] int not null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [ReviewRatingTemplates_SiteId_idx] on [ReviewRatingTemplates] ([SiteId]);\n\ncreate table [ReviewRatings] (\n [RatingId] uniqueidentifier not null,\n [ReviewId] uniqueidentifier not null,\n [RatingTemplateId] uniqueidentifier not null,\n [Value] decimal(18,2) not null,\n [SiteId] uniqueidentifier not null,\n primary key ([RatingId])\n);\ncreate index [ReviewRatings_SiteId_idx] on [ReviewRatings] ([SiteId]);\n\ncreate table [ReviewTemplates] (\n [TemplateId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(100) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([TemplateId])\n);\ncreate index [ReviewTemplates_SiteId_idx] on [ReviewTemplates] ([SiteId]);\n\ncreate table [ReviewVotes] (\n [VoteId] uniqueidentifier not null,\n [ReviewId] uniqueidentifier not null,\n [Helpful] bit not null,\n [Timestamp] datetime2(3) not null,\n [UtcTimestamp] datetime2(3) not null,\n [IpAddress] nvarchar(20) null,\n [UserAgent] nvarchar(256) null,\n [Referer] nvarchar(2000) null,\n [SiteId] uniqueidentifier not null,\n primary key ([VoteId])\n);\ncreate index [ReviewVotes_SiteId_idx] on [ReviewVotes] ([SiteId]);\n\ncreate table [Reviews] (\n [ReviewId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [ItemType] nvarchar(50) not null,\n [ItemId] uniqueidentifier not null,\n [TemplateId] uniqueidentifier not null,\n [ReviewerName] nvarchar(256) null,\n [ReviewerEmail] nvarchar(256) null,\n [Public] bit not null,\n [Rating] decimal(18,2) null,\n [Summary] nvarchar(256) null,\n [Details] nvarchar(max) null,\n [Pros] nvarchar(max) null,\n [Cons] nvarchar(max) null,\n [Fields] nvarchar(max) null,\n [HelpfulVotesCount] int null,\n [NotHelpfulVotesCount] int null,\n [Published] bit not null,\n [DatePublished] datetime2(3) null,\n [UtcDatePublished] datetime2(3) null,\n [IsDublicate] bit not null,\n [IsSpam] bit not null,\n [IpAddress] nvarchar(20) null,\n [UserAgent] nvarchar(256) null,\n [Referer] nvarchar(2000) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n primary key ([ReviewId])\n);\ncreate index [Reviews_SiteId_idx] on [Reviews] ([SiteId]);\n\ncreate table [SiteSettings] (\n [SettingId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Key] nvarchar(100) not null,\n [Value] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n primary key ([SettingId])\n);\ncreate index [SiteSettings_SiteId_idx] on [SiteSettings] ([SiteId]);\n\ncreate table [Sites] (\n [SiteId] uniqueidentifier not null,\n [AccountId] uniqueidentifier not null,\n [Title] nvarchar(100) null,\n [Alias] nvarchar(100) null,\n [LoweredAlias] nvarchar(100) null,\n [PrimaryDomain] nvarchar(100) null,\n [TimeOffset] nvarchar(100) null,\n [Culture] nvarchar(50) null,\n [MultiCultural] bit not null default 0,\n [Cultures] nvarchar(max) null,\n [ActiveThemeId] uniqueidentifier null,\n [RobotsTxt] nvarchar(max) null,\n [Live] bit not null,\n [Production] bit not null,\n [Password] nvarchar(20) null,\n [PrefixAction] int null,\n [PagerSlug] nvarchar(50) null,\n [SettingsData] nvarchar(max) null,\n [SettingsTemplate] nvarchar(max) null,\n [DomainSettingsTemplate] nvarchar(max) null,\n [DateCreated] datetime2(3) not null default sysdatetime(),\n [UtcDateCreated] datetime2(3) not null default sysdatetime(),\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SearchAnalyzer] nvarchar(50) null,\n [SearchIndexCreationTimestamp] datetime2(3) null,\n [DefaultContentType] nvarchar(50) null,\n [DefaultEncoding] nvarchar(50) null,\n [DefaultPageName] nvarchar(50) null,\n [DefaultExtension] nvarchar(50) null,\n [NewTemplates] bit not null default 0,\n [CachingOptions] nvarchar(max) null,\n [EnableCors] bit not null default 0,\n [DefaultCorsPolicy] nvarchar(max) null,\n [ContentCacheOptions] nvarchar(max) null,\n [Writable] bit not null default 1,\n primary key ([SiteId])\n);\n\ncreate table [StaticPages] (\n [PageId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Path] nvarchar(256) not null,\n [Content] nvarchar(max) null,\n [ContentType] nvarchar(50) null,\n [Encoding] nvarchar(50) null,\n [Published] bit not null,\n [DatePublished] datetime2(3) null,\n [UtcDatePublished] datetime2(3) null,\n [IncludeInSitemap] bit not null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [SitemapPriority] decimal(18,2) null,\n [ViewsCount] int not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([PageId])\n);\ncreate index [StaticPages_SiteId_idx] on [StaticPages] ([SiteId]);\n\ncreate table [StoreAdministrators] (\n [StoreAdministratorId] uniqueidentifier not null,\n [StoreId] uniqueidentifier not null,\n [AdministratorId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([StoreAdministratorId])\n);\ncreate index [StoreAdministrators_SiteId_idx] on [StoreAdministrators] ([SiteId]);\n\ncreate table [StoreCategories] (\n [CategoryId] uniqueidentifier not null,\n [Title] nvarchar(256) not null,\n [Description] nvarchar(max) null,\n [DescriptionType] int null,\n [Slug] nvarchar(256) not null,\n [Content] nvarchar(max) null,\n [StoreId] uniqueidentifier not null,\n [DateCreated] datetime2(3) null,\n [UtcDateCreated] datetime2(3) null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier null,\n [UpdatedById] uniqueidentifier null,\n [Criteria] nvarchar(256) null,\n [SortOrder] nvarchar(256) null,\n [TemplateName] nvarchar(100) null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [Discriminator] nvarchar(128) not null,\n [SiteId] uniqueidentifier not null,\n primary key ([CategoryId])\n);\ncreate index [StoreCategories_SiteId_idx] on [StoreCategories] ([SiteId]);\n\ncreate table [StorePartTemplates] (\n [TemplateId] uniqueidentifier not null,\n [StoreId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Alias] nvarchar(100) not null,\n [Description] nvarchar(max) null,\n [Content] nvarchar(max) null,\n [CustomDefaultLayout] nvarchar(50) null,\n [Layouts] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TemplateId])\n);\ncreate index [StorePartTemplates_SiteId_idx] on [StorePartTemplates] ([SiteId]);\n\ncreate table [StoreTags] (\n [TagId] uniqueidentifier not null,\n [Title] nvarchar(50) not null,\n [Slug] nvarchar(50) not null,\n [Content] nvarchar(max) null,\n [StoreId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([TagId])\n);\ncreate index [StoreTags_SiteId_idx] on [StoreTags] ([SiteId]);\n\ncreate table [StoreVendors] (\n [VendorId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Slug] nvarchar(100) not null,\n [Content] nvarchar(max) null,\n [StoreId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([VendorId])\n);\ncreate index [StoreVendors_SiteId_idx] on [StoreVendors] ([SiteId]);\n\ncreate table [Stores] (\n [StoreId] uniqueidentifier not null,\n [Title] nvarchar(256) not null,\n [Path] nvarchar(256) not null,\n [SiteId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [IncludeInSitemap] bit not null,\n [SitemapPriority] decimal(18,2) null,\n [SitemapLastUpdatedTime] datetime2(3) null,\n [SitemapChangeFrequency] nvarchar(20) null,\n [Content] nvarchar(max) null,\n [StoreLayout] nvarchar(255) null,\n [CategoryLayout] nvarchar(255) null,\n [SmartCategoryLayout] nvarchar(255) null,\n [TagLayout] nvarchar(255) null,\n [VendorLayout] nvarchar(255) null,\n [CategoriesLayout] nvarchar(255) null,\n [SmartCategoriesLayout] nvarchar(255) null,\n [TagsLayout] nvarchar(255) null,\n [VendorsLayout] nvarchar(255) null,\n [StoreFields] nvarchar(max) null,\n [CategoryFields] nvarchar(max) null,\n [SmartCategoryFields] nvarchar(max) null,\n [TagFields] nvarchar(max) null,\n [VendorFields] nvarchar(max) null,\n [CategoriesPath] nvarchar(255) null,\n [TagsPath] nvarchar(255) null,\n [VendorsPath] nvarchar(255) null,\n [ProductsPath] nvarchar(255) null,\n [SettingsData] nvarchar(max) null,\n [SettingsTemplate] nvarchar(max) null,\n [StoreLayouts] nvarchar(max) null,\n [CategoryLayouts] nvarchar(max) null,\n [SmartCategoryLayouts] nvarchar(max) null,\n [TagLayouts] nvarchar(max) null,\n [VendorLayouts] nvarchar(max) null,\n [ProductLayout] nvarchar(255) null,\n [ProductPath] nvarchar(255) null,\n [ProductNumberFormat] nvarchar(50) null,\n [RecentlyViewedEnabled] bit not null,\n [RecentlyViewedStorage] int not null,\n [RecentlyViewedExpires] int null,\n [RecentlyViewedListCapacity] int not null,\n [Alias] nvarchar(100) null,\n [DefaultCorsPolicy] nvarchar(max) null,\n primary key ([StoreId])\n);\ncreate index [Stores_SiteId_idx] on [Stores] ([SiteId]);\n\ncreate table [TableRecordPartTemplates] (\n [TemplateId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Description] nvarchar(1000) null,\n [Content] nvarchar(max) null,\n [Layouts] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Alias] nvarchar(100) null,\n [CustomDefaultLayout] nvarchar(100) null,\n primary key ([TemplateId])\n);\ncreate index [TableRecordPartTemplates_SiteId_idx] on [TableRecordPartTemplates] ([SiteId]);\n\ncreate table [TableRecords] (\n [RecordId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Slug] nvarchar(100) not null,\n [TableId] uniqueidentifier not null,\n [Content] nvarchar(max) null,\n [Published] bit not null,\n [DatePublished] datetime2(3) null,\n [UtcDatePublished] datetime2(3) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [SiteId] uniqueidentifier not null,\n primary key ([RecordId])\n);\ncreate index [TableRecords_SiteId_idx] on [TableRecords] ([SiteId]);\n\ncreate table [TableTemplates] (\n [TemplateId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Description] nvarchar(1000) null,\n [Content] nvarchar(max) null,\n [Layouts] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Alias] nvarchar(100) null,\n [CustomDefaultLayout] nvarchar(100) null,\n primary key ([TemplateId])\n);\ncreate index [TableTemplates_SiteId_idx] on [TableTemplates] ([SiteId]);\n\ncreate table [Tables] (\n [TableId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Slug] nvarchar(100) not null,\n [SiteId] uniqueidentifier not null,\n [TemplateId] uniqueidentifier not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n primary key ([TableId])\n);\ncreate index [Tables_SiteId_idx] on [Tables] ([SiteId]);\n\ncreate table [Themes] (\n [ThemeId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [ViewEngineId] int not null,\n [SiteId] uniqueidentifier not null,\n [ImageSizes] nvarchar(max) null,\n [SettingsData] nvarchar(max) null,\n [SettingsMarkup] nvarchar(max) null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [ParentThemeId] uniqueidentifier null,\n primary key ([ThemeId])\n);\ncreate index [Themes_SiteId_idx] on [Themes] ([SiteId]);\n\ncreate table [UploadCacheItems] (\n [ItemId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Filename] nvarchar(100) not null,\n [StorageClient] nvarchar(255) not null,\n [StorageFilename] nvarchar(255) not null,\n [MediaType] nvarchar(50) not null,\n [FileSize] bigint not null,\n [UtcDateCreated] datetime2(3) not null,\n primary key ([ItemId])\n);\ncreate index [UploadCacheItems_SiteId_idx] on [UploadCacheItems] ([SiteId]);\n\ncreate table [Urls] (\n [UrlId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [OriginalUrl] nvarchar(1024) not null,\n [ShortUrl] nvarchar(1024) not null,\n primary key ([UrlId])\n);\ncreate index [Urls_SiteId_idx] on [Urls] ([SiteId]);\n\ncreate table [Votes] (\n [VoteId] uniqueidentifier not null,\n [PostId] uniqueidentifier not null,\n [Rating] decimal(18,2) not null,\n [Timestamp] datetime2(3) not null,\n [UtcTimestamp] datetime2(3) not null,\n [IpAddress] nvarchar(20) null,\n [UserAgent] nvarchar(256) null,\n [SiteId] uniqueidentifier not null,\n primary key ([VoteId])\n);\ncreate index [Votes_SiteId_idx] on [Votes] ([SiteId]);\n\ncreate table [Watermark] (\n [IdWatermark] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [HorizontalAlign] nvarchar(20) null,\n [VerticalAlign] nvarchar(20) null,\n [Opacity] int null,\n [Padding] int null,\n [IdGallery] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n primary key ([IdWatermark])\n);\ncreate index [Watermark_SiteId_idx] on [Watermark] ([SiteId]);\n\ncreate table [Watermark_ImageWatermark] (\n [IdWatermark] uniqueidentifier not null,\n [FilePath] nvarchar(256) not null,\n [Width] int null,\n [Height] int null,\n [SiteId] uniqueidentifier not null,\n primary key ([IdWatermark])\n);\ncreate index [Watermark_ImageWatermark_SiteId_idx] on [Watermark_ImageWatermark] ([SiteId]);\n\ncreate table [Watermark_TextWatermark] (\n [IdWatermark] uniqueidentifier not null,\n [Text] nvarchar(256) not null,\n [FontColor] nvarchar(20) null,\n [FontSize] int null,\n [FontStyle] nvarchar(20) null,\n [FontFamily] nvarchar(50) null,\n [SiteId] uniqueidentifier not null,\n primary key ([IdWatermark])\n);\ncreate index [Watermark_TextWatermark_SiteId_idx] on [Watermark_TextWatermark] ([SiteId]);\n\ncreate table [WidgetProperties] (\n [PropertyId] uniqueidentifier not null,\n [WidgetId] uniqueidentifier not null,\n [PropertyKey] nvarchar(100) not null,\n [PropertyValue] nvarchar(max) null,\n [SiteId] uniqueidentifier not null,\n primary key ([PropertyId])\n);\ncreate index [WidgetProperties_SiteId_idx] on [WidgetProperties] ([SiteId]);\n\ncreate table [Widgets] (\n [WidgetId] uniqueidentifier not null,\n [SiteId] uniqueidentifier not null,\n [Title] nvarchar(100) not null,\n [Handle] nvarchar(100) not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [Discriminator] nvarchar(128) null,\n primary key ([WidgetId])\n);\ncreate index [Widgets_SiteId_idx] on [Widgets] ([SiteId]);\n\ncreate table [_Modules] (\n [ModuleId] uniqueidentifier not null,\n [OwnerName] nvarchar(50) not null,\n [OwnerId] uniqueidentifier not null,\n [Seq] int not null,\n [VisibleInList] bit not null,\n [VisibleInDetails] bit not null,\n [VisibleInFeed] bit not null,\n [CssClasses] nvarchar(255) null,\n [HtmlAttrubutes] nvarchar(max) null,\n [Published] bit not null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [CreatedById] uniqueidentifier not null,\n [UpdatedById] uniqueidentifier null,\n [Discriminator] nvarchar(128) null,\n [SiteId] uniqueidentifier not null,\n primary key ([ModuleId])\n);\ncreate index [_Modules_SiteId_idx] on [_Modules] ([SiteId]);\n\ncreate table [_Templates] (\n [TemplateId] uniqueidentifier not null,\n [Name] nvarchar(100) not null,\n [Content] nvarchar(max) null,\n [Shared] bit null,\n [SiteId] uniqueidentifier not null,\n [FormId] uniqueidentifier null,\n [DateCreated] datetime2(3) not null,\n [UtcDateCreated] datetime2(3) not null,\n [CreatedById] uniqueidentifier not null,\n [DateUpdated] datetime2(3) null,\n [UtcDateUpdated] datetime2(3) null,\n [UpdatedById] uniqueidentifier null,\n [Post_BlogId] uniqueidentifier null,\n [Module_BlogId] uniqueidentifier null,\n [Part_BlogId] uniqueidentifier null,\n [Part_SiteId] uniqueidentifier null,\n [Product_StoreId] uniqueidentifier null,\n [Part_StoreId] uniqueidentifier null,\n [Description] nvarchar(max) null,\n [Modules] bit null,\n [ListLayout] nvarchar(100) null,\n [DetailsLayout] nvarchar(100) null,\n [FeedLayout] nvarchar(100) null,\n [Discriminator] nvarchar(255) null,\n [Page_SiteId] uniqueidentifier null,\n [PagePart_SiteId] uniqueidentifier null,\n [Form_SiteId] uniqueidentifier null,\n [Layouts] nvarchar(max) null,\n [PageModule_SiteId] uniqueidentifier null,\n [Alias] nvarchar(100) null,\n [CustomDefaultLayout] nvarchar(100) null,\n primary key ([TemplateId])\n);\ncreate index [_Templates_SiteId_idx] on [_Templates] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [AdministratorAccounts] add constraint [FK_AdministratorAccounts_Accounts_Account_Id] foreign key ([Account_Id]) references [Accounts] ([AccountId]);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [AdministratorBlogs] add constraint [FK_AdministratorBlogs_Blogs_Blog_Id] foreign key ([Blog_Id]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [AdministratorSites] add constraint [FK_AdministratorSites_Sites_Site_Id] foreign key ([Site_Id]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [AdministratorStores] add constraint [FK_AdministratorStores_Stores_Store_Id] foreign key ([Store_Id]) references [Stores] ([StoreId]);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [BlackList] add constraint [FK_BlackList_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [BlogAuthors] add constraint [FK_BlogAuthors_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [BlogCategories] add constraint [FK_BlogCategories_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [BlogCategoryPosts] add constraint [FK_BlogCategoryPosts_BlogCategories_BlogCategory_Id] foreign key ([BlogCategory_Id]) references [BlogCategories] ([CategoryId]);\nalter table [BlogCategoryPosts] add constraint [FK_BlogCategoryPosts_Posts_Post_Id_2] foreign key ([Post_Id]) references [Posts] ([PostId]);\n\nalter table [BlogPostModuleTemplates] add constraint [FK_BlogPostModuleTemplates_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n\nalter table [BlogPostPartTemplates] add constraint [FK_BlogPostPartTemplates_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n\nalter table [BlogPostTemplates] add constraint [FK_BlogPostTemplates_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n\nalter table [BlogTagPosts] add constraint [FK_BlogTagPosts_BlogTags_BlogTag_Id] foreign key ([BlogTag_Id]) references [BlogTags] ([TagId]);\nalter table [BlogTagPosts] add constraint [FK_BlogTagPosts_Posts_Post_Id_2] foreign key ([Post_Id]) references [Posts] ([PostId]);\n\nalter table [BlogTags] add constraint [FK_BlogTags_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [CatalogCategories] add constraint [FK_CatalogCategories_Catalogs_CatalogId] foreign key ([CatalogId]) references [Catalogs] ([CatalogId]);\n\nalter table [CatalogProductModuleTemplates] add constraint [FK_CatalogProductModuleTemplates_Catalogs_CatalogId] foreign key ([CatalogId]) references [Catalogs] ([CatalogId]);\n\nalter table [CatalogProductPartTemplates] add constraint [FK_CatalogProductPartTemplates_Catalogs_CatalogId] foreign key ([CatalogId]) references [Catalogs] ([CatalogId]);\n\nalter table [CatalogProductTemplates] add constraint [FK_CatalogProductTemplates_Catalogs_CatalogId] foreign key ([CatalogId]) references [Catalogs] ([CatalogId]);\n\nalter table [CatalogProducts] add constraint [FK_CatalogProducts_CatalogProductTemplates_TemplateId] foreign key ([TemplateId]) references [CatalogProductTemplates] ([TemplateId]);\nalter table [CatalogProducts] add constraint [FK_CatalogProducts_Catalogs_CatalogId_2] foreign key ([CatalogId]) references [Catalogs] ([CatalogId]);\n-- soft fk: [object Object].ProductId -> Products.ProductId (control-plane link, not enforced in a site database)\n\nalter table [CatalogProductsCategories] add constraint [FK_CatalogProductsCategories_CatalogCategories_CategoryId] foreign key ([CategoryId]) references [CatalogCategories] ([CategoryId]);\nalter table [CatalogProductsCategories] add constraint [FK_CatalogProductsCategories_CatalogProducts_ProductId_2] foreign key ([ProductId]) references [CatalogProducts] ([ProductId]);\n\nalter table [CatalogProductsTags] add constraint [FK_CatalogProductsTags_CatalogProducts_ProductId] foreign key ([ProductId]) references [CatalogProducts] ([ProductId]);\nalter table [CatalogProductsTags] add constraint [FK_CatalogProductsTags_CatalogTags_TagId_2] foreign key ([TagId]) references [CatalogTags] ([TagId]);\n\nalter table [CatalogTags] add constraint [FK_CatalogTags_Catalogs_CatalogId] foreign key ([CatalogId]) references [Catalogs] ([CatalogId]);\n\nalter table [ContentPageItems] add constraint [FK_ContentPageItems_Posts_PostId] foreign key ([PostId]) references [Posts] ([PostId]);\nalter table [ContentPageItems] add constraint [FK_ContentPageItems_Products_ProductId_2] foreign key ([ProductId]) references [Products] ([ProductId]);\nalter table [ContentPageItems] add constraint [FK_ContentPageItems_ContentPageParts_PageId_3] foreign key ([PageId]) references [ContentPageParts] ([PageId]);\n\nalter table [ContentPageParts] add constraint [FK_ContentPageParts_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\nalter table [ContentPageParts] add constraint [FK_ContentPageParts_ContentPageParts_ParentPageId_2] foreign key ([ParentPageId]) references [ContentPageParts] ([PageId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table [CustomCategories] add constraint [FK_CustomCategories_CustomCategoryTypes_TypeId] foreign key ([TypeId]) references [CustomCategoryTypes] ([TypeId]);\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [CustomCategoryContentPages] add constraint [FK_CustomCategoryContentPages_ContentPageParts_Page_Id] foreign key ([Page_Id]) references [ContentPageParts] ([PageId]);\nalter table [CustomCategoryContentPages] add constraint [FK_CustomCategoryContentPages_CustomCategories_CustomCa_1awem78] foreign key ([CustomCategory_Id]) references [CustomCategories] ([CategoryId]);\n\nalter table [CustomCategoryPages] add constraint [FK_CustomCategoryPages_CustomCategories_CustomCategory_Id] foreign key ([CustomCategory_Id]) references [CustomCategories] ([CategoryId]);\nalter table [CustomCategoryPages] add constraint [FK_CustomCategoryPages_Pages_Page_Id_2] foreign key ([Page_Id]) references [Pages] ([PageId]);\n\nalter table [CustomCategoryPosts] add constraint [FK_CustomCategoryPosts_CustomCategories_CustomCategory_Id] foreign key ([CustomCategory_Id]) references [CustomCategories] ([CategoryId]);\nalter table [CustomCategoryPosts] add constraint [FK_CustomCategoryPosts_Posts_Post_Id_2] foreign key ([Post_Id]) references [Posts] ([PostId]);\n\nalter table [CustomCategoryProducts] add constraint [FK_CustomCategoryProducts_CustomCategories_CustomCategory_Id] foreign key ([CustomCategory_Id]) references [CustomCategories] ([CategoryId]);\nalter table [CustomCategoryProducts] add constraint [FK_CustomCategoryProducts_Products_Product_Id_2] foreign key ([Product_Id]) references [Products] ([ProductId]);\n\nalter table [CustomCategoryProjects] add constraint [FK_CustomCategoryProjects_CustomCategories_CustomCategory_Id] foreign key ([CustomCategory_Id]) references [CustomCategories] ([CategoryId]);\n\nalter table [CustomCategoryTypes] add constraint [FK_CustomCategoryTypes_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\nalter table [CustomCategoryTypes] add constraint [FK_CustomCategoryTypes_Sites_SiteId_2] foreign key ([SiteId]) references [Sites] ([SiteId]);\nalter table [CustomCategoryTypes] add constraint [FK_CustomCategoryTypes_Stores_StoreId_3] foreign key ([StoreId]) references [Stores] ([StoreId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Domains] add constraint [FK_Domains_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\nalter table [Domains] add constraint [FK_Domains_Themes_ThemeId_2] foreign key ([ThemeId]) references [Themes] ([ThemeId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [EmailTemplates] add constraint [FK_EmailTemplates_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\nalter table [EmailTemplates] add constraint [FK_EmailTemplates_Blogs_BlogId_2] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [FeedPageParams] add constraint [FK_FeedPageParams_FeedPages_PageId] foreign key ([PageId]) references [FeedPages] ([PageId]);\n\nalter table [FeedPages] add constraint [FK_FeedPages_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\nalter table [FeedPages] add constraint [FK_FeedPages_Feeds_FeedId_2] foreign key ([FeedId]) references [Feeds] ([FeedId]);\nalter table [FeedPages] add constraint [FK_FeedPages_FeedPages_ParentPageId_3] foreign key ([ParentPageId]) references [FeedPages] ([PageId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table [FeedParams] add constraint [FK_FeedParams_Feeds_FeedId] foreign key ([FeedId]) references [Feeds] ([FeedId]);\n\nalter table [Feeds] add constraint [FK_Feeds_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Files] add constraint [FK_Files_Folders_FolderId] foreign key ([FolderId]) references [Folders] ([FolderId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Folders] add constraint [FK_Folders_Themes_ImagesFolder_ThemeId] foreign key ([ImagesFolder_ThemeId]) references [Themes] ([ThemeId]);\nalter table [Folders] add constraint [FK_Folders_Themes_ScriptsFolder_ThemeId_2] foreign key ([ScriptsFolder_ThemeId]) references [Themes] ([ThemeId]);\nalter table [Folders] add constraint [FK_Folders_Themes_StylesheetsFolder_ThemeId_3] foreign key ([StylesheetsFolder_ThemeId]) references [Themes] ([ThemeId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [FormAdministrators] add constraint [FK_FormAdministrators_Forms_Form_Id] foreign key ([Form_Id]) references [Forms] ([FormId]);\n-- soft fk: [object Object].Administrator_Id -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [FormRecipients] add constraint [FK_FormRecipients_Forms_FormId] foreign key ([FormId]) references [Forms] ([FormId]);\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [FormSubmissionFields] add constraint [FK_FormSubmissionFields_FormSubmissions_SubmissionId] foreign key ([SubmissionId]) references [FormSubmissions] ([SubmissionId]);\n\nalter table [FormSubmissionFieldsOld] add constraint [FK_FormSubmissionFieldsOld_FormSubmissions_SubmissionId] foreign key ([SubmissionId]) references [FormSubmissions] ([SubmissionId]);\n\nalter table [FormSubmissions] add constraint [FK_FormSubmissions_Forms_FormId] foreign key ([FormId]) references [Forms] ([FormId]);\n\nalter table [FormTemplates] add constraint [FK_FormTemplates_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n\nalter table [Forms] add constraint [FK_Forms_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Gallery] add constraint [FK_Gallery_GalleryImagesTemplates_TemplateId] foreign key ([TemplateId]) references [GalleryImagesTemplates] ([TemplateId]);\n\nalter table [GalleryImage] add constraint [FK_GalleryImage_Gallery_IdGallery] foreign key ([IdGallery]) references [Gallery] ([IdGallery]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [GalleryImageFile] add constraint [FK_GalleryImageFile_GalleryImage_IdImage] foreign key ([IdImage]) references [GalleryImage] ([IdImage]);\n\nalter table [GalleryImageSize] add constraint [FK_GalleryImageSize_Gallery_IdGallery] foreign key ([IdGallery]) references [Gallery] ([IdGallery]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Layouts] add constraint [FK_Layouts_Themes_ThemeId] foreign key ([ThemeId]) references [Themes] ([ThemeId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [LinkGroups] add constraint [FK_LinkGroups_LinkTemplates_TemplateId] foreign key ([TemplateId]) references [LinkTemplates] ([TemplateId]);\nalter table [LinkGroups] add constraint [FK_LinkGroups_Sites_SiteId_2] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [LinkTemplates] add constraint [FK_LinkTemplates_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Links] add constraint [FK_Links_LinkGroups_GroupId] foreign key ([GroupId]) references [LinkGroups] ([GroupId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ModuleProperties] add constraint [FK_ModuleProperties__Modules_ModuleId] foreign key ([ModuleId]) references [_Modules] ([ModuleId]);\n\nalter table [Modules] add constraint [FK_Modules_Posts_PostId] foreign key ([PostId]) references [Posts] ([PostId]);\nalter table [Modules] add constraint [FK_Modules_Modules_ModuleId_2] foreign key ([ModuleId]) references [Modules] ([ModuleId]);\nalter table [Modules] add constraint [FK_Modules_Pages_PageId_3] foreign key ([PageId]) references [Pages] ([PageId]);\n-- soft fk: [object Object].TaskId -> NumberingTasks.TaskId (control-plane link, not enforced in a site database)\n\nalter table [PageModuleTemplates] add constraint [FK_PageModuleTemplates_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n\nalter table [PagePartTemplates] add constraint [FK_PagePartTemplates_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n\nalter table [PageTemplates] add constraint [FK_PageTemplates_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n\nalter table [Pages] add constraint [FK_Pages_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\nalter table [Pages] add constraint [FK_Pages_Forms_FormId_2] foreign key ([FormId]) references [Forms] ([FormId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [PostComments] add constraint [FK_PostComments_PostComments_ReplyOnCommentId] foreign key ([ReplyOnCommentId]) references [PostComments] ([CommentId]);\nalter table [PostComments] add constraint [FK_PostComments_Posts_PostId_2] foreign key ([PostId]) references [Posts] ([PostId]);\n\nalter table [PostModuleTemplates] add constraint [FK_PostModuleTemplates_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [PostTemplates] add constraint [FK_PostTemplates_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Posts] add constraint [FK_Posts_Blogs_BlogId] foreign key ([BlogId]) references [Blogs] ([BlogId]);\nalter table [Posts] add constraint [FK_Posts_BlogAuthors_AuthorId_2] foreign key ([AuthorId]) references [BlogAuthors] ([AuthorId]);\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductPartTemplates] add constraint [FK_ProductPartTemplates_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\n\nalter table [ProductProperties] add constraint [FK_ProductProperties_Products_ProductId] foreign key ([ProductId]) references [Products] ([ProductId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductPropertyValues] add constraint [FK_ProductPropertyValues_Products_ProductId] foreign key ([ProductId]) references [Products] ([ProductId]);\nalter table [ProductPropertyValues] add constraint [FK_ProductPropertyValues_ProductTypeProperties_PropertyId_2] foreign key ([PropertyId]) references [ProductTypeProperties] ([PropertyId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductReviewRatings] add constraint [FK_ProductReviewRatings_ProductReviews_ReviewId] foreign key ([ReviewId]) references [ProductReviews] ([ReviewId]);\nalter table [ProductReviewRatings] add constraint [FK_ProductReviewRatings_ProductTypeRatings_RatingId_2] foreign key ([RatingId]) references [ProductTypeRatings] ([RatingId]);\n\nalter table [ProductReviewVotes] add constraint [FK_ProductReviewVotes_ProductReviews_ReviewId] foreign key ([ReviewId]) references [ProductReviews] ([ReviewId]);\n-- soft fk: [object Object].VoteId -> Votes.VoteId (control-plane link, not enforced in a site database)\n\nalter table [ProductReviews] add constraint [FK_ProductReviews_Products_ProductId] foreign key ([ProductId]) references [Products] ([ProductId]);\n-- soft fk: [object Object].ReviewId -> Reviews.ReviewId (control-plane link, not enforced in a site database)\n\nalter table [ProductStoreCategories] add constraint [FK_ProductStoreCategories_StoreCategories_ProductCategory_Id] foreign key ([ProductCategory_Id]) references [StoreCategories] ([CategoryId]);\nalter table [ProductStoreCategories] add constraint [FK_ProductStoreCategories_Products_Product_Id_2] foreign key ([Product_Id]) references [Products] ([ProductId]);\n\nalter table [ProductStoreTags] add constraint [FK_ProductStoreTags_StoreTags_ProductTag_Id] foreign key ([ProductTag_Id]) references [StoreTags] ([TagId]);\nalter table [ProductStoreTags] add constraint [FK_ProductStoreTags_Products_Product_Id_2] foreign key ([Product_Id]) references [Products] ([ProductId]);\n\nalter table [ProductTypeProperties] add constraint [FK_ProductTypeProperties_ProductTypePropertyCategories_C_pu1idu] foreign key ([CategoryId]) references [ProductTypePropertyCategories] ([CategoryId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductTypePropertyCategories] add constraint [FK_ProductTypePropertyCategories_ProductTypes_ProductTypeId] foreign key ([ProductTypeId]) references [ProductTypes] ([TypeId]);\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductTypeRatings] add constraint [FK_ProductTypeRatings_ProductTypes_ProductTypeId] foreign key ([ProductTypeId]) references [ProductTypes] ([TypeId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductTypes] add constraint [FK_ProductTypes_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\nalter table [ProductTypes] add constraint [FK_ProductTypes_ProductVariantTemplates_VariantTemplateId_2] foreign key ([VariantTemplateId]) references [ProductVariantTemplates] ([TemplateId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductVariantTemplates] add constraint [FK_ProductVariantTemplates_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [ProductVariants] add constraint [FK_ProductVariants_Products_ProductId] foreign key ([ProductId]) references [Products] ([ProductId]);\nalter table [ProductVariants] add constraint [FK_ProductVariants_ProductVariantTemplates_TemplateId_2] foreign key ([TemplateId]) references [ProductVariantTemplates] ([TemplateId]);\n-- soft fk: [object Object].InventoryPolicyId -> InventoryPolicies.InventoryPolicyId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Products] add constraint [FK_Products_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\nalter table [Products] add constraint [FK_Products_StoreVendors_VendorId_2] foreign key ([VendorId]) references [StoreVendors] ([VendorId]);\nalter table [Products] add constraint [FK_Products_ProductTypes_TypeId_3] foreign key ([TypeId]) references [ProductTypes] ([TypeId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Redirections] add constraint [FK_Redirections_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\nalter table [Redirections] add constraint [FK_Redirections_Themes_ThemeId_2] foreign key ([ThemeId]) references [Themes] ([ThemeId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [RelatedPosts] add constraint [FK_RelatedPosts_Posts_PostId] foreign key ([PostId]) references [Posts] ([PostId]);\nalter table [RelatedPosts] add constraint [FK_RelatedPosts_Posts_RelatedPostId_2] foreign key ([RelatedPostId]) references [Posts] ([PostId]);\n\nalter table [ReviewItemTemplates] add constraint [FK_ReviewItemTemplates_ReviewTemplates_ReviewTemplateId] foreign key ([ReviewTemplateId]) references [ReviewTemplates] ([TemplateId]);\n\nalter table [ReviewRatingTemplates] add constraint [FK_ReviewRatingTemplates_ReviewTemplates_ReviewTemplateId] foreign key ([ReviewTemplateId]) references [ReviewTemplates] ([TemplateId]);\n\nalter table [ReviewRatings] add constraint [FK_ReviewRatings_ReviewRatingTemplates_RatingTemplateId] foreign key ([RatingTemplateId]) references [ReviewRatingTemplates] ([TemplateId]);\nalter table [ReviewRatings] add constraint [FK_ReviewRatings_Reviews_ReviewId_2] foreign key ([ReviewId]) references [Reviews] ([ReviewId]);\n\nalter table [ReviewVotes] add constraint [FK_ReviewVotes_Reviews_ReviewId] foreign key ([ReviewId]) references [Reviews] ([ReviewId]);\nalter table [ReviewVotes] add constraint [FK_ReviewVotes_Votes_VoteId_2] foreign key ([VoteId]) references [Votes] ([VoteId]);\n\nalter table [Reviews] add constraint [FK_Reviews_ReviewTemplates_TemplateId] foreign key ([TemplateId]) references [ReviewTemplates] ([TemplateId]);\n\nalter table [SiteSettings] add constraint [FK_SiteSettings_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Sites] add constraint [FK_Sites_Accounts_AccountId] foreign key ([AccountId]) references [Accounts] ([AccountId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [StaticPages] add constraint [FK_StaticPages_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].PageId -> Pages.PageId (control-plane link, not enforced in a site database)\n\nalter table [StoreAdministrators] add constraint [FK_StoreAdministrators_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\n-- soft fk: [object Object].AdministratorId -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [StoreCategories] add constraint [FK_StoreCategories_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [StorePartTemplates] add constraint [FK_StorePartTemplates_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\n\nalter table [StoreTags] add constraint [FK_StoreTags_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [StoreVendors] add constraint [FK_StoreVendors_Stores_StoreId] foreign key ([StoreId]) references [Stores] ([StoreId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Stores] add constraint [FK_Stores_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [TableRecordPartTemplates] add constraint [FK_TableRecordPartTemplates_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [TableRecords] add constraint [FK_TableRecords_Tables_TableId] foreign key ([TableId]) references [Tables] ([TableId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [TableTemplates] add constraint [FK_TableTemplates_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Tables] add constraint [FK_Tables_TableTemplates_TemplateId] foreign key ([TemplateId]) references [TableTemplates] ([TemplateId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Themes] add constraint [FK_Themes_Themes_ParentThemeId] foreign key ([ParentThemeId]) references [Themes] ([ThemeId]);\nalter table [Themes] add constraint [FK_Themes_Sites_SiteId_2] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [Urls] add constraint [FK_Urls_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n\nalter table [Votes] add constraint [FK_Votes_Posts_PostId] foreign key ([PostId]) references [Posts] ([PostId]);\n\nalter table [Watermark] add constraint [FK_Watermark_Gallery_IdGallery] foreign key ([IdGallery]) references [Gallery] ([IdGallery]);\n\nalter table [Watermark_ImageWatermark] add constraint [FK_Watermark_ImageWatermark_Watermark_IdWatermark] foreign key ([IdWatermark]) references [Watermark] ([IdWatermark]);\n\nalter table [Watermark_TextWatermark] add constraint [FK_Watermark_TextWatermark_Watermark_IdWatermark] foreign key ([IdWatermark]) references [Watermark] ([IdWatermark]);\n\nalter table [WidgetProperties] add constraint [FK_WidgetProperties_Widgets_WidgetId] foreign key ([WidgetId]) references [Widgets] ([WidgetId]);\n\nalter table [Widgets] add constraint [FK_Widgets_Sites_SiteId] foreign key ([SiteId]) references [Sites] ([SiteId]);\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].CreatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n-- soft fk: [object Object].UpdatedById -> Administrators.AdministratorId (control-plane link, not enforced in a site database)\n\nalter table [_Templates] add constraint [FK__Templates_Blogs_Post_BlogId] foreign key ([Post_BlogId]) references [Blogs] ([BlogId]);\nalter table [_Templates] add constraint [FK__Templates_Blogs_Module_BlogId_2] foreign key ([Module_BlogId]) references [Blogs] ([BlogId]);\nalter table [_Templates] add constraint [FK__Templates_Blogs_Part_BlogId_3] foreign key ([Part_BlogId]) references [Blogs] ([BlogId]);\n-- soft fk: [object Object].FormId -> Forms.FormId (control-plane link, not enforced in a site database)\n";
11
+ export const DDL = { postgres, mariadb, sqlite, mssql };