ASP Classic blog framework - BrainOrdure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
1.1KB

  1. <%
  2. '=======================================================================================================================
  3. ' MIGRATION: create_comments_table
  4. '=======================================================================================================================
  5. Sub Migration_Up(migration)
  6. migration.CreateTable "Comments", _
  7. "CommentID COUNTER CONSTRAINT PK_Comments PRIMARY KEY, " & _
  8. "PostID LONG NOT NULL, " & _
  9. "AuthorName TEXT(200) NOT NULL, " & _
  10. "AuthorEmail TEXT(200), " & _
  11. "Body MEMO NOT NULL, " & _
  12. "IsApproved SMALLINT NOT NULL, " & _
  13. "CreatedDate DATETIME NOT NULL"
  14. migration.ExecuteSQL "UPDATE Comments SET IsApproved = 0 WHERE IsApproved IS NULL"
  15. migration.CreateIndex "IX_Comments_PostID", "Comments", "PostID"
  16. migration.CreateIndex "IX_Comments_IsApproved", "Comments", "IsApproved"
  17. End Sub
  18. Sub Migration_Down(migration)
  19. migration.DropIndex "IX_Comments_IsApproved", "Comments"
  20. migration.DropIndex "IX_Comments_PostID", "Comments"
  21. migration.DropTable "Comments"
  22. End Sub
  23. %>

Powered by TurnKey Linux.