ASP Classic blog framework - BrainOrdure
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

27 Zeilen
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.