refactor(auth): remove obsolete project restriction APIs
- Remove legacy project restriction schema and helpers - Install Python test extras in CI - Update the quality report status
This commit is contained in:
1 parent
f7819904b9
commit
add64ff180
10 files changed
+32
-160
No files matched your search
@@ -17,8 +17,8 @@ import "context"
|
||||
//
|
||||
// Each per-service backend additionally runs its own migration for tables
|
||||
// it exclusively owns (e.g. ContentScanner's media_worker_jobs/
|
||||
// media_analysis_tasks, CraftStudio's generated_media/downloaded_media,
|
||||
// ProjectConfigurator's mount_paths) - those are NOT run here.
|
||||
// media_analysis_tasks, CraftStudio's generated_media/downloaded_media) -
|
||||
// those are NOT run here.
|
||||
func (c *Core) Migrate(ctx context.Context) error {
|
||||
for _, statement := range migrationStatements {
|
||||
if _, err := c.db.Exec(ctx, statement); err != nil {
|
||||
@@ -67,6 +67,7 @@ var migrationStatements = []string{
|
||||
file_path TEXT,
|
||||
original_filename TEXT,
|
||||
active BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
content_scanner_processed BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
metadata JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
width INT,
|
||||
height INT,
|
||||
@@ -81,6 +82,7 @@ var migrationStatements = []string{
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
||||
modified_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
)`,
|
||||
`ALTER TABLE media ADD COLUMN IF NOT EXISTS content_scanner_processed BOOLEAN NOT NULL DEFAULT FALSE`,
|
||||
`ALTER TABLE media ADD COLUMN IF NOT EXISTS funscript_action_count INT`,
|
||||
`ALTER TABLE media ADD COLUMN IF NOT EXISTS funscript_avg_speed REAL`,
|
||||
`ALTER TABLE media ADD COLUMN IF NOT EXISTS funscript_max_speed REAL`,
|
||||
|
||||
@@ -255,6 +255,7 @@ func TestMediaStreamAndThumbnailAgainstPostgres(t *testing.T) {
|
||||
|
||||
func TestMediaStatsAndViewsAgainstPostgres(t *testing.T) {
|
||||
h := newDBHarness(t)
|
||||
h.insertMedia(t, "rt-stats", "video", "rt-stats.mp4", true)
|
||||
state := func(token string) map[string]any {
|
||||
return dataOf(t, h.do(http.MethodGet, "/media/state?mediaKey=rt-stats", token, ""))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user