Skip to content
Snippets Groups Projects
  • Jamie Tanna's avatar
    858bcfec
    refactor!: remove database anonymisation · 858bcfec
    Jamie Tanna authored
    As noted in #470, the anonymisation feature may have been useful, but
    has not been used.
    
    Although we could keep the feature in, it is regularly _not_ being
    implemented when new repositories are being created, so a user expecting
    the feature to be available will be lulled into a false sense of
    security.
    
    Instead, we should remove the feature.
    
    In `repositorymetadata` we need to still retain a single query, as
    `sqlc` requires at least one query per schema.
    
    Closes #470, #471, #306, #283, #274, #221, #165.
    858bcfec
    History
    refactor!: remove database anonymisation
    Jamie Tanna authored
    As noted in #470, the anonymisation feature may have been useful, but
    has not been used.
    
    Although we could keep the feature in, it is regularly _not_ being
    implemented when new repositories are being created, so a user expecting
    the feature to be available will be lulled into a false sense of
    security.
    
    Instead, we should remove the feature.
    
    In `repositorymetadata` we need to still retain a single query, as
    `sqlc` requires at least one query per schema.
    
    Closes #470, #471, #306, #283, #274, #221, #165.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
repo.go 355 B
package repositorymetadata

import (
	"context"
	"database/sql"

	"dmd.tanna.dev/internal/repositorymetadata/db"
)

type RepoMetadata struct{}

func (*RepoMetadata) Name() string {
	return "RepoMetadata"
}

func (*RepoMetadata) CreateTables(ctx context.Context, sqlDB *sql.DB) error {
	_, err := sqlDB.ExecContext(ctx, db.CreateTablesQuery)
	return err
}