Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve comments
Browse files Browse the repository at this point in the history
mfridman committed Nov 12, 2023
1 parent fad964c commit b4b732f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions database/store.go
Original file line number Diff line number Diff line change
@@ -21,7 +21,8 @@ type Store interface {
Tablename() string

// CreateVersionTable creates the version table. This table is used to record applied
// migrations.
// migrations. When creating the table, the implementation must also insert a row for the
// initial version (0).
CreateVersionTable(ctx context.Context, db DBTxConn) error

// Insert inserts a version id into the version table.
@@ -35,7 +36,9 @@ type Store interface {
GetMigration(ctx context.Context, db DBTxConn, version int64) (*GetMigrationResult, error)

// ListMigrations retrieves all migrations sorted in descending order by id or timestamp. If
// there are no migrations, return empty slice with no error.
// there are no migrations, return empty slice with no error. Typically this method will return
// at least one migration, because the initial version (0) is always inserted into the version
// table when it is created.
ListMigrations(ctx context.Context, db DBTxConn) ([]*ListMigrationsResult, error)

// TODO(mf): remove this method once the Provider is public and a custom Store can be used.

0 comments on commit b4b732f

Please sign in to comment.