ASP Classic blog framework - BrainOrdure
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

32 行
1.2KB

  1. <%
  2. '=======================================================================================================================
  3. ' MIGRATION: create_posts_table
  4. '=======================================================================================================================
  5. Sub Migration_Up(migration)
  6. migration.CreateTable "Posts", _
  7. "PostID COUNTER CONSTRAINT PK_Posts PRIMARY KEY, " & _
  8. "Title TEXT(200) NOT NULL, " & _
  9. "Slug TEXT(200) NOT NULL, " & _
  10. "Summary MEMO, " & _
  11. "Body MEMO, " & _
  12. "CategoryID LONG, " & _
  13. "IsPublished SMALLINT NOT NULL, " & _
  14. "PublishedDate DATETIME, " & _
  15. "CreatedDate DATETIME NOT NULL, " & _
  16. "UpdatedDate DATETIME"
  17. migration.ExecuteSQL "UPDATE Posts SET IsPublished = 0 WHERE IsPublished IS NULL"
  18. migration.CreateIndex "IX_Posts_Slug", "Posts", "Slug"
  19. migration.CreateIndex "IX_Posts_CategoryID", "Posts", "CategoryID"
  20. migration.CreateIndex "IX_Posts_IsPublished", "Posts", "IsPublished"
  21. End Sub
  22. Sub Migration_Down(migration)
  23. migration.DropIndex "IX_Posts_IsPublished", "Posts"
  24. migration.DropIndex "IX_Posts_CategoryID", "Posts"
  25. migration.DropIndex "IX_Posts_Slug", "Posts"
  26. migration.DropTable "Posts"
  27. End Sub
  28. %>

Powered by TurnKey Linux.