Cleanup some leftover

Don't have to import mattn/go-sqlite3 at pkg/database/migrate/sqlite.go
Remove unused DriverFunction declaration at migrate.go
This commit is contained in:
Nurahmadie 2014-03-10 11:30:39 +07:00
parent 6a42686c29
commit 76ed21c40f
4 changed files with 3 additions and 6 deletions

View file

@ -24,7 +24,7 @@ type Operation interface {
AddIndex(tableName string, columns []string, flag string) (sql.Result, error)
DropIndex(tableName string, columns[]string) (sql.Result, error)
DropIndex(tableName string, columns []string) (sql.Result, error)
}
type MigrationDriver struct {
@ -33,4 +33,3 @@ type MigrationDriver struct {
}
type DriverBuilder func(tx *sql.Tx) *MigrationDriver

View file

@ -48,6 +48,7 @@ INSERT INTO migration (revision) VALUES (?)
const deleteRevisionStmt = `
DELETE FROM migration where revision = ?
`
type Revision interface {
Up(mg *MigrationDriver) error
Down(mg *MigrationDriver) error
@ -59,8 +60,6 @@ type Migration struct {
revs []Revision
}
type DriverFunction func(tx *sql.Tx) *MigrationDriver
var Driver DriverBuilder
func New(db *sql.DB) *Migration {

View file

@ -4,8 +4,6 @@ import (
"database/sql"
"fmt"
"strings"
_ "github.com/mattn/go-sqlite3"
)
type sqliteDriver struct {

View file

@ -6,6 +6,7 @@ import (
"strings"
"testing"
_ "github.com/mattn/go-sqlite3"
"github.com/russross/meddler"
)