Add unified posts database groundwork.
CI / test (pull_request) Successful in 6m18s

Introduce additive post and post-vote tables with an idempotent legacy snapshot migration so the existing application remains compatible during the staged cutover.
This commit is contained in:
2026-08-27 00:00:06 -07:00
parent 418ef93da5
commit 007fcd0991
4 changed files with 335 additions and 0 deletions
+20
View File
@@ -5,6 +5,7 @@
package sqlc
import (
"database/sql"
"time"
)
@@ -16,6 +17,25 @@ type Answer struct {
UpdatedAt string
}
type Post struct {
ID string
ParentID sql.NullString
AuthorID string
Title string
Body string
City string
HuntDate string
Hidden int32
CreatedAt string
UpdatedAt string
}
type PostVote struct {
UserID string
PostID string
Value int32
}
type Question struct {
ID string
AuthorID string