Initial lookbook implementation
Pinterest-style visual bookmarking app with: - URL metadata extraction (OG/Twitter meta, oEmbed fallback) - Image caching in Postgres with 480px thumbnails - Multi-tag filtering with Ctrl/Cmd for OR mode - Fuzzy tag suggestions and inline tag editing - Browser console auth() with first-use password setup - Brutalist UI with Commit Mono font and Pico CSS - Light/dark mode via browser preference
This commit is contained in:
commit
fc625fb9cf
486 changed files with 195373 additions and 0 deletions
51
vendor/github.com/pressly/goose/v3/redo.go
generated
vendored
Normal file
51
vendor/github.com/pressly/goose/v3/redo.go
generated
vendored
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
package goose
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
)
|
||||
|
||||
// Redo rolls back the most recently applied migration, then runs it again.
|
||||
func Redo(db *sql.DB, dir string, opts ...OptionsFunc) error {
|
||||
ctx := context.Background()
|
||||
return RedoContext(ctx, db, dir, opts...)
|
||||
}
|
||||
|
||||
// RedoContext rolls back the most recently applied migration, then runs it again.
|
||||
func RedoContext(ctx context.Context, db *sql.DB, dir string, opts ...OptionsFunc) error {
|
||||
option := &options{}
|
||||
for _, f := range opts {
|
||||
f(option)
|
||||
}
|
||||
migrations, err := CollectMigrations(dir, minVersion, maxVersion)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var (
|
||||
currentVersion int64
|
||||
)
|
||||
if option.noVersioning {
|
||||
if len(migrations) == 0 {
|
||||
return nil
|
||||
}
|
||||
currentVersion = migrations[len(migrations)-1].Version
|
||||
} else {
|
||||
if currentVersion, err = GetDBVersionContext(ctx, db); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
current, err := migrations.Current(currentVersion)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
current.noVersioning = option.noVersioning
|
||||
|
||||
if err := current.DownContext(ctx, db); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := current.UpContext(ctx, db); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue