-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: generate multi-image thumbnails for multi-image tweets (#373)
- Loading branch information
1 parent
b855cd0
commit dbc34af
Showing
34 changed files
with
801 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//go:build !test || migrationtest | ||
|
||
package migration | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/jackc/pgx/v4" | ||
) | ||
|
||
func init() { | ||
// The version of this migration | ||
const migrationVersion = 3 | ||
|
||
Register( | ||
migrationVersion, | ||
func(ctx context.Context, tx pgx.Tx) error { | ||
// The Up action of this migration | ||
_, err := tx.Exec(ctx, ` | ||
CREATE TABLE dependent_values ( | ||
key TEXT UNIQUE NOT NULL, | ||
parent_key TEXT NOT NULL, | ||
value bytea NOT NULL, | ||
http_content_type TEXT NOT NULL, | ||
committed BOOLEAN NOT NULL DEFAULT FALSE, | ||
expiration_timestamp TIMESTAMP NOT NULL | ||
); | ||
CREATE INDEX idx_dependent_values_key ON dependent_values(key); | ||
CREATE INDEX idx_dependent_values_parent_entry_key ON dependent_values(parent_key); | ||
CREATE INDEX idx_dependent_values_committed ON dependent_values(committed); | ||
`) | ||
|
||
return err | ||
}, | ||
func(ctx context.Context, tx pgx.Tx) error { | ||
// The Down action of this migration | ||
_, err := tx.Exec(ctx, ` | ||
DROP TABLE dependent_values; | ||
`) | ||
|
||
return err | ||
}, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.