chore(state-store): remove the one-time SQLite import and db_path
Every install serves from Postgres, so the legacyread/legacyimport packages, the archie-state-store import command, the boot gate that refused to serve over unimported SQLite files, and db_path (which only located those files) go. Migration 0010 drops the import_completion table.
This commit is contained in:
1 parent
d61e49b2c9
commit
8c55b5d4e4
65 files changed
+138
-3350
No files matched your search
@@ -1,47 +0,0 @@
|
||||
// Code generated by sqlc. DO NOT EDIT.
|
||||
// versions:
|
||||
// sqlc v1.31.1
|
||||
// source: import.sql
|
||||
|
||||
package postgresdb
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
const importCompleted = `-- name: ImportCompleted :one
|
||||
SELECT EXISTS (SELECT 1 FROM import_completion)
|
||||
`
|
||||
|
||||
func (q *Queries) ImportCompleted(ctx context.Context) (bool, error) {
|
||||
row := q.db.QueryRow(ctx, importCompleted)
|
||||
var exists bool
|
||||
err := row.Scan(&exists)
|
||||
return exists, err
|
||||
}
|
||||
|
||||
const insertFreshInstallCompletion = `-- name: InsertFreshInstallCompletion :exec
|
||||
INSERT INTO import_completion (id, sources, report) VALUES (1, '', 'fresh install: no legacy data')
|
||||
ON CONFLICT (id) DO NOTHING
|
||||
`
|
||||
|
||||
func (q *Queries) InsertFreshInstallCompletion(ctx context.Context) error {
|
||||
_, err := q.db.Exec(ctx, insertFreshInstallCompletion)
|
||||
return err
|
||||
}
|
||||
|
||||
const insertImportCompletion = `-- name: InsertImportCompletion :exec
|
||||
|
||||
INSERT INTO import_completion (id, sources, report) VALUES (1, $1, $2)
|
||||
`
|
||||
|
||||
type InsertImportCompletionParams struct {
|
||||
Sources string
|
||||
Report string
|
||||
}
|
||||
|
||||
// The one-time legacy import's completion record.
|
||||
func (q *Queries) InsertImportCompletion(ctx context.Context, arg InsertImportCompletionParams) error {
|
||||
_, err := q.db.Exec(ctx, insertImportCompletion, arg.Sources, arg.Report)
|
||||
return err
|
||||
}
|
||||
@@ -134,13 +134,6 @@ type IdentitySubject struct {
|
||||
BoundAt time.Time
|
||||
}
|
||||
|
||||
type ImportCompletion struct {
|
||||
ID int64
|
||||
CompletedAt time.Time
|
||||
Sources string
|
||||
Report string
|
||||
}
|
||||
|
||||
type Mapping struct {
|
||||
ID string
|
||||
Name string
|
||||
|
||||
Reference in new issue
Block a user