feat: add clean db script

This commit is contained in:
Sam 2023-03-13 23:26:12 +01:00
parent 72b54512aa
commit fb10f29e2b
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
2 changed files with 114 additions and 0 deletions

View file

@ -55,6 +55,11 @@ const (
MaxLinkLength = 256
)
const (
SelfDeleteAfter = 30 * 24 * time.Hour
ModDeleteAfter = 180 * 24 * time.Hour
)
// CreateUser creates a user with the given username.
func (db *DB) CreateUser(ctx context.Context, tx pgx.Tx, username string) (u User, err error) {
// check if the username is valid