@@ 198,7 198,11 @@ func (me *MigrationEngine) printf(format
func (me *MigrationEngine) createMigrationTable(ctx context.Context) error {
err := withTx(ctx, nil, func(tx *sql.Tx) error {
- _, err := tx.ExecContext(ctx, "CREATE TABLE IF NOT EXISTS migrations (id TEXT PRIMARY KEY)")
+ _, err := tx.ExecContext(ctx, `
+ CREATE TABLE IF NOT EXISTS migrations (
+ id TEXT PRIMARY KEY,
+ created_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
+ )`)
if err != nil {
return fmt.Errorf("creating migrations table: %w", err)
}