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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user